diff --git a/app/admin/routes.py b/app/admin/routes.py index 38ad92536166014b720fcf2fc74ad834203eaa51..8f4370fd94afb8bdedec63eaca458c27787c87fb 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -48,10 +48,12 @@ def user(user_id): def edit_user(user_id): user = User.query.get_or_404(user_id) admin_edit_user_form = AdminEditUserForm( + obj=user, prefix='admin-edit-user-form' ) edit_general_settings_form = EditGeneralSettingsForm( user, + obj=user, prefix='edit-general-settings-form' ) edit_notification_settings_form = EditNotificationSettingsForm( @@ -81,8 +83,6 @@ def edit_user(user_id): db.session.commit() flash('Your changes have been saved') return redirect(url_for('.edit_user', user_id=user.id)) - admin_edit_user_form.prefill(user) - edit_general_settings_form.prefill(user) edit_notification_settings_form.prefill(user) return render_template( 'admin/edit_user.html.j2', diff --git a/app/static/js/Utils.js b/app/static/js/Utils.js index 010ed0d22354bc36fdf0f7508134f0f5d15bdf97..52a0f85c7ec192361a24bd03a10589c6c147e033 100644 --- a/app/static/js/Utils.js +++ b/app/static/js/Utils.js @@ -544,7 +544,7 @@ class Utils { reject(response); break; default: - app.flash(msg, 'corpus'); + app.flash(msg); resolve(response); break; } @@ -575,7 +575,7 @@ class Utils { reject(response); break; default: - app.flash(msg, 'corpus'); + app.flash(msg); resolve(response); break; }