[IMP] use button element in pad-creation form, avoids need for a bunch of JS to transform a link-click into a form submission

Also remove a bunch of unneeded attributes on the pad-name input

bzr revid: xmo@openerp.com-20101020124732-2dovbi82ht7hyiyi
This commit is contained in:
Xavier Morel
2010-10-20 14:47:32 +02:00
parent 377af37434
commit 91fc2a2c3c
+3 -6
View File
@@ -29,11 +29,11 @@ class SidebarTemplateEditor(openobject.templating.TemplateEditor):
<table width="100%">
<tr>
<td width=60% style="padding-right:8px;">
<input type="text" id="sidebar_pad_datas" class="binary"
name="pad_name" kind="url" size="5" />
<input id="sidebar_pad_datas"
name="pad_name" size="5" />
</td>
<td>
<a href="#" id="sidebar_pad_ok" class="button-a">${_("Ok")}</a>
<button>${_("Ok")}</button>
</td>
</tr>
</table>
@@ -43,9 +43,6 @@ class SidebarTemplateEditor(openobject.templating.TemplateEditor):
var $padForm = jQuery('#pad-form')
.hide()
.submit(createAttachment);
jQuery('#sidebar_pad_ok').click(function(){
$padForm.submit();
});
jQuery('#add-pad').click(function(e){
$padForm.show();
e.preventDefault();