[Rt-commit] rtir branch, 2.9-trunk, updated. 2.6.0-243-g95f68e1

Ruslan Zakirov ruz at bestpractical.com
Tue Jul 26 14:50:06 EDT 2011


The branch, 2.9-trunk has been updated
       via  95f68e13a14b3513ab24de55cabc1b3146d6e66e (commit)
       via  5c4c2b6334be26c9380218145b3174bb86241f39 (commit)
       via  368171acea60f0111e52501352ac3b0f1971786c (commit)
       via  b48d9816587988cd54498f6da3a507f6bf26e9d0 (commit)
       via  1980249deed2cb388d077b14f4f6bd5c464bf5f0 (commit)
       via  872851c2244154cbb5f6aa135d30d8df1cb96d0c (commit)
       via  23fc602c4508f56abc918e75a838aef92261141f (commit)
       via  18d8d6c3d30783a3ace7dba8a5ead0f6cfbfac0d (commit)
       via  c29f9077c65c9c6777987d9d8ea38ebb17296aac (commit)
       via  fac4bbbad452067105a5ae7b0ea1ea5d76bf236e (commit)
       via  a7c0281c07377d684d3c81f9e4edf4cd13b7a00e (commit)
       via  9582e6bb0d23ec7e962df314fb4889e7642c5ae7 (commit)
       via  b778d01aafccee3f6447e4c94e49e2da29228967 (commit)
       via  30755f998476714c3bb78fc62791b668b45d9fc2 (commit)
       via  6f24881c3d4739a8e11ff1dcabbebfbbbbc86209 (commit)
       via  9e7b4777d14703e3d045099c96624ed3af64c1f9 (commit)
       via  28e069a23658b27e93794c42e7dd36dbbcc0dab1 (commit)
       via  5f728aa66e844e0de26bec28960d80d3435532c9 (commit)
       via  8d9f3043eac6a91f3c720cec6c6363fc42c44d13 (commit)
       via  d75108353c724834201b2333d8cd0e7fb00413b6 (commit)
       via  ad5b9336cbb171a7f1737a6368dcec8e69f6fe75 (commit)
       via  14c29f1718b2dc9025412e733b46a63e9f6318ed (commit)
       via  281985696ef15ea0732ea8fe2828de9c19dc2ee4 (commit)
       via  52610a77e6dddefbb007de1683d473729f4f94c2 (commit)
       via  5405fea7935f8c6dbbd7563389a9789681644089 (commit)
       via  a7a82b7619677f5eaa8520f73bcc93ee4273a475 (commit)
       via  332d8761a5961ee050e90bfd42837dbc6b9addc6 (commit)
       via  f0012df9a18deba5978d963d0af7c32e3a051362 (commit)
       via  6a431a5c21a617e865029d368a86ff79b297ebba (commit)
       via  5cbc76e1e1b79aafcbb4379a4614e2c9f5506553 (commit)
       via  424efdab2de3e43cf923ab7d7b61c9632cfec7e4 (commit)
       via  a51c19d33840cf7401adb653e77b807d16768caf (commit)
       via  f0bee106e1a7ae48d24717a0ec4e5b7a172a4246 (commit)
       via  c7e91dd5cc9cf1f40d53a912fe376ed17b3cfbfa (commit)
       via  11c9e63634ef00eccc393b11902c4e6720bf2ddf (commit)
       via  44f7bf4deef3bd06a6d085164323cbe224966b6b (commit)
       via  1d8a2d785aa5c17446b9d4329be099d8f34a7b49 (commit)
       via  cb6a58df0e6138d53473decff307cf3c14e3bad3 (commit)
       via  8e3872cbb0fe1ca91800a28d8ae34231981d2c3f (commit)
       via  1b8fc04e566a60eafada00c26bbff32eeaf95390 (commit)
       via  0d5c03560d682f33182a8cc7edb169f9558efe75 (commit)
       via  a1a16c233490f01b035c08736d909f1c8e7badba (commit)
       via  a7b6283a300a39fef4aa7434cb9b41ecd1e2c144 (commit)
       via  2745f9cd2786b4764b3f09545f49357276e14584 (commit)
       via  8528a2c86803853fab84ae30586c79737732ee2e (commit)
       via  dea410d508cc53b69cd16f28abfd1d643278dbc8 (commit)
       via  a4820b59246cc5710a4f6a74e24e16c9af11cdfc (commit)
       via  468af915ec77a365aef6380a557c7715fc4d8366 (commit)
       via  c3bd64778b541655c92d4d57f862ebb87965c307 (commit)
       via  c2ec1fde717e8e1ad7cd7e560817a98623f6cd9b (commit)
       via  b6459a429e4186e34ec74784e622a4a9e4a8384d (commit)
       via  5ef44cb6ffb2c5624172200d2e7972d5cbc01855 (commit)
       via  03da1acacb9af8bf2dc601ba44b03f4432b9e309 (commit)
       via  158b1d49e7d4517129d8e460710f6e9165061b9c (commit)
       via  e477a5687ec967676130da7aec4c6c68b626040d (commit)
       via  e9b90850e2660fb7f41fe834ccb7e283ea5556ef (commit)
       via  689f65d62757c188250a7d677910d72856755682 (commit)
       via  17fe5faf08cb7f0dbac902bd6121850bbb9ae747 (commit)
       via  9b1bd9493908924a1d4a4630d8eb2c1498f7dbf0 (commit)
       via  987d7a4a848c4c8f10efb6b0a0776d0bcf348257 (commit)
       via  f06905e37f62c23480b50a3fdfa5e70f1c09e038 (commit)
       via  3e4f037a118d122f50fd250232179f88bd80c5c5 (commit)
       via  6978c200e79d15d8d047e379dfc884099c4f32d3 (commit)
       via  6f162566333a2a88450167f087a9ae8329bd60b4 (commit)
       via  03fe69a84b1e97c75d87ff730f4799e83ef99c82 (commit)
       via  8e2f82f59c6678ce7f6ba1f20894c54f80ea1d91 (commit)
       via  88077233fa4bca2d0da4704bcf026d4482495dba (commit)
       via  32b179914aa00db7b58413199eda44500c232299 (commit)
       via  4a33de1b3a9ae7278f1f81edc0bf1e1b543e1c48 (commit)
       via  4dde56b57249a878e793f61a1ca30b48c3e18fc6 (commit)
       via  3d11b0e237564b54fc48220d7f1687fda60d3c41 (commit)
       via  99385da3a68381f694e74254254efa3499e86a74 (commit)
       via  05f999fce3cc9d21b14a4df12b1811f2b9ab729b (commit)
       via  dfef5d827c84a16bf9cc857c5c98097273020730 (commit)
       via  5e6f798b53c6d6c4873c5e404718301b53aede84 (commit)
       via  1995f35012fef0b7af6f90f2a69b9d604c18390d (commit)
       via  84ab4b78cfe50f8a41d1de0b0cdce53e23f58136 (commit)
       via  97f7bfe71a782b1f80ce35b7a7044b421d4ad443 (commit)
       via  611986d7848efc2c6d0d9de3d7dcf55b72175912 (commit)
       via  bca08250f9a12cfb27fa3d0fbcc13d02cb56ecbb (commit)
       via  2d1ba1e6cb4783d78b0ee24105796076cf022523 (commit)
       via  be08ce6942603a9034f4f11be8e2c6f4faba7f2a (commit)
       via  1ec723bb96ad613b3b3c348c07ad8ba3aa7bf20a (commit)
       via  c213cbd33733e42c110c102b301b9184c2c5abec (commit)
       via  32098621d7119c4df37a87dd656c9162bcf202cf (commit)
      from  ba5ef7a7b7ee36f3a20a0f5ff95aaf2c4d0510a2 (commit)

