Skip to content

Commit 096aa18

Browse files
authored
Fix edit-label form init (#14337)
1 parent bf853db commit 096aa18

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
@@ -163,12 +163,12 @@ function initLabelEdit() {
163163
$('.minicolors-swatch-color').css('background-color', color_hex);
164164
});
165165
$('.edit-label-button').on('click', function () {
166-
$('.color-picker').minicolors('value', $(this).data('color'));
166+
$('.edit-label .color-picker').minicolors('value', $(this).data('color'));
167167
$('#label-modal-id').val($(this).data('id'));
168168
$('.edit-label .new-label-input').val($(this).data('title'));
169169
$('.edit-label .new-label-desc-input').val($(this).data('description'));
170170
$('.edit-label .color-picker').val($(this).data('color'));
171-
$('.minicolors-swatch-color').css('background-color', $(this).data('color'));
171+
$('.edit-label .minicolors-swatch-color').css('background-color', $(this).data('color'));
172172
$('.edit-label.modal').modal({
173173
onApprove() {
174174
$('.edit-label.form').trigger('submit');

0 commit comments

Comments
 (0)