Skip to content

Commit

Permalink
metadata add edit fix visibility setting (set to current setting on m…
Browse files Browse the repository at this point in the history
…odal window load)
  • Loading branch information
brookgagnon committed Sep 13, 2024
1 parent 121af8a commit e38330e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions js/media/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ OB.Media.metadataAddEditWindow = function (id) {
$("#metadata_addedit_id").after(
'<input type="hidden" id="metadata_type" value="' + metadata.type + '">',
);
if (metadata.visibility) {
document.querySelector("#metadata_visibility").value = metadata.visibility;
}
$("#metadata_description").val(metadata.description);
if (metadata.type == "select" && metadata.settings && metadata.settings.options) {
$("#metadata_select_options").val(metadata.settings.options.join("\n"));
Expand Down
2 changes: 1 addition & 1 deletion models/mediametadata_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function save($data, $id)
$save['settings']['options'] = $save_options;
}

// visibility, mode, default, and id3 key
// mode, default, and id3 key
$save['settings']['mode'] = $data['mode'];
$save['settings']['default'] = $data['default'];
$save['settings']['id3_key'] = $data['id3_key'];
Expand Down

0 comments on commit e38330e

Please sign in to comment.