[Bps-public-commit] rt-extension-formtools branch, master, updated. 0.12-2-gf968ce3
Jim Brandt
jbrandt at bestpractical.com
Tue Nov 20 14:59:50 EST 2012
The branch, master has been updated
via f968ce3aa7581a134814faf0549d480ca92fb591 (commit)
via 43403f598107b6d7ae9122bdfdb72905ebf6bacf (commit)
from 854b923df92235095947a3744a6d1444268444c5 (commit)
Summary of changes:
html/FormTools/Field | 6 ++++--
lib/RT/Extension/FormTools.pm | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 43403f598107b6d7ae9122bdfdb72905ebf6bacf
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue Nov 20 10:47:11 2012 -0500
Add configuration hooks for form labels and input fields
FormTools creates tables for each form element it creates
and you sometimes want to add some text next to the label
that is not part of the label, like a link or footnote.
Likewise, you sometimes want to add some additional text after
the input field in the table created for the input.
This commit adds two configuration variables that can accept HTML to
add this additional text.
diff --git a/html/FormTools/Field b/html/FormTools/Field
index 6e6a2ee..5de5056 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -12,6 +12,8 @@ $show_label => 1
$disables => {}
$enabled_by => []
$container_selector => undef
+$after_label => ''
+$after_input => ''
</%args>
<%init>
use RT::Extension::FormTools;
@@ -119,7 +121,7 @@ $default = '' unless defined $default;
% } else {
% if ($render_as ne 'hidden' && $show_label) { # no label if hidden
-<table style="display: inline; "><tr><th valign="top"><label><%$field_label%></label></th><td style="display:block;">
+<table style="display: inline; "><tr><th valign="top"><label><%$field_label%></label><% $after_label |n %></th><td style="display:block;">
% }
% if ($field_type eq 'core') {
@@ -283,6 +285,6 @@ $default = '' unless defined $default;
% }
% if ($render_as ne 'hidden' && $show_label) {
-</td></tr></table>
+</td><% $after_input |n %></tr></table>
% }
% }
commit f968ce3aa7581a134814faf0549d480ca92fb591
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue Nov 20 14:59:18 2012 -0500
New version number
diff --git a/lib/RT/Extension/FormTools.pm b/lib/RT/Extension/FormTools.pm
index 0659755..5f7db47 100644
--- a/lib/RT/Extension/FormTools.pm
+++ b/lib/RT/Extension/FormTools.pm
@@ -3,7 +3,7 @@ use strict;
package RT::Extension::FormTools;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
=head2 is_core_field
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list