Fix for Bug 4963, sys prefs need date hints and/or picker
authorOwen Leonard <oleonard@myacpl.org>
Sat, 30 Oct 2010 20:25:19 +0000 (16:25 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 2 Nov 2010 02:17:40 +0000 (15:17 +1300)
This patch adds the standard date format hint used elsewhere
in the interface.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
admin/preferences.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl

index 7fcf5fc..a161203 100755 (executable)
@@ -63,6 +63,8 @@ sub _get_chunk {
 
     if ( $options{'class'} && $options{'class'} eq 'password' ) {
         $chunk->{'input_type'} = 'password';
+    } elsif ( $options{'class'} && $options{'class'} eq 'date' ) {
+        $chunk->{'dateinput'} = 1;
     } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) {
         my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) };
 
index 80035bb..b9bfd4f 100644 (file)
@@ -75,7 +75,7 @@
                     <!-- TMPL_IF NAME="type_text" -->
                     <!-- TMPL_VAR NAME="contents" -->
                     <!-- TMPL_ELSIF NAME="type_input" -->
-                    <input type="<!-- TMPL_VAR NAME="input_type" DEFAULT="text" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="pref_<!-- TMPL_VAR NAME="name" -->" class="preference preference-<!-- TMPL_VAR NAME="class" DEFAULT="short" -->" value="<!-- TMPL_VAR NAME="value" -->" autocomplete="off" />
+                    <input type="<!-- TMPL_VAR NAME="input_type" DEFAULT="text" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="pref_<!-- TMPL_VAR NAME="name" -->" class="preference preference-<!-- TMPL_VAR NAME="class" DEFAULT="short" -->" value="<!-- TMPL_VAR NAME="value" -->" autocomplete="off" /> <!-- TMPL_IF NAME="dateinput" --><span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span><!-- /TMPL_IF -->
                     <!-- TMPL_ELSIF NAME="type_select" -->
                     <select name="pref_<!-- TMPL_VAR NAME="name" -->" id="pref_<!-- TMPL_VAR NAME="name" -->" class="preference preference-<!-- TMPL_VAR NAME="class" DEFAULT="choice" -->">
                         <!-- TMPL_LOOP NAME="CHOICES" -->