Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
a822a2e3
Commit
a822a2e3
authored
2 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Fix issues
parent
3e9d7495
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/admin/routes.py
+2
-2
2 additions, 2 deletions
app/admin/routes.py
app/static/js/Utils.js
+11
-11
11 additions, 11 deletions
app/static/js/Utils.js
with
13 additions
and
13 deletions
app/admin/routes.py
+
2
−
2
View file @
a822a2e3
...
@@ -48,10 +48,12 @@ def user(user_id):
...
@@ -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):
...
@@ -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
'
,
...
...
This diff is collapsed.
Click to expand it.
app/static/js/Utils.js
+
11
−
11
View file @
a822a2e3
...
@@ -432,7 +432,7 @@ class Utils {
...
@@ -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
)
=>
{
...
@@ -453,16 +453,16 @@ class Utils {
...
@@ -453,16 +453,16 @@ class Utils {
msg
=
`Model "
${
spaCyNLPPipelineModel
.
title
}
" is now private`
;
msg
=
`Model "
${
spaCyNLPPipelineModel
.
title
}
" is now private`
;
}
}
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
)
=>
{
if
(
response
.
status
===
403
)
{
app
.
flash
(
'
Forbidden
'
,
'
error
'
);}
if
(
response
.
status
===
403
)
{
app
.
flash
(
'
Forbidden
'
,
'
error
'
);}
reject
(
response
);
reject
(
response
);
}
}
);
);
});
});
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment