[Rt-commit] rt branch, 4.0/fix-edit-custom-fields-wrapping-tag, created. rt-4.0.1-127-g99f8b5c
Ruslan Zakirov
ruz at bestpractical.com
Tue Jul 26 15:47:54 EDT 2011
The branch, 4.0/fix-edit-custom-fields-wrapping-tag has been created
at 99f8b5c56d5f1a22c49b732dd282cf3f58fa66d4 (commit)
- Log -----------------------------------------------------------------
commit 99f8b5c56d5f1a22c49b732dd282cf3f58fa66d4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Tue Jul 26 23:35:13 2011 +0400
div inside tables between trs are bad
make AsTable => 1 wrap things into table tag
InTable => 1 omits table tag
diff --git a/share/html/Ticket/Elements/EditCustomFields b/share/html/Ticket/Elements/EditCustomFields
index b4c36d4..6efd6ab 100755
--- a/share/html/Ticket/Elements/EditCustomFields
+++ b/share/html/Ticket/Elements/EditCustomFields
@@ -46,7 +46,9 @@
%#
%# END BPS TAGGED BLOCK }}}
% $m->callback( %ARGS, CallbackName => 'BeforeCustomFields' );
-<div class="edit-custom-fields">
+% if ( $WRAP ) {
+<<% $WRAP %> class="edit-custom-fields">
+% }
% while ( my $CustomField = $CustomFields->Next ) {
% next unless $CustomField->CurrentUserHasRight('ModifyCustomField');
% my $Type = $CustomField->Type || 'Unknown';
@@ -73,7 +75,9 @@
</<% $FIELD %>>
% }
-</div>
+% if ( $WRAP ) {
+</<% $WRAP %>>
+% }
% $m->callback( %ARGS, CallbackName => 'AfterCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj );
<%INIT>
my $CustomFields;
@@ -90,6 +94,12 @@ $m->callback( %ARGS, CallbackName => 'MassageCustomFields', CustomFields => $Cus
my $FIELD = $AsTable ? 'tr' : 'div';
my $CELL = $AsTable ? 'td' : 'div';
+my $WRAP = '';
+if ( $AsTable ) {
+ $WRAP = 'table' unless $InTable;
+} else {
+ $WRAP = 'div';
+}
</%INIT>
<%ARGS>
@@ -99,4 +109,5 @@ $QueueObj => undef
$OnCreate => undef
$DefaultsFromTopArguments => 1
$AsTable => 0
+$InTable => 0
</%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list