[Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 4963, sys prefs need date hints and/or picker
Galen Charlton
gmcharlt at gmail.com
Sat Oct 30 22:25:19 CEST 2010
From: Owen Leonard <oleonard at myacpl.org>
This patch adds the standard date format hint used elsewhere
in the interface.
Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
admin/preferences.pl | 2 ++
.../prog/en/modules/admin/preferences.tmpl | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/admin/preferences.pl b/admin/preferences.pl
index 7fcf5fc..a161203 100755
--- a/admin/preferences.pl
+++ b/admin/preferences.pl
@@ -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 ) };
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl
index 80035bb..b9bfd4f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl
@@ -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" -->
--
1.7.0
More information about the Koha-patches
mailing list