mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-01-24 16:40:35 +00:00
Fix issues
This commit is contained in:
parent
3e9d749574
commit
a822a2e3a0
@ -48,10 +48,12 @@ def user(user_id):
|
|||||||
def edit_user(user_id):
|
def edit_user(user_id):
|
||||||
user = User.query.get_or_404(user_id)
|
user = User.query.get_or_404(user_id)
|
||||||
admin_edit_user_form = AdminEditUserForm(
|
admin_edit_user_form = AdminEditUserForm(
|
||||||
|
obj=user,
|
||||||
prefix='admin-edit-user-form'
|
prefix='admin-edit-user-form'
|
||||||
)
|
)
|
||||||
edit_general_settings_form = EditGeneralSettingsForm(
|
edit_general_settings_form = EditGeneralSettingsForm(
|
||||||
user,
|
user,
|
||||||
|
obj=user,
|
||||||
prefix='edit-general-settings-form'
|
prefix='edit-general-settings-form'
|
||||||
)
|
)
|
||||||
edit_notification_settings_form = EditNotificationSettingsForm(
|
edit_notification_settings_form = EditNotificationSettingsForm(
|
||||||
@ -81,8 +83,6 @@ def edit_user(user_id):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash('Your changes have been saved')
|
flash('Your changes have been saved')
|
||||||
return redirect(url_for('.edit_user', user_id=user.id))
|
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)
|
edit_notification_settings_form.prefill(user)
|
||||||
return render_template(
|
return render_template(
|
||||||
'admin/edit_user.html.j2',
|
'admin/edit_user.html.j2',
|
||||||
|
@ -432,7 +432,7 @@ class Utils {
|
|||||||
fetch(`/contributions/tesseract-ocr-pipeline-models/${tesseractOCRPipelineModel.id}/toggle-public-status`, {method: 'POST', headers: {Accept: 'application/json'}})
|
fetch(`/contributions/tesseract-ocr-pipeline-models/${tesseractOCRPipelineModel.id}/toggle-public-status`, {method: 'POST', headers: {Accept: 'application/json'}})
|
||||||
.then(
|
.then(
|
||||||
(response) => {
|
(response) => {
|
||||||
app.flash(msg, 'corpus');
|
app.flash(msg);
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},
|
},
|
||||||
(response) => {
|
(response) => {
|
||||||
@ -455,7 +455,7 @@ class Utils {
|
|||||||
fetch(`/contributions/spacy-nlp-pipeline-models/${spaCyNLPPipelineModel.id}/toggle-public-status`, {method: 'POST', headers: {Accept: 'application/json'}})
|
fetch(`/contributions/spacy-nlp-pipeline-models/${spaCyNLPPipelineModel.id}/toggle-public-status`, {method: 'POST', headers: {Accept: 'application/json'}})
|
||||||
.then(
|
.then(
|
||||||
(response) => {
|
(response) => {
|
||||||
app.flash(msg, 'corpus');
|
app.flash(msg);
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},
|
},
|
||||||
(response) => {
|
(response) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user