[Rt-commit] rtir branch, 2.9-trunk, updated. 2.6.1rc1-311-g87b6d1d

Ruslan Zakirov ruz at bestpractical.com
Mon Aug 22 21:02:50 EDT 2011


The branch, 2.9-trunk has been updated
       via  87b6d1d53f715c5482604f03b92510716051e7ac (commit)
       via  647d7f5ee074baf0b851bcded3f4a8e2e2ebb114 (commit)
       via  bea36d0ad9a45f093edd27270678afec0001eade (commit)
       via  9cfa116c3b9d0925e8ac37816fa2885042822b00 (commit)
       via  24cca1b3ea83d6aabbb6bddabd02667754f953c0 (commit)
       via  27b458db990e8e4df96082da889c06d80949de0f (commit)
       via  2021e821fcb5c9c2d0eca28702bc1f27710de9bd (commit)
      from  43dce85974c77552df0eda7268d90d9fe2783a8a (commit)

Summary of changes:
 html/RTIR/Create.html                   |    7 +------
 html/RTIR/Elements/UpdateData           |    2 +-
 html/RTIR/Forward.html                  |   26 +++++++++++++++++---------
 html/RTIR/Incident/Create.html          |    3 +--
 html/RTIR/Incident/Elements/ReplyForm   |   14 ++++++++------
 html/RTIR/Investigation/Elements/Create |   10 +++-------
 html/RTIR/Tools/ScriptedAction.html     |    4 ----
 7 files changed, 31 insertions(+), 35 deletions(-)

- Log -----------------------------------------------------------------
commit 2021e821fcb5c9c2d0eca28702bc1f27710de9bd
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 23 03:30:57 2011 +0400

    drop empty table row

