Bug 15863: Show/hide date range selection if not needed - dictionnary
When creating a dictionary for a date column, there is a "date range" / "all dates" radio buttons and 2 inputs to select the date range. These inputs should be hidden if "all dates" is selected. Test plan: 1/ Create a new dictionary on reports/dictionary.pl 2/ Select a date column (borrowers.dateofbirth of instance) 3/ On step 4, the start/end of the date range inputs should be hidden/shown depending of the radio buttons. Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
5c0d28db88
commit
a6da1c024c
|
|
@ -4,14 +4,21 @@
|
|||
[% INCLUDE 'calendar.inc' %]
|
||||
<style type="text/css">fieldset.rows table { clear: none; margin: 0;}</style>
|
||||
<script type="text/javascript">
|
||||
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this dictionary definition? This cannot be undone.");
|
||||
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this dictionary definition? This cannot be undone.");
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#delete").on("click",function(){
|
||||
return confirmDelete(MSG_CONFIRM_DELETE);
|
||||
$(document).ready(function() {
|
||||
$("#delete").on("click",function(){
|
||||
return confirmDelete(MSG_CONFIRM_DELETE);
|
||||
});
|
||||
|
||||
$("#date_range").change(function(){
|
||||
$("input#from").parents('li').show();
|
||||
});
|
||||
$("#all_dates").change(function(){
|
||||
$("input#from").parents('li').hide();
|
||||
});
|
||||
$("#all_dates").click().change();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body id="rep_dictionary" class="rep">
|
||||
|
|
|
|||
Loading…
Reference in New Issue