Bug 27703: Make ID of category select field unique
Duplicate element IDs on the authorized values page are invalid and cause a problem with the JavaScript intended to submit the form when the category select field changes. This patch changes the ID of the label and the field and makes the corresponding change to the JavaScript. To test, apply the patch and go to Administration -> Authorized values. - Click an authorized value category to view its contents. - Using mouse or keyboard, make a selection from the "Show category" dropdown menu. - The form should submit automatically and direct you to the corresponding category. - Validate the HTML of the page and confirm that there are no errors. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
d67fc5e010
commit
fa349d4cf1
|
|
@ -195,8 +195,8 @@
|
|||
|
||||
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="get" id="category">
|
||||
<p>
|
||||
<label for="searchfield">Show category: </label>
|
||||
<select name="searchfield" id="searchfield" size="1">
|
||||
<label for="category_search">Show category: </label>
|
||||
<select name="searchfield" id="category_search" size="1">
|
||||
[% FOR c IN categories %]
|
||||
[% IF c == searchfield %]
|
||||
<option value="[% c | html %]" selected="selected">[% c | html %]</option>
|
||||
|
|
@ -205,7 +205,6 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
|
@ -329,8 +328,7 @@
|
|||
$("a.delete").click(function(){
|
||||
return confirm(_("Are you sure you want to delete this authorized value?"));
|
||||
});
|
||||
$('#category').find("input:submit").hide();
|
||||
$('#searchfield').change(function() {
|
||||
$('#category_search').change(function() {
|
||||
$('#category').submit();
|
||||
});
|
||||
$(".library_limitation").tooltip();
|
||||
|
|
|
|||
Loading…
Reference in New Issue