Esempio n. 1
0
 def _process(self):
     form = AdminSettingsForm(obj=FormDefaults(**settings.get_all()))
     if form.validate_on_submit():
         settings.set_multi(form.data)
         flash(_('Settings saved'), 'success')
         return redirect(url_for('.admin_settings'))
     return WPPaymentAdmin.render_template('admin_settings.html', form=form, plugins=get_payment_plugins().values())
Esempio n. 2
0
 def _process(self):
     form = AdminSettingsForm(obj=FormDefaults(**settings.get_all()))
     if form.validate_on_submit():
         settings.set_multi(form.data)
         flash(_("Settings saved"), "success")
         return redirect(url_for(".admin_settings"))
     return WPPaymentAdmin.render_template("admin_settings.html", form=form, plugins=get_payment_plugins().values())
Esempio n. 3
0
 def _process(self):
     form = AdminSettingsForm(obj=FormDefaults(**payment_settings.get_all()))
     if form.validate_on_submit():
         payment_settings.set_multi(form.data)
         flash(_('Settings saved'), 'success')
         return redirect(url_for('.admin_settings'))
     return WPPaymentAdmin.render_template('admin_settings.html', 'payment',
                                           form=form, plugins=get_payment_plugins().values())