[Rt-commit] rt branch, create-action, updated. 3df50be2b5f175986a3bbd95e9654b0265ca0ca5

sartak at bestpractical.com sartak at bestpractical.com
Tue Sep 1 09:56:00 EDT 2009


The branch, create-action has been updated
       via  3df50be2b5f175986a3bbd95e9654b0265ca0ca5 (commit)
       via  e70683e36232fae9b8981188092fa71bcb67f05b (commit)
      from  c0866113b02e420277075e32f4655c3a89371bac (commit)

Summary of changes:
 lib/RT/View/Ticket/Create.pm |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit e70683e36232fae9b8981188092fa71bcb67f05b
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Sep 1 09:49:17 2009 -0400

    Use $create->button instead of render_action/form_submit

diff --git a/lib/RT/View/Ticket/Create.pm b/lib/RT/View/Ticket/Create.pm
index 4f38833..27f266e 100644
--- a/lib/RT/View/Ticket/Create.pm
+++ b/lib/RT/View/Ticket/Create.pm
@@ -70,8 +70,7 @@ template 'create' => page {
 
     form {
         form_next_page url => '/Ticket/Display.html';
-        render_action $create;
-        form_submit( label => _('Create') );
+        $create->button(label => _('Create'));
     };
 };
 

commit 3df50be2b5f175986a3bbd95e9654b0265ca0ca5
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Sep 1 09:55:48 2009 -0400

    Add the basics/details breakdown

diff --git a/lib/RT/View/Ticket/Create.pm b/lib/RT/View/Ticket/Create.pm
index 27f266e..72dde7f 100644
--- a/lib/RT/View/Ticket/Create.pm
+++ b/lib/RT/View/Ticket/Create.pm
@@ -61,7 +61,15 @@ template 'create' => page {
         moniker => 'create_ticket',
     );
 
-    my $actions;
+    my $actions = {
+        A => {
+            html => q[<a href="#basics" onclick="jQuery('#Ticket-Create-details').hide(); jQuery('#Ticket-Create-basics').show(); return false;">] . _('Show basics') . q[</a>],
+        },
+        B => {
+            html => q[<a href="#details" onclick="jQuery('#Ticket-Create-basics').hide(); jQuery('#Ticket-Create-details').show(); return false;">] . _('Show details') . q[</a>],
+        },
+    };
+
     render_mason('/Elements/Tabs', {
         current_toptab => 'ticket/create',
         title          => _("Create a new ticket"),
@@ -70,9 +78,31 @@ template 'create' => page {
 
     form {
         form_next_page url => '/Ticket/Display.html';
-        $create->button(label => _('Create'));
+
+        show_basics($create);
+        show_details($create);
     };
 };
 
+sub show_basics {
+    my $create = shift;
+
+    div {
+        attr { id => "Ticket-Create-basics" };
+        h1 { "Basics" };
+        $create->button(label => _('Create'));
+    };
+}
+
+sub show_details {
+    my $create = shift;
+
+    div {
+        attr { id => "Ticket-Create-details" };
+        h1 { "Details" };
+        $create->button(label => _('Create'));
+    };
+}
+
 1;
 

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


More information about the Rt-commit mailing list