Summary of changes:
 .perlcriticrc                                      |   41 +++
 CHANGES                                            |   44 +++-
 MANIFEST                                           |    8 +
 MANIFEST.SKIP                                      |    3 +-
 META.yml                                           |    2 +-
 README                                             |    2 +
 TODO.porting_over_RT4                              |   13 +-
 UPGRADING                                          |   18 +-
 etc/RTIR_Config.pm                                 |   47 +++-
 etc/initialdata                                    |    6 +-
 etc/upgrade/2.5.1/content                          |    2 +-
 html/Callbacks/RTIR/Elements/ColumnMap/Once        |   26 --
 .../RTIR/Elements/RT__Ticket/ColumnMap/Once        |   22 --
 html/RTIR/Advanced.html                            |    2 +-
 html/RTIR/Display.html                             |    2 +-
 html/RTIR/Edit.html                                |    2 +-
 html/RTIR/Elements/PickRestriction                 |    6 +-
 html/RTIR/Incident/Create.html                     |  210 ++++++++----
 html/RTIR/Incident/Display.html                    |    4 +-
 html/RTIR/Incident/Edit.html                       |    2 +-
 html/RTIR/Incident/Elements/Create                 |   15 +-
 html/RTIR/Investigation/Elements/Create            |  110 ++++---
 html/RTIR/NoAuth/webrtir.css                       |   39 ++-
 html/RTIR/Tools/Elements/LookupRelatedTickets      |   60 ++++
 html/RTIR/Tools/Elements/ToolFormIframe            |   23 ++
 html/RTIR/Tools/Elements/ToolFormTraceroute        |    8 +
 html/RTIR/Tools/Elements/ToolFormWhois             |   24 ++
 html/RTIR/Tools/Elements/ToolResultsIframe         |   15 +
 html/RTIR/Tools/Elements/ToolResultsWhois          |   78 +++++
 html/RTIR/Tools/Elements/Tools                     |   14 +
 html/RTIR/Tools/Lookup.html                        |  195 +----------
 html/RTIR/Tools/ScriptedAction.html                |    8 +-
 html/RTIR/Update.html                              |    2 +-
 lib/RT/IR.pm                                       |   16 +-
 lib/RT/IR/Config.pm                                |    2 +
 po/rtir.pot                                        |  366 ++++++++------------
 t/custom-fields/defaults-on-linking.t              |   16 +-
 t/gnupg/on-update.t                                |    1 -
 38 files changed, 847 insertions(+), 607 deletions(-)
 create mode 100644 .perlcriticrc
 delete mode 100644 html/Callbacks/RTIR/Elements/ColumnMap/Once
 create mode 100644 html/RTIR/Tools/Elements/LookupRelatedTickets
 create mode 100644 html/RTIR/Tools/Elements/ToolFormIframe
 create mode 100644 html/RTIR/Tools/Elements/ToolFormTraceroute
 create mode 100644 html/RTIR/Tools/Elements/ToolFormWhois
 create mode 100644 html/RTIR/Tools/Elements/ToolResultsIframe
 create mode 100644 html/RTIR/Tools/Elements/ToolResultsWhois
 create mode 100644 html/RTIR/Tools/Elements/Tools

- Log -----------------------------------------------------------------
commit 872851c2244154cbb5f6aa135d30d8df1cb96d0c
Merge: ba5ef7a 23fc602
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Jul 22 05:30:06 2011 +0400

    Merge branch '2.6-trunk' into 2.9-trunk
    
    Conflicts:
    	.gitignore
    	MANIFEST.SKIP
    	META.yml
    	README
    	html/RTIR/Incident/Display.html
    	inc/Module/Install.pm
    	inc/Module/Install/AutoInstall.pm
    	inc/Module/Install/Base.pm
    	inc/Module/Install/Can.pm
    	inc/Module/Install/Fetch.pm
    	inc/Module/Install/Include.pm
    	inc/Module/Install/Makefile.pm
    	inc/Module/Install/Metadata.pm
    	inc/Module/Install/RTx.pm
    	inc/Module/Install/Win32.pm
    	inc/Module/Install/WriteAll.pm
    	lib/RT/IR.pm
    	t/custom-fields/defaults-on-linking.t

diff --cc README
index daa2f3c,ded2982..c34f023
--- a/README
+++ b/README
@@@ -14,7 -14,10 +14,9 @@@ or RTIR, please contact Best Practical 
  REQUIRED PACKAGES:
  ------------------
  
 -o   RT 3.8.3 or later, configured, installed and tested.
 -o   RTFM 2.4.1 or later, configured, installed and tested.
 +o RT 4.0.0 or later, configured, installed and tested.
+ o   Net::Whois::RIPE 1.31 or OLDER, later versions broke
+     backwards compatibility
  
  
  Upgrade instructions:
diff --cc html/RTIR/Incident/Display.html
index a1f752b,c1ef72c..90a6c1c
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@@ -274,35 -304,6 +276,35 @@@ if ( $deleted_links ) 
      }
  }
  
 +if ( $ARGS{'BulkArticles'} && @SelectedTickets ) {
 +    my $ref = join " ", map "a:$_", @SelectedTickets;
 +    push @results, ProcessTicketLinks(
 +        TicketObj => $TicketObj,
 +        ARGSRef => {$TicketObj->Id."-RefersTo" => $ref}
 +    );
 +}
 +
 +unless( $new_ticket ) {
 +    $ARGS{UpdateAttachments} = delete $session{'Attachments'};
 +    push @results, ProcessUpdateMessage( ARGSRef => \%ARGS, TicketObj => $TicketObj );
 +}
 +
 +MaybeRedirectForResults(
 +    Actions   => \@results,
 +    Path      => "/RTIR/Display.html",
 +    Arguments => { id => $TicketObj->id },
 +);
 +
 +# XXX: need the way to show @results when aborting
 +unless ( $TicketObj->CurrentUserHasRight('ShowTicket') ) {
 +    Abort("No permission to view ticket #$id.");
 +}
 +
 +my $TimeWorked = $TicketObj->TimeWorked;
