Another fix for http://dev.plone.org/plone/ticket/11486. r51246 fixed Chrome but broke Safari. This fix has been tested in Fx, Chrome, Safari and IE 9.

svn path=/plone.app.discussion/trunk/; revision=51258
This commit is contained in:
Timo Stollenwerk 2011-07-15 08:23:08 +00:00
parent c2ff87a778
commit 160022b146
2 changed files with 8 additions and 8 deletions

View File

@ -29,6 +29,7 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
"""Discussion settings form.
"""
schema = IDiscussionSettings
id = "DiscussionSettingsEditForm"
label = _(u"Discussion settings")
description = _(u"help_discussion_settings_editform",
default=u"Some discussion related settings are not located "
@ -66,8 +67,9 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
self.widgets['user_notification_enabled'].label = \
_(u"User Email Notification")
@button.buttonAndHandler(_('Save'), name='save')
@button.buttonAndHandler(_('Save'), name=None)
def handleSave(self, action):
print "handleSave"
data, errors = self.extractData()
if errors:
self.status = self.formErrorsMessage

View File

@ -118,11 +118,9 @@
* submitting the form. Otherwise the z3c.form will raise errors on
* the required attributes.
**********************************************************************/
$("input[name='form.buttons.save']").bind("click", function (e) {
e.preventDefault();
var form = $(this).parents("form");
$(form).find("input,select").removeAttr('disabled');
$(form).submit();
$("form#DiscussionSettingsEditForm").bind("submit", function (e) {
$(this).find("input,select").removeAttr('disabled');
$(this).submit();
});
});