Exemple #1
0
 def _process(self):
     defaults = FormDefaults(**settings.get_all())
     form = SettingsForm(obj=defaults)
     if form.validate_on_submit():
         settings.set_multi(form.data)
         flash(_(u'Settings saved'), 'success')
         self._redirect(url_for('rooms_admin.roomBookingPluginAdmin'))
         return
     rb_active = Config.getInstance().getIsRoomBookingActive()
     return WPRoomBookingPluginAdmin(self, rb_active=rb_active, form=form).display()
Exemple #2
0
    def _process(self):
        defaults = FormDefaults(**rb_settings.get_all())
        form = SettingsForm(obj=defaults)
        if form.validate_on_submit():
            rb_settings.set_multi(form.data)
            flash(_('Settings saved'), 'success')
            return redirect(url_for('.settings'))

        rb_active = Config.getInstance().getIsRoomBookingActive()
        return WPRoomBookingSettings(self, rb_active=rb_active, form=form).display()
Exemple #3
0
 def _process(self):
     defaults = FormDefaults(**settings.get_all())
     form = SettingsForm(obj=defaults)
     if form.validate_on_submit():
         settings.set_multi(form.data)
         flash(_(u'Settings saved'), 'success')
         self._redirect(url_for('rooms_admin.roomBookingPluginAdmin'))
         return
     rb_active = Config.getInstance().getIsRoomBookingActive()
     return WPRoomBookingPluginAdmin(self, rb_active=rb_active,
                                     form=form).display()