- if ( $TicketObj->TimeLeft > 0 ) {
++if ( defined $TicketObj->TimeLeft && $TicketObj->TimeLeft > 0 ) {
 +    $TimeWorked .= '/'. $TicketObj->TimeLeft;
 +}
 +
  my $attachments = $m->comp('/Ticket/Elements/FindAttachments', Ticket => $TicketObj);
  
  </%INIT>
diff --cc html/RTIR/Tools/Lookup.html
index 39b6d00,2913ffb..77870f5
--- a/html/RTIR/Tools/Lookup.html
+++ b/html/RTIR/Tools/Lookup.html
@@@ -23,11 -23,16 +23,11 @@@
  %# 
  %# END LICENSE BLOCK
  <& /RTIR/Elements/Header, Title => $title &>
 -<& /RTIR/Tools/Elements/Tabs, 
 -    current_toptab => 'RTIR/Tools/Lookup.html',
 -    current_tab    => 'RTIR/Tools/Lookup.html?NewSearch=1',
 -    current_subtab => $current_subtab,
 -    Title          => $title,
 -&>
 +<& /Elements/Tabs &>
  
- % if ( $ticket ) {
+ % if ( $TicketObj->id ) {
  <&| /Widgets/TitleBox, title => loc("Current [_1]: #[_2]", $TicketType, $ticket), class => 'ticket-info-basics' &>
- <& /Elements/TicketList, Query => "id = $ticket", Format => $Format, ShowNavigation => 0 &>
+ <& /Elements/TicketList, Query => "id = $ticket", Format => RT->Config->Get('RTIRSearchResultFormats')->{$TicketType . 'Default'}, ShowNavigation => 0 &>
  </&>
  % }
  
diff --cc lib/RT/IR.pm
index 7b191f7,0328486..b7b5f14
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@@ -44,13 -44,14 +44,14 @@@
  # 
  # }}} END BPS TAGGED BLOCK
  #
 -package RT::IR;
 -
  use 5.008003;
 -use warnings;
  use strict;
 +use warnings;
 +
 +package RT::IR;
  
- our $VERSION = '2.5.7';
+ our $VERSION = '2.6.0';
+ 
  
  use Business::Hours;
  use Business::SLA;
@@@ -219,191 -214,10 +220,192 @@@ sub States 
      }
  
      my %seen = ();
-     return sort grep !$seen{$_}++, @states;
+     @states = sort grep !$seen{$_}++, @states;
+     return @states;
  }
  
 +sub NewQuery {
 +    my $self = shift;
 +    my %args = (
 +        Queue => undef,
 +        states => undef,
 +        add_states => undef,
 +        @_,
 +    );
 +    my @states = ref $args{'states'}? @{ $args{'states'} } : ( $args{'states'} );
 +    @states = grep $_, @states;
 +    unless( @states ) {
 +        @states = RT::IR::States( %args );
 +    }
 +
 +    my @add_states = ref $args{'add_states'}? @{ $args{'add_states'} } : ( $args{'add_states'} );
 +    my %seen = ();
 +    @states =  grep !$seen{$_}++, map lc, grep $_, @states, @add_states;
 +
 +    my $query = join " OR ",
 +                map "'Status' = '$_'",
 +                @states;
 +    $query = "( $query )" if $query;
 +    return $query;
 +}
 +
 +
 +sub BaseQuery {
 +    my $self = shift;
 +    my %args = (
 +        Queue        => undef,
 +        Status       => undef,
 +        Active       => undef,
 +        Exclude      => undef,
 +        HasMember    => undef,
 +        HasNoMember  => undef,
 +        MemberOf     => undef,
 +        NotMemberOf  => undef,
 +        Constituency => undef,
 +        @_
 +    );
 +    my $res = '';
 +    if ( $args{'Queue'} ) {
 +        my $qname = ref $args{'Queue'} ? $args{'Queue'}->Name : $args{'Queue'};
 +        $res = "Queue = '$qname'";
 +        if ( defined $args{'Active'} ) {
 +            my $queue = $args{'Queue'};
 +            unless ( ref $args{'Queue'} ) {
 +                my $queue = RT::Queue->new( RT->SystemUser );
 +                $queue->Load( $args{'Queue'} );
 +                unless ( $queue->id ) {
 +                    $RT::Logger->error("Couldn't load queue '$args{Queue}'");
 +                    $queue = undef;
 +                }
 +            }
 +
 +            if ( $queue ) {
 +                my @statuses = $args{'Active'}
 +                    ? $queue->ActiveStatusArray
 +                    : $queue->InactiveStatusArray;
 +                $res .= ' AND ('. join( ' OR ', map "Status = '$_'", @statuses ) .')';
 +            }
 +        }
 +    }
 +    if ( my $s = $args{'Status'} ) {
 +        $res .= ' AND ' if $res;
 +        $res .= '('. join( ' OR ', map "Status = '$_'", ref $s? (@$s) : ($s) ) .')';
 +    }
 +    if ( my $t = $args{'Exclude'} ) {
 +        $res .= ' AND ' if $res;
 +        $res .= '('. join( ' AND ', map "id != '$_'", map int $_, ref $t? (@$t) : ($t) ) .')';
 +    }
 +    if ( my $t = $args{'HasMember'} ) {
 +        $res .= ' AND ' if $res;
 +        $res .= 'HasMember = '. (ref $t? $t->id : int $t);
 +    }
 +    if ( my $t = $args{'HasNoMember'} ) {
 +        $res .= ' AND ' if $res;
 +        $res .= 'HasMember != '. (ref $t? $t->id : int $t);
 +    }
 +    if ( my $t = $args{'NotMemberOf'} ) {
 +        $res .= ' AND ' if $res;
 +        $res .= 'MemberOf != '. (ref $t? $t->id : int $t);
 +    }
 +    if ( my $t = $args{'MemberOf'} ) {
 +        $res .= ' AND ' if $res;
 +        $res .= 'MemberOf = '. (ref $t? $t->id : int $t);
 +    }
 +    if (
 +        my $t = $args{'Constituency'}
 +        and RT->Config->Get('_RTIR_Constituency_Propagation') eq 'reject'
 +    ) {
 +        unless ( ref $t ) {
 +            my $tmp = RT::Ticket->new( RT->SystemUser );
 +            $tmp->Load( $t );
 +            $t = $tmp;
 +        }
 +        $res .= ' AND ' if $res;
 +        $res .= "CustomField.{Constituency} = '". $t->FirstCustomFieldValue('Constituency') ."'";
 +    }
 +    return $res;
 +}
 +
 +sub ChildrenQuery {
 +    my $self = shift;
 +    my %args = (
 +        @_
 +    );
 +
 +    my @parts;
 +    push @parts, $self->NewQuery(
 +        Queue  => $args{'Queue'},
 +        states => $args{'States'},
 +        add_states => $args{'AddStates'},
 +    );
 +    push @parts, $self->BaseQuery( Queue => $args{'Queue'} );
 +    push @parts, "MemberOf = ". $args{'Ticket'}->id if $args{'Ticket'};
 +
 +    return join " AND ", map "($_)", @parts;
 +}
 +
 +=head2 Incidents
 +
 +Takes a ticket and returns collection of all incidents this ticket
 +is member of.
 +
 +=cut
 +
 +sub Incidents {
 +    my $self = shift;
 +    my $ticket = shift;
 +
 +    my $res = RT::Tickets->new( $ticket->CurrentUser );
 +    $res->FromSQL( "Queue = 'Incidents' AND HasMember = " . $ticket->id );
 +    return $res;
 +}
 +
 +=head2 RelevantIncidents
 +
 +Takes a ticket and returns collection of incidents this ticket
 +is member of excluding abandoned incidents.
 +
 +=cut
 +
 +sub RelevantIncidents {
 +    my $self = shift;
 +    my $ticket = shift;
 +
 +    my $query = "Queue = 'Incidents'"
 +        ." AND HasMember = " . $ticket->id
 +        ." AND Status != 'abandoned'"
 +    ;
 +    my $res = RT::Tickets->new( $ticket->CurrentUser );
 +    $res->FromSQL( $query );
 +    return $res;
 +}
 +
 +=head2 IsLinkedToActiveIncidents $ChildObj [$IncidentObj]
 +
 +Returns number of active incidents linked to child ticket
 +(IR, Investigation, Block or other). If second argument provided
 +then it's excluded from count.
 +
 +When function return zero that means that object has no active
 +parent incidents.
 +
 +=cut
 +
 +sub IsLinkedToActiveIncidents {
 +    my $self = shift;
 +    my $child = shift;
 +    my $parent = shift;
 +
 +    my $tickets = RT::Tickets->new( $child->CurrentUser );
 +    $tickets->FromSQL( $self->BaseQuery(
 +        Queue     => 'Incidents',
 +        Status    => [ RT::Lifecycle->Load('incidents')->Valid('initial', 'active') ],
 +        HasMember => $child,
 +        Exclude   => $parent->id,
 +    ) );
 +    return $tickets->Count;
 +}
 +
  sub GetCustomField {
      my $field = shift or return;
      return (__PACKAGE__->CustomFields( $field ))[0];
diff --cc lib/RT/IR/Config.pm
index a205f09,4fb8062..f8be4d2
--- a/lib/RT/IR/Config.pm
+++ b/lib/RT/IR/Config.pm
@@@ -1,7 -1,6 +1,9 @@@
 +use strict;
 +use warnings;
 +
  package RT::IR::Config;
+ use strict;
+ use warnings;
  
  sub Init {
      use RT::Config;
diff --cc t/custom-fields/defaults-on-linking.t
index ab09d58,c75a57a..f8d01bb
--- a/t/custom-fields/defaults-on-linking.t
+++ b/t/custom-fields/defaults-on-linking.t
@@@ -3,7 -3,7 +3,7 @@@
  use strict;
  use warnings;
  
- use RT::IR::Test tests => 23;
 -use RT::IR::Test tests => 34;
++use RT::IR::Test tests => 32;
  
  my $cf_name = 'test';
  {

commit 1980249deed2cb388d077b14f4f6bd5c464bf5f0
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Jul 23 03:50:39 2011 +0400

    align elements on launch investigation page

diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 13d380f..2fa93d5 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -2,14 +2,14 @@
 <input type="hidden" name="<% $NamePrefix . $field %>" value="<% $value_cb->( $field ) %>" />
 % }
 
-<table border="0" cellpadding="0" cellspacing="2">
+<table width="100%" border="0">
 
 % unless ( $SkipField{'Owner'} || $HideField{'Owner'} ) {
 <tr><td class="label"><&|/l&>Owner</&>:</td>
 <td class="value"><& /Elements/SelectOwner,
     Name     => $NamePrefix ."Owner",
-	QueueObj => $QueueObj,
-	Default  => $value_cb->('Owner') || $session{'CurrentUser'}->Id,
+    QueueObj => $QueueObj,
+    Default  => $value_cb->('Owner') || $session{'CurrentUser'}->Id,
 &></td></tr>
 % }
 
@@ -21,29 +21,36 @@
 % }
 
 % unless ( $SkipField{'TimeFields'} ) {
-<tr><td colspan="2"><table><tr>
-    <td align="right"><&|/l&>Time Worked</&>:</td>
-    <td><& /Elements/EditTimeValue,
+<tr>
+    <td class="label"><&|/l&>Time Worked</&>:</td>
+    <td><table><tr>
+    <td class="value"><& /Elements/EditTimeValue,
         Name => $NamePrefix .'TimeWorked',
         Default => $value_cb->('TimeWorked') || '',
     &></td>
-    <td align="right"><&|/l&>Time Left</&>:</td>
-    <td><& /Elements/EditTimeValue,
+    <td class="label"><&|/l&>Time Left</&>:</td>
+    <td class="value"><& /Elements/EditTimeValue,
         Name => $NamePrefix .'TimeLeft',
         Default => $value_cb->('TimeLeft') || '',
     &></td>
-</tr></table></td></tr>
+    </tr></table></td>
+</tr>
 % }
 
 % unless ( $SkipField{'Requestors'} || $HideField{'Requestors'} ) {
 <tr><td class="label"><&|/l&>Correspondents</&>:</td>
-<td class="value"><input name="<% $NamePrefix %>Requestors" value="<% $value_cb->('Requestors') %>" size="40" /></td></tr>
+<td class="value"><& /Elements/EmailInput,
+    Name => $NamePrefix .'Requestors', Default => $value_cb->('Requestors'), Size => undef,
+&></td></tr>
 % $m->callback( CallbackName => 'AfterRequestors', ARGSRef => \%ARGS );
 % }
 
 % unless ( $SkipField{'Cc'} || $HideField{'Cc'} ) {
 <tr><td class="label"><&|/l&>Cc</&>:</td>
-<td class="value"><input name="<% $NamePrefix %>Cc" value="<% $value_cb->('Cc') %>" size="40" /><br />
+<td class="value"><& /Elements/EmailInput,
+    Name => $NamePrefix .'Cc', Default => $value_cb->('Cc'), Size => undef,
+&></td></tr>
+<tr><td>&nbsp;</td><td class="comment">
 <i><font size="-2"><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of
 email addresses. These people <b>will</b> receive future updates.)</&></font></i>
 </td></tr>
@@ -51,21 +58,24 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
 
 % unless ( $SkipField{'AdminCc'} && $HideField{'AdminCc'} ) {
 <tr><td class="label"><&|/l&>Admin Cc</&>:</td>
-<td class="value"><input name="<% $NamePrefix %>AdminCc" value="<% $value_cb->('AdminCc') %>" size="40" />
+<td class="value"><& /Elements/EmailInput,
+    Name => $NamePrefix .'Cc', Default => $value_cb->('Cc'), Size => undef,
+&></td></tr>
+<tr><td>&nbsp;</td><td class="comment">
 <i><font size="-2"><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative
 email addresses. These people <b>will</b> receive future updates.)</&></font></i>
 </td></tr>
 % }
 
