projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#17599: display cancelled services from history [doc fix]
[freeside.git]
/
httemplate
/
elements
/
tr-input-date-field.html
diff --git
a/httemplate/elements/tr-input-date-field.html
b/httemplate/elements/tr-input-date-field.html
index
40162f0
..
f2a570b
100644
(file)
--- a/
httemplate/elements/tr-input-date-field.html
+++ b/
httemplate/elements/tr-input-date-field.html
@@
-13,6
+13,7
@@
Example:
'usedatetime' => 1, #use DateTime->strftime to format the date
# instead of Date::Format->time2str
'noinit' => 1, #first one on the page is enough
'usedatetime' => 1, #use DateTime->strftime to format the date
# instead of Date::Format->time2str
'noinit' => 1, #first one on the page is enough
+ 'required' => 1,
},
&>
},
&>
@@
-24,9
+25,10
@@
Example:
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-setup.js"></SCRIPT>
% }
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-setup.js"></SCRIPT>
% }
-<TR>
- <TD ALIGN="right"><% $label %></TD>
- <TD>
+<% include('/elements/tr-td-label.html',
+ 'label' => $label,
+ 'required' => $required ) %>
+ <TD COLSPAN=<% $colspan %>>
<INPUT TYPE="text" NAME="<% $name %>" ID="<% $name %>_text" VALUE="<% $value %>">
<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name %>_button" STYLE="cursor: pointer" TITLE="<% mt('Select date') |h %>">
</TD>
<INPUT TYPE="text" NAME="<% $name %>" ID="<% $name %>_text" VALUE="<% $value %>">
<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name %>_button" STYLE="cursor: pointer" TITLE="<% mt('Select date') |h %>">
</TD>
@@
-38,12
+40,17
@@
Example:
ifFormat: "<% $format %>",
button: "<% $name %>_button",
align: "BR"
ifFormat: "<% $format %>",
button: "<% $name %>_button",
align: "BR"
+% if ( $format =~ /\%r/ ) {
+ ,
+ showsTime: true,
+ timeFormat: 12
+% }
});
</SCRIPT>
<%init>
});
</SCRIPT>
<%init>
-my($name, $value, $label, $format, $usedatetime, $noinit);
+my($name, $value, $label, $format, $usedatetime, $noinit
, $colspan, $required
);
if ( ref($_[0]) ) {
my $opt = shift;
$name = $opt->{'name'};
if ( ref($_[0]) ) {
my $opt = shift;
$name = $opt->{'name'};
@@
-52,8
+59,11
@@
if ( ref($_[0]) ) {
$format = $opt->{'format'};
$usedatetime = $opt->{'usedatetime'};
$noinit = $opt->{'noinit'};
$format = $opt->{'format'};
$usedatetime = $opt->{'usedatetime'};
$noinit = $opt->{'noinit'};
+ $colspan = $opt->{'colspan'} || 1;
+ $required = $opt->{'required'};
} else {
($name, $value, $label, $format, $usedatetime) = @_;
} else {
($name, $value, $label, $format, $usedatetime) = @_;
+ $colspan = 1;
}
my $conf = new FS::Conf;
}
my $conf = new FS::Conf;