Bug 23385: Hide 'Default values' fields by default
To test: 1 - Go to Tools->Import patrons 2 - Choose a file 3 - Scroll a long way to submit 4 - Apply patch 5 - Choose a file 6 - Can submit easily 7 - Click to expand and enter default fields 8 - Confirm can still submit and that values entered are used Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
9f11eef934
commit
9258d385ba
1 changed files with 10 additions and 2 deletions
|
@ -159,9 +159,12 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset class="rows">
|
<fieldset class="rows">
|
||||||
<legend>Default values</legend>
|
<legend>
|
||||||
|
<a class="expand_defaults">Click to enter default values</a>
|
||||||
|
<a class="expand_defaults" style="display:none;">Hide default value fields</a>
|
||||||
|
</legend>
|
||||||
|
|
||||||
<ol>
|
<ol class="default_values" style="display:none;">
|
||||||
[% FOREACH borrower_field IN borrower_fields %]
|
[% FOREACH borrower_field IN borrower_fields %]
|
||||||
|
|
||||||
[% SWITCH borrower_field.field %]
|
[% SWITCH borrower_field.field %]
|
||||||
|
@ -303,6 +306,11 @@ you can supply dates in ISO format (e.g., '2010-10-28').
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
[%# Make date fields have the datepicker %]
|
[%# Make date fields have the datepicker %]
|
||||||
$("#dateenrolled, #dateexpiry, #dateofbirth").datepicker();
|
$("#dateenrolled, #dateexpiry, #dateofbirth").datepicker();
|
||||||
|
|
||||||
|
$(".expand_defaults").click(function(){
|
||||||
|
$(".default_values").toggle();
|
||||||
|
$(".expand_defaults").toggle();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
Loading…
Reference in a new issue