mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Added post relations
This commit is contained in:
@ -30,6 +30,7 @@ App.Auth = function(_, jQuery, util, api, appState, promise) {
|
||||
changePostTags: 'changePostTags',
|
||||
changePostContent: 'changePostContent',
|
||||
changePostThumbnail: 'changePostThumbnail',
|
||||
changePostRelations: 'changePostRelations',
|
||||
|
||||
listTags: 'listTags',
|
||||
};
|
||||
|
@ -39,6 +39,7 @@ App.Presenters.PostPresenter = function(
|
||||
editPrivileges.canChangeTags = auth.hasPrivilege(auth.privileges.changePostTags);
|
||||
editPrivileges.canChangeContent = auth.hasPrivilege(auth.privileges.changePostContent);
|
||||
editPrivileges.canChangeThumbnail = auth.hasPrivilege(auth.privileges.changePostThumbnail);
|
||||
editPrivileges.canChangeRelations = auth.hasPrivilege(auth.privileges.changePostRelations);
|
||||
|
||||
promise.waitAll(
|
||||
util.promiseTemplate('post'),
|
||||
@ -190,6 +191,10 @@ App.Presenters.PostPresenter = function(
|
||||
formData.tags = tagInput.getTags().join(' ');
|
||||
}
|
||||
|
||||
if (editPrivileges.canChangeRelations) {
|
||||
formData.relations = $form.find('[name=relations]').val();
|
||||
}
|
||||
|
||||
if (post.tags.length === 0) {
|
||||
showEditError('No tags set.');
|
||||
return;
|
||||
|
Reference in New Issue
Block a user