mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Cancel changes after exit webhook edit mode [SCI-5964]
This commit is contained in:
parent
024f9117e6
commit
cfa7937f88
2 changed files with 3 additions and 1 deletions
|
@ -49,7 +49,9 @@
|
|||
|
||||
$('.activity-filters-list').on('click', '.edit-webhook-container .cancel-action', function(e) {
|
||||
let webhookContainer = $(this).closest('.webhook');
|
||||
let input = webhookContainer.find('.url-input');
|
||||
e.preventDefault();
|
||||
input.val(input.data('original-value'));
|
||||
webhookContainer.find('.view-mode').removeClass('hidden');
|
||||
webhookContainer.find('.edit-webhook-container').addClass('hidden');
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
<span class="form-text"><%= t("webhooks.index.target") %></span>
|
||||
<div class="sci-input-container url-input-container form-group">
|
||||
<%= f.text_field :url, class: "sci-input-field url-input", placeholder: t("webhooks.index.url_placeholder") %>
|
||||
<%= f.text_field :url, class: "sci-input-field url-input", placeholder: t("webhooks.index.url_placeholder"), data: {original_value: f.object.url } %>
|
||||
</div>
|
||||
<button class="btn btn-light cancel-action">
|
||||
<i class="fas fa-times"></i>
|
||||
|
|
Loading…
Reference in a new issue