Skip to content

Commit a21adf9

Browse files
noerwlafriks
andauthored
restrict query selector to edit form (#14307)
Co-authored-by: Lauris BH <[email protected]>
1 parent 6eee9f0 commit a21adf9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/repo/issue/labels/edit_delete_label.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{{.i18n.Tr "repo.issues.label_modify"}}
2424
</div>
2525
<div class="content">
26-
<form class="ui edit-label form" action="{{$.Link}}/edit" method="post">
26+
<form class="ui edit-label form ignore-dirty" action="{{$.Link}}/edit" method="post">
2727
{{.CsrfTokenHtml}}
2828
<input id="label-modal-id" name="id" type="hidden">
2929
<div class="ui grid">

web_src/js/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ function initLabelEdit() {
162162
$('.minicolors-swatch-color').css('background-color', color_hex);
163163
});
164164
$('.edit-label-button').on('click', function () {
165-
$('.color-picker').minicolors('value', $(this).data('color'));
165+
$('.edit-label .color-picker').minicolors('value', $(this).data('color'));
166166
$('#label-modal-id').val($(this).data('id'));
167167
$('.edit-label .new-label-input').val($(this).data('title'));
168168
$('.edit-label .new-label-desc-input').val($(this).data('description'));
169169
$('.edit-label .color-picker').val($(this).data('color'));
170-
$('.minicolors-swatch-color').css('background-color', $(this).data('color'));
170+
$('.edit-label .minicolors-swatch-color').css('background-color', $(this).data('color'));
171171
$('.edit-label.modal').modal({
172172
onApprove() {
173173
$('.edit-label.form').trigger('submit');

0 commit comments

Comments
 (0)