EditAssetForm: hide album tags in tag box

This commit is contained in:
Aaron van Geffen 2023-11-12 17:27:59 +01:00
parent 0c861bf976
commit 8f4ed7e3b0
2 changed files with 10 additions and 1 deletions

View File

@ -86,6 +86,10 @@ class EditAsset extends HTMLController
$_POST['tag'][$_POST['id_album']] = true; $_POST['tag'][$_POST['id_album']] = true;
} }
} }
else
{
$_POST['tag'][$currentAlbumId] = true;
}
// Handle tags // Handle tags
$new_tags = []; $new_tags = [];

View File

@ -123,11 +123,16 @@ class EditAssetForm extends Template
<ul class="list-unstyled" id="tag_list">'; <ul class="list-unstyled" id="tag_list">';
foreach ($this->asset->getTags() as $tag) foreach ($this->asset->getTags() as $tag)
echo ' {
if ($tag->kind === 'Album')
continue;
echo '
<li> <li>
<input class="tag_check" type="checkbox" name="tag[', $tag->id_tag, ']" id="linked_tag_', $tag->id_tag, '" title="Uncheck to delete" checked> <input class="tag_check" type="checkbox" name="tag[', $tag->id_tag, ']" id="linked_tag_', $tag->id_tag, '" title="Uncheck to delete" checked>
', $tag->tag, ' ', $tag->tag, '
</li>'; </li>';
}
echo ' echo '
<li id="new_tag_container"><input class="form-control" type="text" id="new_tag" placeholder="Type to link a new tag"></li> <li id="new_tag_container"><input class="form-control" type="text" id="new_tag" placeholder="Type to link a new tag"></li>