-% if ( $QueueObj || $ARGS{'TicketObj'} ) {
-% unless ( $SkipField{'CustomFields'} ) {
-<tr><td colspan="2"><& /Ticket/Elements/EditCustomFields,
+% if ( ($QueueObj || $ARGS{'TicketObj'}) && !$SkipField{'CustomFields'} ) {
+<& /Ticket/Elements/EditCustomFields,
     NamePrefix => $NamePrefix,
     TicketObj  => $ARGS{'TicketObj'},
     QueueObj   => $QueueObj,
     CFIDPrefix => $NamePrefix,
-&></td></tr>
-% } }
+    AsTable    => 1,
+&>
+% }
 
 % unless ( $SkipField{'Attachments'} ) {
 <& /RTIR/Create.html:AttachmentsForm &>

commit b48d9816587988cd54498f6da3a507f6bf26e9d0
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Jul 23 03:51:59 2011 +0400

    move towards unified UI for creating incidents

diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index fe3e7a1..9c2f1d3 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -57,11 +57,14 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
 
 <& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
 
+<div class="ticket-create">
+<a name="basics"></a>
+
 <&| /Widgets/TitleBox, title => $Title, class => 'ticket-info-basics' &>
 <table border="0" cellpadding="0" cellspacing="2">
 
 % if ( $Split ) {
-% my $Type = RT::IR::TicketType( Ticket => $Split );
+% my $Type = RT::IR::TicketType( Ticket => $SplitObj );
 <tr><td class="label"><% loc('Split from') %>:</td>
 <td class="value"><% loc("[_1] #[_2]: [_3]", $Type, $SplitObj->Id, $SplitObj->Subject) %></td></tr>
 % }
@@ -99,7 +102,46 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
 % }
 </tr>
 
