mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
Disable the tagging UI for non-admin users
This commit is contained in:
@@ -265,7 +265,8 @@ const tagsComponent = () => {
|
|||||||
|
|
||||||
$('.tag-select').select2({
|
$('.tag-select').select2({
|
||||||
tags: true,
|
tags: true,
|
||||||
placeholder: 'Tag the title',
|
placeholder: this.isAdmin ? 'Tag the title' : 'No tags found',
|
||||||
|
disabled: !this.isAdmin,
|
||||||
templateSelection(state) {
|
templateSelection(state) {
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.setAttribute('href', `${base_url}tags/${encodeURIComponent(state.text)}`);
|
a.setAttribute('href', `${base_url}tags/${encodeURIComponent(state.text)}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user