This removes that autopopulation of the date and adds a placeholder field
showing the date format.
To test:
1. In library settings turn on "Allow Patron Self-Registration" and "Show dob
field in patron registration". "Require dob field on patron registration"
can also be turned on to test that option.
2. Go to the "Request Library Card" page of the opac and notice that the
dob field is populated with today's date.
3. Apply the patch.
4. Go to the "Request Library Card" page. The dob is no longer populated
with a date, and now displays a placeholder for the date format.
5. Create a few registrations with dob dates and no dob dates.
Signed-off-by: Garry Collum <gcollum@gmail.com>
<div class="col-md-6">
[% IF fname == "dob"; %]
<div class="input-group date" data-provide="datepicker-inline">
- <input type="text" class="form-control datepicker" id='[% field_path %]'
+ <input type="text" placeholder="yyyy-mm-dd" class="form-control datepicker" id='[% field_path %]'
name='[% field_path %]' value='[% value || CGI.param(field_path) | html %]' [% IF require %]required[% END %] data-date-format="yyyy-mm-dd" />
<div class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
autoclose: true,
todayHighlight: true,
});
- $('.datepicker').datepicker("setDate", new Date());
+ $('.datepicker').datepicker("setDate", "");
});
</script>