mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Added tag relationship management to frontend
This commit is contained in:
@ -28,6 +28,8 @@ App.Presenters.TagPresenter = function(
|
||||
topNavigationPresenter.changeTitle('Tags');
|
||||
|
||||
privileges.canChangeName = auth.hasPrivilege(auth.privileges.changeTagName);
|
||||
privileges.canChangeImplications = auth.hasPrivilege(auth.privileges.changeTagImplications);
|
||||
privileges.canChangeSuggestions = auth.hasPrivilege(auth.privileges.changeTagSuggestions);
|
||||
privileges.canBan = auth.hasPrivilege(auth.privileges.banTags);
|
||||
|
||||
promise.wait(
|
||||
@ -86,6 +88,14 @@ App.Presenters.TagPresenter = function(
|
||||
formData.banned = $form.find('[name=ban]').is(':checked') ? 1 : 0;
|
||||
}
|
||||
|
||||
if (privileges.canChangeImplications) {
|
||||
formData.implications = $form.find('[name=implications]').val();
|
||||
}
|
||||
|
||||
if (privileges.canChangeSuggestions) {
|
||||
formData.suggestions = $form.find('[name=suggestions]').val();
|
||||
}
|
||||
|
||||
promise.wait(api.put('/tags/' + tag.name, formData))
|
||||
.then(function(response) {
|
||||
tag = response.json;
|
||||
|
Reference in New Issue
Block a user