Lp 1723651: Add Fallback for HTML5 Date Element in OPAC user/dyrcona/lp1723651-html5-date-input-in-opac
authorJason Stephenson <jason@sigio.com>
Sat, 20 Jan 2018 17:07:10 +0000 (12:07 -0500)
committerJason Stephenson <jason@sigio.com>
Sat, 20 Jan 2018 17:18:03 +0000 (12:18 -0500)
commit86062d24203037aa1a64ea86efb8351570b9e34e
tree759b9bf39811dc445a7ee757414829f04ebbc997
parent3166a8299ca6b31d7d9e9ab3fa02232c94d1da65
Lp 1723651: Add Fallback for HTML5 Date Element in OPAC

Add some JavaScript code to check if the user's browser supports a
HTML5 element, and if not, we provide some fallback code to add an
input format tip and to provide a default value in some cases.

* A new JavaSCript function, supportsType(), is added to
  opac/parts/js.tt2.

* Fallback code is added to opac/parts/place_hold.tt2 to offer the
  format hint if the HTML5 date input element is not supported.

* Fallback code is added to opac/myopac/holds/edit.tt2 if the HTML5
  date input element is not supported.  This code adds a format hint
  and sets a default value for the expire_time and thaw_date elements.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/templates/opac/myopac/holds/edit.tt2
Open-ILS/src/templates/opac/parts/js.tt2
Open-ILS/src/templates/opac/parts/place_hold.tt2