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

View File

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