Skip to content

Commit

Permalink
Merge pull request #232 from 10up/fix/label-field-on-submit-form-sit-…
Browse files Browse the repository at this point in the history
…2551

Fix label fields on video editing
  • Loading branch information
Rahmon committed Oct 28, 2021
2 parents d383a62 + 6382506 commit 7e17afb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion assets/js/brightcove-admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/brightcove-admin.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/brightcove-admin.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion assets/js/src/views/video-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ var VideoEditView = BrightcoveView.extend({
container = document.getElementById('js-bc-labels');

// Clean up our cloned row
newRow.find('input').prop('disabled', false);
newRow.find('input').prop('disabled', false).val('');
newRow.removeAttr('id');
newRow.removeClass('empty-row');

Expand All @@ -189,6 +189,10 @@ var VideoEditView = BrightcoveView.extend({
labelAutocomplete: function (evnt) {
jQuery('.brightcove-labels').autocomplete({
source: wpbc.preload.labels,
select: function () {
$(this).parent('.bc-label-repeater.empty-row').removeClass('empty-row');
},
appendTo: '.media-modal',
});
},

Expand Down

0 comments on commit 7e17afb

Please sign in to comment.