Settings form: Fix explicit unlocking, fix HTML button type

This commit is contained in:
Raphael Michel
2022-02-23 13:24:47 +01:00
parent 67ba1f81e4
commit a4f64e94cc
2 changed files with 3 additions and 1 deletions

View File

@@ -45,7 +45,8 @@ class PropagatedNode(Node):
<div class="propagated-settings-box locked panel panel-default">
<div class="panel-heading">
<input type="hidden" name="_settings_ignore" value="{fnames}">
<button class="btn btn-default pull-right btn-xs" name="decouple" value="{fnames}" data-action="unlink">
<input type="hidden" name="decouple" value="">
<button type="button" class="btn btn-default pull-right btn-xs" value="{fnames}" data-action="unlink">
<span class="fa fa-unlock"></span> {text_unlink}
</button>
<h4 class="panel-title">

View File

@@ -765,6 +765,7 @@ $(function () {
$(".propagated-settings-box button[data-action=unlink]").click(function (ev) {
var $box = $(this).closest(".propagated-settings-box");
$box.find("input[name=decouple]").val($(this).val());
$box.find("[data-propagated-locked]").prop("readonly", false);
$box.removeClass("locked").addClass("unlocked");
ev.preventDefault();