summaryrefslogtreecommitdiff
path: root/rt/share/html/Widgets/Form
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Widgets/Form')
-rw-r--r--rt/share/html/Widgets/Form/Boolean4
-rw-r--r--rt/share/html/Widgets/Form/Integer13
-rw-r--r--rt/share/html/Widgets/Form/Select6
-rw-r--r--rt/share/html/Widgets/Form/String4
4 files changed, 17 insertions, 10 deletions
diff --git a/rt/share/html/Widgets/Form/Boolean b/rt/share/html/Widgets/Form/Boolean
index 1d6c8821d..62890df0a 100644
--- a/rt/share/html/Widgets/Form/Boolean
+++ b/rt/share/html/Widgets/Form/Boolean
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<%DOC>
-see docs/using_forms_widgets.pod
+see docs/extending/using_forms_widgets.pod
</%DOC>
<div id="form-box-<% lc $Name %>" class="widget">
<span class="label description"><% $Description %></span>
diff --git a/rt/share/html/Widgets/Form/Integer b/rt/share/html/Widgets/Form/Integer
index ac349e866..b8d8f90bf 100644
--- a/rt/share/html/Widgets/Form/Integer
+++ b/rt/share/html/Widgets/Form/Integer
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<%DOC>
-see docs/using_forms_widgets.pod
+see docs/extending/using_forms_widgets.pod
</%DOC>
<div id="form-box-<% lc $Name %>" class="widget">
<span class="label description"><% $Description %></span>
@@ -57,6 +57,8 @@ see docs/using_forms_widgets.pod
<span class="hints"><% $Hints %></span>
</div>
<%INIT>
+$_ = '' foreach grep !defined, $CurrentValue, $DefaultValue;
+$DefaultLabel ||= loc( 'Default: [_1]', $DefaultValue );
</%INIT>
<%ARGS>
$Name
@@ -68,15 +70,18 @@ $CurrentValue => '',
$Default => 0,
$DefaultValue => 0,
-$DefaultLabel => loc( 'Default: [_1]', $DefaultValue ),
+$DefaultLabel => undef
</%ARGS>
<%METHOD InputOnly>
-<input type="text" name="<% $Name %>" value="<% $CurrentValue || '' %>" />\
+<input type="text" name="<% $Name %>" value="<% $CurrentValue %>" />\
<%ARGS>
$Name
$CurrentValue => '',
</%ARGS>
+<%INIT>
+$CurrentValue = '' unless defined $CurrentValue;
+</%INIT>
</%METHOD>
<%METHOD Process>
diff --git a/rt/share/html/Widgets/Form/Select b/rt/share/html/Widgets/Form/Select
index 626ee2bd1..438f9ccd7 100644
--- a/rt/share/html/Widgets/Form/Select
+++ b/rt/share/html/Widgets/Form/Select
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -46,17 +46,19 @@
%#
%# END BPS TAGGED BLOCK }}}
<%DOC>
-see docs/using_forms_widgets.pod
+see docs/extending/using_forms_widgets.pod
</%DOC>
<div id="form-box-<% lc $Name %>" class="widget">
% if ( $Description ) {
<span class="label"><% $Description %></span>
% }
<span class="value"><& SELF:InputOnly, %ARGS &></span>
+<span class="hints"><% $Hints %></span>
</div>
<%ARGS>
$Name
$Description => undef,
+$Hints => ''
</%ARGS>
<%METHOD InputOnly>
diff --git a/rt/share/html/Widgets/Form/String b/rt/share/html/Widgets/Form/String
index 4a7c60fce..a5b3c6c22 100644
--- a/rt/share/html/Widgets/Form/String
+++ b/rt/share/html/Widgets/Form/String
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<%DOC>
-see docs/using_forms_widgets.pod
+see docs/extending/using_forms_widgets.pod
</%DOC>
<div id="form-box-<% lc $Name %>" class="widget">
<span class="description label"><% $Description %></span>