[Rt-commit] rt branch, 4.0/fix-edit-custom-fields-wrapping-tag, updated. rt-4.0.1-130-g36e671b
Ruslan Zakirov
ruz at bestpractical.com
Wed Aug 17 18:13:59 EDT 2011
The branch, 4.0/fix-edit-custom-fields-wrapping-tag has been updated
via 36e671b4b905f62bd10d1672f21f953246515bfa (commit)
via 5d1c389f7f5e7a7e92c7e236929b63b929804a3d (commit)
via 76f56fb13f8939ed065a3fddc474124446ad041c (commit)
from 99f8b5c56d5f1a22c49b732dd282cf3f58fa66d4 (commit)
Summary of changes:
share/html/Ticket/Create.html | 4 ++--
share/html/Ticket/Elements/EditCustomFields | 1 +
.../Ticket/Elements/EditTransactionCustomFields | 16 ++++++++++++++--
3 files changed, 17 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 76f56fb13f8939ed065a3fddc474124446ad041c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 01:21:17 2011 +0400
AsTable ||= InTable
If we say that comp called inside open <table> tag then
for sure we should use tr/td's for layout
diff --git a/share/html/Ticket/Elements/EditCustomFields b/share/html/Ticket/Elements/EditCustomFields
index 6efd6ab..d4e2f73 100755
--- a/share/html/Ticket/Elements/EditCustomFields
+++ b/share/html/Ticket/Elements/EditCustomFields
@@ -92,6 +92,7 @@ if ($TicketObj && !$OnCreate) {
$m->callback( %ARGS, CallbackName => 'MassageCustomFields', CustomFields => $CustomFields );
+$AsTable ||= $InTable;
my $FIELD = $AsTable ? 'tr' : 'div';
my $CELL = $AsTable ? 'td' : 'div';
my $WRAP = '';
commit 5d1c389f7f5e7a7e92c7e236929b63b929804a3d
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 01:42:22 2011 +0400
sync with Ticket/Elements/EditCustomFields
diff --git a/share/html/Ticket/Elements/EditTransactionCustomFields b/share/html/Ticket/Elements/EditTransactionCustomFields
index 4da90c6..014a0b7 100644
--- a/share/html/Ticket/Elements/EditTransactionCustomFields
+++ b/share/html/Ticket/Elements/EditTransactionCustomFields
@@ -46,7 +46,9 @@
%#
%# END BPS TAGGED BLOCK }}}
% $m->callback( CallbackName => 'BeforeTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix );
-<div class="edit-transaction-custom-fields">
+% if ( $WRAP ) {
+<<% $WRAP %> class="edit-transaction-custom-fields">
+% }
% if ($CustomFields->Count) {
% while (my $CF = $CustomFields->Next()) {
% next unless $CF->CurrentUserHasRight('ModifyCustomField');
@@ -68,7 +70,9 @@
</<% $FIELD %>>
% }
% }
-</div>
+% if ( $WRAP ) {
+</<% $WRAP %>>
+% }
% $m->callback( CallbackName => 'AfterTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix );
<%INIT>
@@ -82,8 +86,15 @@ if ($TicketObj) {
$m->callback( CallbackName => 'MassageTransactionCustomFields', CustomFields => $CustomFields );
+$AsTable ||= $InTable;
my $FIELD = $AsTable ? 'tr' : 'div';
my $CELL = $AsTable ? 'td' : 'div';
+my $WRAP = '';
+if ( $AsTable ) {
+ $WRAP = 'table' unless $InTable;
+} else {
+ $WRAP = 'div';
+}
</%INIT>
<%ARGS>
@@ -91,5 +102,6 @@ $NamePrefix => "Object-RT::Transaction--CustomField-"
$TicketObj => undef
$QueueObj => undef
$AsTable => 0
+$InTable => 0
</%ARGS>
commit 36e671b4b905f62bd10d1672f21f953246515bfa
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 01:43:35 2011 +0400
we want InTable instead of AsTable
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index fb70c2b..0a65de4 100755
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -101,8 +101,8 @@
% $m->callback( CallbackName => 'AfterOwner', ARGSRef => \%ARGS );
- <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, AsTable => 1 &>
- <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, AsTable => 1 &>
+ <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &>
+ <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &>
</table>
</&>
% $m->callback( CallbackName => 'AfterBasics', QueueObj => $QueueObj );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list