Bug 42445: Remove event attributes from list creation template
This patch removes a couple of "onChange" event attributes from the lists template in favor of defining the event handler in the footer JS. To test, apply the patch and go to Lists -> New list. - Choose "Private" from the public dropdown. - In the "Allow changes to contents from" dropdown select "Permitted staff only" - A note should appear about the setting having no effect. - You should see a similar note displayed when you select "Staff only" or "Anyone seeing this list" Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Amended-by: Jonathan Druart Tidy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
01a1696058
commit
1275a24115
|
|
@ -39,7 +39,7 @@
|
|||
<label for="allow_changes_from">Allow changes to contents from: </label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
|
||||
<select name="allow_changes_from" id="allow_changes_from" class="adjust_remark">
|
||||
[% IF shelf.allow_change_from_owner %]
|
||||
<option value="0">Nobody</option>
|
||||
[% ELSE %]
|
||||
|
|
@ -501,7 +501,7 @@
|
|||
<label for="public">Public: </label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select id="public" name="public" onchange="AdjustRemark()">
|
||||
<select id="public" name="public" class="adjust_remark">
|
||||
[% IF shelf.is_private %]
|
||||
<option value="0" selected="selected">Private</option>
|
||||
[% ELSE %]
|
||||
|
|
@ -988,6 +988,11 @@
|
|||
$("#permitted_staff_remark").hide();
|
||||
}
|
||||
}
|
||||
$(document).ready(function () {
|
||||
$(".adjust_remark").on("change", function () {
|
||||
AdjustRemark();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
[% IF op == 'view' %]
|
||||
<script nonce="[% Koha.CSPNonce | $raw %]">
|
||||
|
|
|
|||
Loading…
Reference in New Issue