diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/elements/input-date-field.html | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/elements/input-date-field.html')
-rw-r--r-- | httemplate/elements/input-date-field.html | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/httemplate/elements/input-date-field.html b/httemplate/elements/input-date-field.html deleted file mode 100644 index 2a9bc1d53..000000000 --- a/httemplate/elements/input-date-field.html +++ /dev/null @@ -1,50 +0,0 @@ -% if(!$noinit) { -<LINK REL="stylesheet" TYPE="text/css" HREF="<%$fsurl%>elements/calendar-win2k-2.css" TITLE="win2k-2"> -<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar_stripped.js"></SCRIPT> -<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-en.js"></SCRIPT> -<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-setup.js"></SCRIPT> -% } - -<INPUT TYPE="text" NAME="<% $name %>" ID="<% $name %>_text" VALUE="<% $value %>"> -<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name %>_button" STYLE="cursor: pointer" TITLE="Select date"> - -<SCRIPT TYPE="text/javascript"> - Calendar.setup({ - inputField: "<% $name %>_text", - ifFormat: "<% $format %>", - button: "<% $name %>_button", - align: "BR" - }); -</SCRIPT> - -<%init> - -my($name, $value, $format, $usedatetime, $noinit); -if ( ref($_[0]) ) { - my $opt = shift; - $name = $opt->{'name'}; - $value = $opt->{'value'}; - $format = $opt->{'format'}; - $usedatetime = $opt->{'usedatetime'}; - $noinit = $opt->{'noinit'}; -} else { - ($name, $value, $format, $usedatetime) = @_; -} - -my $conf = new FS::Conf; - -$format ||= $conf->config('date_format') || '%m/%d/%Y'; - -if ( $value =~ /\S/ ) { - if ( $usedatetime ) { - my $dt = DateTime->from_epoch(epoch => $value, time_zone => 'floating'); - $value = $dt->strftime($format); - } elsif ( $value =~ /^\d+$/ ) { - $value = time2str($format, $value); - } -} else { - $value = ''; -} - -</%init> - |