diff --git a/html/RTIR/Tools/ScriptedAction.html b/html/RTIR/Tools/ScriptedAction.html
index ffbb380..7ae1fc7 100644
--- a/html/RTIR/Tools/ScriptedAction.html
+++ b/html/RTIR/Tools/ScriptedAction.html
@@ -128,10 +128,6 @@ foreach my $entry ( map $whois_servers->{ $_ }, sort keys %{$whois_servers} ) {
     <input type="text" name="TemplateArg" size="60" value="<% $ARGS{'TemplateArg'} %>" />
   </td>
 </tr>
-  <tr>
-    <td align="right" colspan="2">
-    </td>
-  </tr>
 </table>
 % if ($loop eq "IP") {
 <& /Elements/Submit, Name => "TestAddresses", Caption => loc("Test email addresses"), Label => loc("Test")&>

commit 27b458db990e8e4df96082da889c06d80949de0f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 23 03:37:15 2011 +0400

    apply classes: label, value and field names

diff --git a/html/RTIR/Elements/UpdateData b/html/RTIR/Elements/UpdateData
index 38b4df7..500989d 100644
--- a/html/RTIR/Elements/UpdateData
+++ b/html/RTIR/Elements/UpdateData
@@ -42,7 +42,7 @@
 </td></tr>
 % }
 
-<tr><td align="right" valign="top"><&|/l&>Message</&>:</td><td>
+<tr><td class="label" valign="top"><&|/l&>Message</&>:</td><td>
 % $m->callback( %ARGS, CallbackPage => '/Ticket/Update.html', CallbackName => 'BeforeMessageBox' );
 % if ( exists $ARGS{'UpdateContent'} ) {
 % delete $ARGS{'QuoteTransaction'};
diff --git a/html/RTIR/Forward.html b/html/RTIR/Forward.html
index e945f7d..e3bd83d 100644
--- a/html/RTIR/Forward.html
+++ b/html/RTIR/Forward.html
@@ -7,19 +7,27 @@
 <input type="hidden" class="hidden" name="id" value="<% $id %>" /><br />
 <input type="hidden" class="hidden" name="QuoteTransaction" value="<% $ARGS{'QuoteTransaction'} %>" />
 
-<table border="0">
+<table width="100%">
 
-<tr><td align="right"><&|/l&>Subject</&>:</td>
-<td><% $TicketObj->Subject %></td></tr>
+<tr class="subject">
+  <td class="label"><&|/l&>Subject</&>:</td>
+  <td class="value"><% $TicketObj->Subject %></td>
+</tr>
 
-<tr><td align="right"><&|/l&>To</&>:</td>
-<td><input type="text" name="To" size="60" value="<% $ARGS{'To'} %>" /></td></tr>
+<tr class="to">
+  <td class="label"><&|/l&>To</&>:</td>
+  <td class="value"><input type="text" name="To" size="60" value="<% $ARGS{'To'} %>" /></td>
+</tr>
 
-<tr><td align="right"><&|/l&>Cc</&>:</td>
-<td><input type="text" name="Cc" size="60" value="<% $ARGS{'Cc'} %>" /></td></tr>
+<tr class="cc">
+  <td class="label"><&|/l&>Cc</&>:</td>
+  <td class="value"><input type="text" name="Cc" size="60" value="<% $ARGS{'Cc'} %>" /></td>
+</tr>
 
-<tr><td align="right"><&|/l&>BCc</&>:</td>
-<td><input type="text" name="Bcc" size="60" value="<% $ARGS{'Bcc'} %>" /></td></tr>
+<tr class="bcc">
+  <td class="label"><&|/l&>BCc</&>:</td>
+  <td class="value"><input type="text" name="Bcc" size="60" value="<% $ARGS{'Bcc'} %>" /></td>
+</tr>
 
 </table>
 
diff --git a/html/RTIR/Incident/Elements/ReplyForm b/html/RTIR/Incident/Elements/ReplyForm
index 197a513..47faa92 100644
--- a/html/RTIR/Incident/Elements/ReplyForm
+++ b/html/RTIR/Incident/Elements/ReplyForm
@@ -1,10 +1,11 @@
 <&| /Widgets/TitleBox, title => $Title &>
 
-<table>
-<tr><td align="right"><&|/l&>Subject</&>:</td>
-<td><i>(<&|/l&>uses subjects from tickets</&>)</i></td></tr>
+<table width="100%">
+<tr class="subject"><td class="label"><&|/l&>Subject</&>:</td>
+<td class="value"><i>(<&|/l&>uses subjects from tickets</&>)</i></td></tr>
 
-<tr><td align="right"><&|/l&>Update Type</&>:</td><td>
+<tr><td class="label"><&|/l&>Update Type</&>:</td>
+<td class="value">
 <select name="UpdateType">
 % if( $AllowComment ) {
   <option value="private" <% $CommentDefault %>><&|/l&>Comments (Not sent to requestors)</&></option>
@@ -30,7 +31,8 @@
 &></td></tr>
 % }
 
-<tr><td class="label"><&|/l&>Owner</&>:</td><td>
+<tr class="owner"><td class="label"><&|/l&>Owner</&>:</td>
+<td class="value">
 <& /Elements/SelectOwner,
     Name    => "Owner",
     Default => $Owner || $session{'CurrentUser'}->Id || undef,

commit 24cca1b3ea83d6aabbb6bddabd02667754f953c0
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 23 04:07:50 2011 +0400

    use status from config for Invs and Reports on create

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 53db5e0..35fef8f 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -329,14 +329,9 @@ if ( $m->comp_exists("/RTIR/$Type/Create.html") ) {
     return $m->comp( "/RTIR/$Type/Create.html", %ARGS );
 }
 
-my ($Status, $name);
+my ($name);
 if ( $Type eq 'Report' ) {
     $name = 'Incident Report';
-    $Status = 'new';
-} elsif ( $Type eq 'Investigation' ) {
-    $Status = 'open';
-} elsif ( $Type eq 'Block' ) {
-    $Status = 'active';
 }
 $name ||= $Type;
 

commit 9cfa116c3b9d0925e8ac37816fa2885042822b00
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 23 04:29:55 2011 +0400

    status and queue are special to inherit them on create

diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 484e2ee..11bd1e2 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -1,6 +1,5 @@
-% foreach my $field( qw(Queue Status) ) {
-<input type="hidden" name="<% $NamePrefix . $field %>" value="<% $value_cb->( $field ) %>" />
-% }
+<input type="hidden" name="<% $NamePrefix %>Queue" value="<% $QueueObj->id %>" />
+<input type="hidden" name="<% $NamePrefix %>Status" value="<% $ARGS{ $NamePrefix .'Status' } || $QueueObj->Lifecycle->DefaultOnCreate %>" />
 
 <div class="ticket-create-basics">
 <&| /Widgets/TitleBox, title => loc("Basics"), class => 'ticket-info-basics' &>
@@ -146,16 +145,12 @@ $TicketObj => undef
 %SkipField => ()
 </%ARGS>
 <%INIT>
-my %DEFAULTS = (
-    Status => 'open',
-);
 my $value_cb = sub {
     my $name = shift;
     my $full_name = $NamePrefix . $name;
     my $value;
     $value = $ARGS{     $full_name };
     $value = $ARGS{     $name } unless defined $value;
-    $value = $DEFAULTS{ $name } unless defined $value;
     $value = ''                 unless defined $value;
     return $value;
 };
@@ -166,6 +161,7 @@ unless ( $QueueObj ) {
         $QueueObj->Load( $queue );
     }
 }
+
 if ( RT->Config->Get('GnuPG')->{'Enable'} ) {
     foreach ( qw(Sign Encrypt) ) {
         $ARGS{ $NamePrefix . $_ } = $m->comp( '/Widgets/Form/Boolean:Process',

commit bea36d0ad9a45f093edd27270678afec0001eade
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 23 04:38:37 2011 +0400

    don't set default for status
    
    it's required here only to pick default value for Resolution CF,
    no need to set default if value is not provided

diff --git a/html/RTIR/Incident/Elements/ReplyForm b/html/RTIR/Incident/Elements/ReplyForm
index 47faa92..b0b15f6 100644
--- a/html/RTIR/Incident/Elements/ReplyForm
+++ b/html/RTIR/Incident/Elements/ReplyForm
@@ -73,5 +73,5 @@ $AllowResponse => 1,
 $Owner         => undef,
 
 $TicketObj     => undef,
-$Status        => 'open',
+$Status        => '',
 </%ARGS>

commit 647d7f5ee074baf0b851bcded3f4a8e2e2ebb114
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 23 04:41:07 2011 +0400

    use default status from config on incident create

diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 91430c5..cc31683 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -86,7 +86,7 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
         Name => 'Status',
         QueueObj => $QueueObj,
         DefaultValue => 0,
-        Default => 'open',
+        Default => $ARGS{Status} || $QueueObj->Lifecycle->DefaultOnCreate,
     &>
   </td>
 </tr>

commit 87b6d1d53f715c5482604f03b92510716051e7ac
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 23 04:41:32 2011 +0400

    don't hardcode status of a new Investigation

diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index cc31683..dfe0720 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -263,7 +263,6 @@ unless ( exists $ARGS{'Content'} ) {
     %ARGS,
     NamePrefix => 'Investigation',
     Queue => 'Investigations',
-    Status => 'open',
     SkipField => { Owner => 1, Attachments => 1, DateFields => 1 },
 &>
 <& /Elements/Submit,

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


More information about the Rt-commit mailing list