-<& Elements/Create, Title => $Title, SplitObj => $SplitObj, QueueObj => $QueueObj, ChildObj => $ChildObj, %ARGS &>
+% if ( my $constituency_cf = RT::IR->CustomFields( 'Constituency', Queue => $QueueObj->Name ) ) {
+<tr><td class="label"><&|/l&>Constituency</&>:</td>
+<td class="value">
+% if ( !$ChildObj || RT->Config->Get('_RTIR_Constituency_Propagation') eq 'no' ) {
+% my $default;
+% $default = $ChildObj->FirstCustomFieldValue('Constituency') if $ChildObj;
+% $default ||= RT::IR::DefaultConstituency( $QueueObj );
+% $default ||= scalar RT->Config->Get('RTIR_CustomFieldsDefaults')->{'Constituency'};
+<& /RTIR/Elements/EditRTIRField,
+    QueueObj => $QueueObj,
+    Name     => 'Constituency',
+    Default  => $default,
+    Rows     => 1,
+&>
+% } else {
+% #TODO: hacks, we need way to define CF value on Create, but don't allow user to change it
+<input type="hidden" class="hidden" name="Constituency" value="Object-RT::Ticket--CustomField-<% $constituency_cf->id %>-Values" />
+<input type="hidden" class="hidden" name="Object-RT::Ticket--CustomField-<% $constituency_cf->id %>-Values-Magic" value="1" />
+<input type="hidden" class="hidden" name="Object-RT::Ticket--CustomField-<% $constituency_cf->id %>-Values" value="<% $ChildObj->FirstCustomFieldValue('Constituency') %>" />
+<& /RTIR/Elements/ShowRTIRField, Ticket => $ChildObj, Name => 'Constituency' &>
+% }
+</td></tr>
+% }
+
+<& /RTIR/Elements/EditCustomFields, 
+    %ARGS,
+    QueueObj => $QueueObj,
+    ChildObj => $ChildObj,
+    AsTable => 1,
+&>
+
+</table></&>
+
+<&| /Widgets/TitleBox, title => $Title, class => 'ticket-info-message' &>
+<table width="100%" border="0">
+
+  <tr>
+    <td class="label"><&|/l&>Subject</&>:</td>
+    <td class="value"><input type="text" name="Subject" maxsize="200" value="<% $ARGS{'Subject'} || '' %>" /></td>
+  </tr>
 
 % if ( $gnupg_widget ) {
 <tr><td>&nbsp;</td><td>
@@ -134,76 +176,84 @@ unless ( exists $ARGS{'Content'} ) {
     Default => $ARGS{'Content'},
     IncludeSignature => $include_signature,
 &>
-
 </td></tr>
 
-<tr><td>&nbsp;</td><td colspan="2">
+<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
 
-<&| /Widgets/TitleBox,
-    title => loc('The Basics'),
-    class => 'ticket-info-basics',
-&>
-<table border="0">
-    <tr><td align="right"><&|/l&>Priority</&>:</td>
-    <td>
-<& /Elements/SelectPriority,
-    Name => "InitialPriority",
-    Default => $ARGS{InitialPriority} ? $ARGS{InitialPriority} : $QueueObj->InitialPriority,
-&></td></tr>
-
-    <tr><td align="right"><&|/l&>Final Priority</&>:</td>
-    <td>
-<& /Elements/SelectPriority,
-    Name => "FinalPriority",
-    Default => $ARGS{FinalPriority} ? $ARGS{FinalPriority} : $QueueObj->FinalPriority,
-&>
-</td></tr>
-
-    <tr><td align="right"><&|/l&>Time Worked</&>:</td>
-    <td class="value"><& /Elements/EditTimeValue,
-        Name => 'TimeWorked',
-        Default => $ARGS{'TimeWorked'} || '',
-    &></td></tr>
-
-    <tr><td align="right"><&|/l&>Time Left</&>:</td>
-    <td class="value"><& /Elements/EditTimeValue,
-        Name => 'TimeLeft',
-        Default => $ARGS{'TimeLeft'} || '',
-    &></td></tr>
-</table>
-</&>
+</table></&>
 
-<&| /Widgets/TitleBox,
-    title => loc("Dates"),
-    class=> 'ticket-info-dates',
+<&| /Widgets/TitleBox, title => loc('Details'), class => 'ticket-info-details' &>
+<& /Ticket/Elements/EditBasics,
+    InTable => 0,
+    fields  => [
+        {
+            name => 'Priority',
+            comp => '/Elements/SelectPriority',
+            args => {
+                Name    => 'InitialPriority',
+                Default =>
+                    defined $ARGS{'InitialPriority'} && length $ARGS{'InitialPriority'}
+                    ? $ARGS{'InitialPriority'}
+                    : $QueueObj->InitialPriority
+                ,
+            },
+        },
+        {
+            name => 'Final Priority',
+            comp => '/Elements/SelectPriority',
+            args => {
+                Name    => 'FinalPriority',
+                Default =>
+                    defined $ARGS{'FinalPriority'} && length $ARGS{'FinalPriority'}
+                    ? $ARGS{'FinalPriority'}
+                    : $QueueObj->InitialPriority
+                ,
+            },
+        },
+        {
+            name => 'Time Worked',
+            comp => '/Elements/EditTimeValue',
+            args => {
+                Name    => "TimeWorked",
+                Default => $ARGS{'TimeWorked'} || '',
+            },
+        },
+        {
+            name => 'Time Left',
+            comp => '/Elements/EditTimeValue',
+            args => {
+                Name    => "TimeLeft",
+                Default => $ARGS{'TimeLeft'} || '',
+            },
+        },
+        {
+            name => 'Starts',
+            comp => '/Elements/SelectDate',
+            args => {
+                Name    => 'Starts',
+                Default => $ARGS{'Starts'} || '',
+            },
+        },
+        {
+            name => 'Due',
+            comp => '/Elements/SelectDate',
+            args => {
+                Name    => 'Due',
+                Default => $ARGS{'Due'} || '',
+            },
+        },
+    ],
 &>
-<table border="0">
-
-    <tr><td align="right"><&|/l&>Starts</&>:</td>
-    <td><& /Elements/SelectDate, Name => 'Starts', Default => $ARGS{'Starts'} || '' &></td></tr>
-    
-    <tr><td align="right"><&|/l&>Due</&>:</td>
-    <td><& /Elements/SelectDate, Name => 'Due', Default => $ARGS{'Due'} || '' &></td></tr>
-
-</table>
 </&>
 
-</td></tr>
+<& /Elements/Submit, Name => 'CreateIncident', Label => $SubmitLabel &>
 
-</table>
+</div>
 
-</&>
-
-% if ( $Split ) {
-<& /Elements/Submit, Name => 'CreateIncident', Label => loc("Split") &>
-% } else {
-<& /Elements/Submit, Name => 'CreateIncident', Label => loc("Create") &>
-% }
 
 <&| /Widgets/TitleBox,
-    title => loc("Run Investigation"),
-    title_class=> 'inverse',
-    color => "#663366",
+    title => loc("Launch Investigation"),
+    class => '',
 &>
 <& /RTIR/Investigation/Elements/Create,
     %ARGS,
@@ -356,6 +406,14 @@ if ( !$checks_failure && $CreateIncident ) {
     }
 }
 
+my $SubmitLabel;
+if ( $Split ) {
+    $SubmitLabel = loc('Split');
+}
+else {
+    $SubmitLabel = loc('Create');
+}
+
 </%INIT>
 
 <%ARGS>
diff --git a/html/RTIR/Incident/Elements/Create b/html/RTIR/Incident/Elements/Create
index d89bf69..04537c1 100644
--- a/html/RTIR/Incident/Elements/Create
+++ b/html/RTIR/Incident/Elements/Create
@@ -23,12 +23,7 @@
 %# 
 %# END LICENSE BLOCK
 
-<tr><td class="label"><&|/l&>Subject</&>:</td>
-<td class="value">
-<input name="Subject" size="60" maxsize="100" value="<% $Subject %>" />
-</td></tr>
-
-% if ($constituency_cf) {
+% if ( my $constituency_cf = RT::IR->CustomFields( 'Constituency', Queue => $QueueObj->Name ) ) {
 <tr><td class="label"><&|/l&>Constituency</&>:</td>
 <td class="value">
 % if ( !$ChildObj || RT->Config->Get('_RTIR_Constituency_Propagation') eq 'no' ) {
@@ -52,15 +47,13 @@
 </td></tr>
 % }
 
-<tr><td colspan="2">
-<& /RTIR/Elements/EditCustomFields,
+<& /RTIR/Elements/EditCustomFields, 
     %ARGS,
     TicketObj => $TicketObj,
     QueueObj => $QueueObj,
     ChildObj => $ChildObj,
-&></td></tr>
-
-<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
+    AsTable => 1,
+&>
 
 <%INIT>
 my $constituency_cf = RT::IR->CustomFields( 'Constituency', Queue => $QueueObj->Name );

commit 368171acea60f0111e52501352ac3b0f1971786c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Jul 26 04:26:48 2011 +0400

    make sure most inputs have type

diff --git a/html/RTIR/Advanced.html b/html/RTIR/Advanced.html
index 76d0d2a..0251bba 100644
--- a/html/RTIR/Advanced.html
+++ b/html/RTIR/Advanced.html
@@ -10,7 +10,7 @@
 <table>
   <tr>
     <td class="label"><&|/l&>Subject</&>:</td>
-    <td class="value"><input name="Subject" value="<% $Ticket->Subject %>" size="50" /></td>
+    <td class="value"><input type="text" name="Subject" value="<% $Ticket->Subject %>" /></td>
   </tr>
   <tr>
     <td class="label"><&|/l&>Queue</&>:</td>
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index 15c5e3e..c1f0bc9 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -63,7 +63,7 @@
   </tr>
   <tr>
     <td class="label"><&|/l&>Subject</&>:</td>
-    <td class="value"><input name="Subject" value="<%$Ticket->Subject|h%>" size="50" /></td>
+    <td class="value"><input type="text" name="Subject" value="<%$Ticket->Subject|h%>" size="50" /></td>
   </tr>
   <tr>
     <td class="label"><&|/l&>Owner</&>:</td>
diff --git a/html/RTIR/Elements/PickRestriction b/html/RTIR/Elements/PickRestriction
index e91b0cf..f5406db 100644
--- a/html/RTIR/Elements/PickRestriction
+++ b/html/RTIR/Elements/PickRestriction
@@ -39,11 +39,11 @@
 <li>
 <&|/l&>Requestor email address</&> 
 <& /Elements/SelectMatch, Name => "RequestorOp" &>
-<input name="ValueOfRequestor" size="20" />
+<input type="text" name="ValueOfRequestor" size="20" />
 
 <li>
 <&|/l&>Subject</&> <& /Elements/SelectMatch, Name => "SubjectOp" &> 
-<input name="ValueOfSubject" size="20" />
+<input type="text" name="ValueOfSubject" size="20" />
 
 <li><&|/l&>Priority</&> <& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
 
@@ -64,7 +64,7 @@
 			    TrueVal => 'LIKE', 
 			    FalseVal => 'NOT LIKE' 
 &> 
-<input name="ValueOfAttachmentField" size="20" />
+<input type="text" name="ValueOfAttachmentField" size="20" />
 
 % while ( my $CustomField = $CustomFields->Next ) {
 <li><% $CustomField->Name %> 
diff --git a/html/RTIR/Incident/Edit.html b/html/RTIR/Incident/Edit.html
index bc85ecc..bc37db9 100644
--- a/html/RTIR/Incident/Edit.html
+++ b/html/RTIR/Incident/Edit.html
@@ -54,7 +54,7 @@
   </tr>
   <tr>
     <td class="label"><&|/l&>Subject</&>:</td>
-    <td class="value"><input name="Subject" value="<%$Ticket->Subject|h%>" size="50" /></td>
+    <td class="value"><input type="text" name="Subject" value="<%$Ticket->Subject|h%>" size="50" /></td>
   </tr>
   <tr>
     <td class="label"><&|/l&>Priority</&>:</td>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 2fa93d5..6a8c78e 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -16,7 +16,7 @@
 % unless ( $SkipField{'Subject'} || $HideField{'Subject'} ) {
 <tr><td class="label"><&|/l&>Subject</&>:</td>
 <td class="value">
-<input name="<% $NamePrefix %>Subject" size="60" maxsize="100" value="<% $value_cb->('Subject') %>" />
+<input type="text" name="<% $NamePrefix %>Subject" size="60" maxsize="100" value="<% $value_cb->('Subject') %>" />
 </td></tr>
 % }
 
diff --git a/html/RTIR/Update.html b/html/RTIR/Update.html
index 91aa1b5..b6f58af 100644
--- a/html/RTIR/Update.html
+++ b/html/RTIR/Update.html
@@ -85,7 +85,7 @@
     Default => $ARGS{'UpdateTimeWorked'} || $Ticket->TimeWorked || '',
 &>
 </td></tr>
-<tr><td align="right"><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size="60" value="<% $Subject || '' %>" /></td></tr>
+<tr><td align="right"><&|/l&>Subject</&>:</td><td> <input type="text" name="UpdateSubject" size="60" value="<% $Subject || '' %>" /></td></tr>
 
 <& /RTIR/Elements/UpdateData, %ARGS, Ticket => $Ticket, Type => 'Incident', GnuPGWidget => $gnupg_widget &>
 

commit 5c4c2b6334be26c9380218145b3174bb86241f39
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Jul 26 04:27:30 2011 +0400

    update TODO

diff --git a/TODO.porting_over_RT4 b/TODO.porting_over_RT4
index d468a73..68dc872 100644
--- a/TODO.porting_over_RT4
+++ b/TODO.porting_over_RT4
@@ -57,8 +57,6 @@
   anyway we break backwards compatibility, let's be consistent
   and ditch the word
 
-* migrate SetIncidentReportState over lifecycles
-
 * make Submit buttons names consistent with RT's
 
 * merge all RT::IR->*Query methods into one, they all equivalent,
@@ -66,6 +64,17 @@
 
 * move html/RTIR/Incident/LinkArticles.html -> html/RTIR/Link/Articles.html
 
+* html/RTIR/Forward.html still uses plain inputs for addresses
+
+* make sure all <input> tags have type
+
+* re-use CSS squishing
+
+=== INVESTIGATE
+
+* we use different components for EditCustomFields
+
+* we pass OnCreate inconsistently into EditCustomFields
 
 === TESTS
 

commit 95f68e13a14b3513ab24de55cabc1b3146d6e66e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Jul 26 22:48:14 2011 +0400

    make create incident a side by side UI

diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 9c2f1d3..77a46e3 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -22,7 +22,10 @@
 %# 
 %# 
 %# END LICENSE BLOCK
-<& /RTIR/Elements/Header, Title => $Title &>
+<& /RTIR/Elements/Header,
+    Title => $Title,
+    onload => "function () { hide('ticket-create-investigation') }",
+&>
 <& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS, Ticket => $SplitObj);
@@ -57,11 +60,12 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
 
 <& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
 
-<div class="ticket-create">
-<a name="basics"></a>
+<div id="ticket-create-incident">
+<a name="incident"></a>
 
+<div class="ticket-create-basics">
 <&| /Widgets/TitleBox, title => $Title, class => 'ticket-info-basics' &>
-<table border="0" cellpadding="0" cellspacing="2">
+<table width="100%" border="0">
 
 % if ( $Split ) {
 % my $Type = RT::IR::TicketType( Ticket => $SplitObj );
@@ -130,10 +134,13 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
     %ARGS,
     QueueObj => $QueueObj,
     ChildObj => $ChildObj,
-    AsTable => 1,
+    AsTable  => 1,
+    InTable  => 1,
 &>
 
-</table></&>
+</table></&></div>
+
+<div class="ticket-create-details">
 
 <&| /Widgets/TitleBox, title => $Title, class => 'ticket-info-message' &>
 <table width="100%" border="0">
@@ -245,16 +252,14 @@ unless ( exists $ARGS{'Content'} ) {
     ],
 &>
 </&>
+</div>
 
 <& /Elements/Submit, Name => 'CreateIncident', Label => $SubmitLabel &>
 
 </div>
 
-
-<&| /Widgets/TitleBox,
-    title => loc("Launch Investigation"),
-    class => '',
-&>
+<div id="ticket-create-investigation">
+<a name="investigation"></a>
 <& /RTIR/Investigation/Elements/Create,
     %ARGS,
     NamePrefix => 'Investigation',
@@ -266,7 +271,7 @@ unless ( exists $ARGS{'Content'} ) {
     Name => 'CreateWithInvestigation',
     Label => loc("Create Incident and run Investigation"),
 &>
-</&>
+</div>
 
 </form>
 
@@ -414,6 +419,19 @@ else {
     $SubmitLabel = loc('Create');
 }
 
+PageMenu->child(
+    incident => raw_html =>
+    q{<a href="#incident"}
+    . q{onclick="return switchVisibility('ticket-create-incident','ticket-create-investigation');"}
+    . q{>} . loc('Incident') . q{</a>}
+);
+PageMenu->child(
+    investigation => raw_html =>
+    q[<a href="#investigation"]
+    . q[ onclick="return switchVisibility('ticket-create-investigation','ticket-create-incident');"]
+    . q[>] . loc('Launch Investigation') . q[</a>]
+);
+
 </%INIT>
 
 <%ARGS>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 6a8c78e..c9b1fdb 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -2,6 +2,8 @@
 <input type="hidden" name="<% $NamePrefix . $field %>" value="<% $value_cb->( $field ) %>" />
 % }
 
+<div class="ticket-create-basics">
+<&| /Widgets/TitleBox, title => loc("Basics"), class => 'ticket-info-basics' &>
 <table width="100%" border="0">
 
 % unless ( $SkipField{'Owner'} || $HideField{'Owner'} ) {
@@ -13,13 +15,6 @@
 &></td></tr>
 % }
 
-% unless ( $SkipField{'Subject'} || $HideField{'Subject'} ) {
-<tr><td class="label"><&|/l&>Subject</&>:</td>
-<td class="value">
-<input type="text" name="<% $NamePrefix %>Subject" size="60" maxsize="100" value="<% $value_cb->('Subject') %>" />
-</td></tr>
-% }
-
 % unless ( $SkipField{'TimeFields'} ) {
 <tr>
     <td class="label"><&|/l&>Time Worked</&>:</td>
@@ -37,6 +32,40 @@
 </tr>
 % }
 
+% unless ( $SkipField{'DateFields'} ) {
+<tr><td>&nbsp;</td><td valign="top"><&| /Widgets/TitleBox,
+    title => loc("Dates"),
+    class=> 'ticket-info-dates',
+&><table>
+
+<tr><td class="label"><&|/l&>Starts</&>:</td>
+<td class="value"><& /Elements/SelectDate, Name => $NamePrefix .'Starts', Default => $value_cb->('Starts') || '' &></td></tr>
+
+<tr><td class="label"><&|/l&>Due</&>:</td>
+<td class="value"><& /Elements/SelectDate, Name => $NamePrefix .'Due', Default => $value_cb->('Due') || '' &></td></tr>
+
+</table></&></td></tr>
+% }
+
+% if ( ($QueueObj || $ARGS{'TicketObj'}) && !$SkipField{'CustomFields'} ) {
+<& /Ticket/Elements/EditCustomFields,
+    NamePrefix => $NamePrefix,
+    TicketObj  => $ARGS{'TicketObj'},
+    QueueObj   => $QueueObj,
+    CFIDPrefix => $NamePrefix,
+    AsTable    => 1,
+&>
+% }
+
+</table></&></div>
+
+<div class="ticket-create-details">
+<&| /Widgets/TitleBox,
+    title => loc("Launch Investigation"),
+    class => 'ticket-info-message',
+&>
+<table width="100%" border="0">
+
 % unless ( $SkipField{'Requestors'} || $HideField{'Requestors'} ) {
 <tr><td class="label"><&|/l&>Correspondents</&>:</td>
 <td class="value"><& /Elements/EmailInput,
@@ -67,18 +96,11 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
 </td></tr>
 % }
 
-% if ( ($QueueObj || $ARGS{'TicketObj'}) && !$SkipField{'CustomFields'} ) {
-<& /Ticket/Elements/EditCustomFields,
-    NamePrefix => $NamePrefix,
-    TicketObj  => $ARGS{'TicketObj'},
-    QueueObj   => $QueueObj,
-    CFIDPrefix => $NamePrefix,
-    AsTable    => 1,
-&>
-% }
-
-% unless ( $SkipField{'Attachments'} ) {
-<& /RTIR/Create.html:AttachmentsForm &>
+% unless ( $SkipField{'Subject'} || $HideField{'Subject'} ) {
+<tr><td class="label"><&|/l&>Subject</&>:</td>
+<td class="value">
+<input type="text" name="<% $NamePrefix %>Subject" size="60" maxsize="100" value="<% $value_cb->('Subject') %>" />
+</td></tr>
 % }
 
 % if ( !$SkipField{'SignEncrypt'} && RT->Config->Get('GnuPG')->{'Enable'} ) {
@@ -109,22 +131,11 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
 &></td></tr>
 % }
 
-% unless ( $SkipField{'DateFields'} ) {
-<tr><td>&nbsp;</td><td valign="top"><&| /Widgets/TitleBox,
-    title => loc("Dates"),
-    class=> 'ticket-info-dates',
-&><table>
-
-<tr><td class="label"><&|/l&>Starts</&>:</td>
-<td class="value"><& /Elements/SelectDate, Name => $NamePrefix .'Starts', Default => $value_cb->('Starts') || '' &></td></tr>
-
-<tr><td class="label"><&|/l&>Due</&>:</td>
-<td class="value"><& /Elements/SelectDate, Name => $NamePrefix .'Due', Default => $value_cb->('Due') || '' &></td></tr>
-
-</table></&></td></tr>
+% unless ( $SkipField{'Attachments'} ) {
+<& /RTIR/Create.html:AttachmentsForm &>
 % }
 
-</table>
+</table></&></div>
 
 <%ARGS>
 $NamePrefix => ''
diff --git a/html/RTIR/NoAuth/webrtir.css b/html/RTIR/NoAuth/webrtir.css
index 71680c8..5f85e86 100644
--- a/html/RTIR/NoAuth/webrtir.css
+++ b/html/RTIR/NoAuth/webrtir.css
@@ -59,7 +59,39 @@ ul.userlist li:last-child::after{
     width: 58%;
 }
 
+#ticket-create-incident input[type=text],
+#ticket-create-investigation input[type=text]
+{
+    width: 90%;
+}
+
+#ticket-create-incident .ticket-create-basics,
+#ticket-create-investigation .ticket-create-basics
+{
+    float: right;
+    width: 40%;
+    clear: right;
+}
 
+#ticket-create-incident .ticket-create-details,
+#ticket-create-investigation .ticket-create-details
+{
+    float: left;
+    width: 58%;
+    clear: left;
+}
+
+ at media (max-width: 950px) {
+    #ticket-create-incident .ticket-create-basics,
+    #ticket-create-investigation .ticket-create-basics
+    #ticket-create-incident .ticket-create-details,
+    #ticket-create-investigation .ticket-create-details
+    {
+        float: none;
+        width: auto;
+        clear: both;
+    }
+}
 
 % $m->abort;
 <%INIT>

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


More information about the Rt-commit mailing list