[Bps-public-commit] rt-extension-formtools branch, master, updated. 0.16-7-gd3b4801

Alex Vandiver alexmv at bestpractical.com
Wed May 28 12:48:58 EDT 2014


The branch, master has been updated
       via  d3b4801babd801ac580b6f2afd291828db4b9c8e (commit)
       via  e63e4b67655a1d15bc62e7acba64089be60a3b87 (commit)
      from  161e5345f20b35029b666b4d4b7de057203d7792 (commit)

Summary of changes:
 html/FormTools/Form | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit e63e4b67655a1d15bc62e7acba64089be60a3b87
Author: Matt Zagrabelny <mzagrabe at d.umn.edu>
Date:   Fri May 16 22:04:52 2014 -0500

    add include_tabs parameter to FormTools/Form
    
    Provide convenience option to toggle on /Elements/Tabs for non
    SelfService forms. Also document conditionals a bit and re-whitespace.

diff --git a/html/FormTools/Form b/html/FormTools/Form
index c70372a..08bbc81 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -3,6 +3,7 @@ $next
 $next_for_validation => undef
 $include_header      => 1
 $include_page_layout => 1
+$include_tabs        => 0
 $ShowBar             => 1
 $validation          => 0
 $forbid_persisting   => {}
@@ -86,10 +87,19 @@ $next_for_validation ||= $m->caller(1)->path;
 
 </%init>
 % if ($include_header) {
-<& $header_component, Title => $m->notes('page_title'), ShowBar => $ShowBar &>
-% if (! $self_service && $include_page_layout) {
-<& /Elements/PageLayout, title => $m->notes('page_title') &>
-% }
+      <& $header_component, Title => $m->notes('page_title'), ShowBar => $ShowBar &>
+%     # SelfService Header already calls /Elements/Tabs (which calls /Elements/PageLayout)
+%     # Thus it only makes sense to display either the Tabs or the PageLayout if we
+%     # are not rendering the SelfService environment.
+%     if (! $self_service) {
+%         if ($include_tabs) {
+              <& /Elements/Tabs &>
+%         } elsif ($include_page_layout) {
+%             # /Elements/Tabs already unconditionally calls the PageLayout component.
+%             # Thus it only makes sense to call it if we aren't "including" the tabs.
+              <& /Elements/PageLayout &>
+%         }
+%     }
 % }
 
 <& /Elements/ListActions, actions => \@results &>

commit d3b4801babd801ac580b6f2afd291828db4b9c8e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed May 28 12:48:01 2014 -0400

    Remove extraneous trailing / on SelfService header path

diff --git a/html/FormTools/Form b/html/FormTools/Form
index 08bbc81..d4e9d93 100644
--- a/html/FormTools/Form
+++ b/html/FormTools/Form
@@ -20,7 +20,7 @@ $form_id   = $m->interp->apply_escapes( $form_id,   'h')
 $form_name = $m->interp->apply_escapes( $form_name, 'h')
     if defined $form_name;
 
-my $header_component = $self_service ? '/SelfService/Elements/Header/' : '/Elements/Header';
+my $header_component = $self_service ? '/SelfService/Elements/Header' : '/Elements/Header';
 
 my %cfs = map { $_ => 1} @{ $m->notes('cfs_on_page') || [] };
 my %core_fields = map { $_ => 1} @{ $m->notes('core_fields_on_page') || [] };

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list