[Rt-commit] rtir branch, 4.2-theme/migrate-to-elevator-themes, created. 4.0.1rc1-112-gfdd0e3a9
Blaine Motsinger
blaine at bestpractical.com
Fri Feb 28 13:28:24 EST 2020
The branch, 4.2-theme/migrate-to-elevator-themes has been created
at fdd0e3a9e09ef277141bde2e8820d40f7952693c (commit)
- Log -----------------------------------------------------------------
commit 857706acfba195e89141158d18f835b1f03759d8
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Aug 27 16:51:42 2019 -0500
Migrate RTIR/index to elevator themes
diff --git a/html/RTIR/Elements/CreateTicketInQueue b/html/RTIR/Elements/CreateTicketInQueue
index e4b98719..3ede976d 100644
--- a/html/RTIR/Elements/CreateTicketInQueue
+++ b/html/RTIR/Elements/CreateTicketInQueue
@@ -48,7 +48,7 @@
<form action="<% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
% $m->callback(CallbackName => 'InFormElement');
>
-% my $button_start = '<input type="submit" class="button" value="';
+% my $button_start = '<input type="submit" class="button btn btn-lg btn-primary form-control" value="';
% my $button_end = '" />';
% my $queue_selector = $m->scomp('/RTIR/Elements/SelectNewTicketQueue', OnChange => 'document.CreateTicketInQueue.submit()', SendTo => $SendTo );
<&|/l_unsafe, $button_start, $button_end, $queue_selector &>[_1]New ticket in[_2] [_3]</&>
diff --git a/html/RTIR/Elements/QueueSummary b/html/RTIR/Elements/QueueSummary
index 80ae72dc..dc40dc81 100644
--- a/html/RTIR/Elements/QueueSummary
+++ b/html/RTIR/Elements/QueueSummary
@@ -45,14 +45,22 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<div class="ticket-overview">
+<&|/Widgets/TitleBox,
+ title => loc("Queue list"),
+ class => "fullwidth",
+ bodyclass => "",
+&>
+
<%perl>
+ # start foreach lifecycle loop
foreach my $lifecycle ( map $lifecycle{$_}, sort keys %lifecycle ) {
next unless RT::IR->OurLifecycle($lifecycle);
my @cur_statuses = grep $lifecycle->IsValid($_), @statuses;
next unless @cur_statuses;
</%perl>
-<table border="0" cellspacing="0" cellpadding="1" width="100%" class="queue-summary">
+<table border="0" cellspacing="0" cellpadding="1" width="100%" class="table queue-summary">
<tr>
<th class="collection-as-table"><%loc(RT::IR::FriendlyLifecycle($lifecycle->Name)) %></th>
@@ -82,7 +90,11 @@ for my $queue (@queues) {
</tr>
% }
</table>
-% }
+% } # end foreach lifecycle loop
+
+</&>
+</div>
+
<%INIT>
my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {});
diff --git a/html/RTIR/Elements/SelectRTIRQueue b/html/RTIR/Elements/SelectRTIRQueue
index 19b74d54..44e37724 100644
--- a/html/RTIR/Elements/SelectRTIRQueue
+++ b/html/RTIR/Elements/SelectRTIRQueue
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>" <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
+<select name="<%$Name%>" <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%> selectpicker form-control">
% if ($ShowNullOption) {
<option value=""><% $DefaultLabel %></option>
% }
diff --git a/html/RTIR/Elements/WorkWithConstituency b/html/RTIR/Elements/WorkWithConstituency
index 2b30ee29..0269a6fb 100644
--- a/html/RTIR/Elements/WorkWithConstituency
+++ b/html/RTIR/Elements/WorkWithConstituency
@@ -46,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
<&| /Widgets/TitleBox, title => 'Work with constituency' &>
-<ul>
-<li><a href="<% RT::IR->HREFTo('',Constituency => '')%>">All constituencies</a></li>
+<ul class="list-group list-group-compact">
+<li class="list-group-item"><a href="<% RT::IR->HREFTo('',Constituency => '')%>">All constituencies</a></li>
% for my $constituency (keys %known_constituencies) {
-<li><a href="<% RT::IR->HREFTo('', Constituency => $constituency)%>"><%$constituency%></a></li>
+<li class="list-group-item"><a href="<% RT::IR->HREFTo('', Constituency => $constituency)%>"><%$constituency%></a></li>
% }
</ul>
</&>
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 1784af30..31011680 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -67,6 +67,14 @@ body.rtir #topactions #simple-search input.field {
width: 150px;
}
+body.rtir #topactions #simple-search input[type="search"]:focus {
+ width: 16em;
+ -webkit-transition: width 0.25s ease-in-out;
+ -moz-transition: width 0.25s ease-in-out;
+ -ms-transition: width 0.25s ease-in-out;
+ transition: width 0.25s ease-in-out;
+}
+
body.rtir #topactions { min-width: 44em; white-space: no-wrap; }
#comp-RTIR .myrt>table>tr>td:first-child {
commit b6a39e7d83c48244905cdf1d011c80de79c08118
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Thu Aug 29 11:47:28 2019 -0500
Migrate RTIR/Display to elevator themes
diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 15cabafd..09b6f0a3 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -82,7 +82,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -96,7 +96,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -108,17 +108,17 @@ my %actions;
$args{host} ||= $args{value};
my $escaped_host = $escaper->($args{host});
- my $result .= qq{<a class="button button-small" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
+ my $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
.loc('Lookup IP') .q{</a>};
if ( $args{incident} && !RT->Config->Get('RTIR_DisableCountermeasures') ) {
- $result .= qq{<a class="button button-small create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
+ $result .= qq{<a class="button button-small btn btn-lg btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
RT::IR->HREFTo("CreateInQueue.html?Incident=".$args{incident}."&Lifecycle=".RT::IR->lifecycle_countermeasure.qq{&IP-Value=$escaped_host})
.qq{">Block</a>};
}
if ( $args{'object'} && $args{'object'}->id ) {
my $cf = RT::IR::GetCustomField('IP');
my $tid = $args{'object'}->id;
- $result .= qq{<a class="button button-small" href="}.
+ $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo("Edit.html?id=".$tid
.qq{&Object-RT::Ticket-$tid-CustomField-}. $cf->id .qq{-AddValue=$escaped_host}
.q{&SaveChanges=1})
@@ -154,14 +154,14 @@ my %actions;
my $email = $args{'value'}; $email =~ s/^<|>$//g;
my $escaped_email = $escaper->($email);
- my $result = qq{<a class="button button-small" href="}.
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=email&q=$escaped_email}). qq{">}
.loc('lookup email') .q{</a>};
if ( $args{'incident'} ) {
if ( $r->uri =~ /Lookup.html$/ ) {
$result .= qq{<input type="checkbox" name="Requestorbox-$escaped_email" unchecked />};
}
- $result .= qq{<a class="button button-small" href="}.
+ $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo( "CreateInQueue.html"
. qq{?Incident=$args{'incident'}}
. qq{&Lifecycle=}.RT::IR->lifecycle_investigation
@@ -171,7 +171,7 @@ my %actions;
}
my $domain = (split /@/, $email, 2)[1];
my $escaped_domain = $escaper->($domain);
- $result .= ' <a class="button button-small" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
+ $result .= ' <a class="button button-small btn btn-lg btn-primary" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
.loc('lookup "[_1]"', $domain) .'</a>';
return $escaper->($args{'value'}) . qq{ <span class="clickylink">$result</span>};
},
@@ -182,7 +182,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
.loc('lookup') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
@@ -193,7 +193,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
.loc('lookup host') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index b0d55166..3ccfafe3 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -55,9 +55,8 @@
<div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
-<table class="ticket-summary" width="100%">
-<tr>
-<td class="boxcontainer" valign="top">
+<div class="row ticket-summary">
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'LeftColumnStart' );
<&| /Widgets/TitleBox,
@@ -65,43 +64,55 @@
title_href => RT::IR->HREFTo("Edit.html?id=".$Ticket->Id),
class => 'ticket-info-basics',
&>
-<table class="basics">
+ <div>
% if (my $constituency = RT::IR->ConstituencyFor($Ticket)) {
- <tr>
- <td class="label"><% loc("Constituency") %>:</td>
- <td class="value">
- <% $constituency %>
- </td>
- </tr>
- <tr>
-
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Constituency") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $constituency %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><% loc("Status") %>:</td>
- <td class="value">
- <% $Ticket->Status %>
- </td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Status") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->Status %></span>
+ </div>
+ </div>
% if ( !$Ticket->QueueObj->SLADisabled ) {
- <tr class="sla">
- <td class="label"><&|/l&>SLA</&>:</td>
- <td class="value"><% loc($Ticket->SLA) %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% loc($Ticket->SLA) %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><% loc("Incident") %>:</td>
- <td class="value">
- <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><%loc('[_1] min', $TimeWorked)%></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Incident") %>:
+ </div>
+ <div class="value col-md-9">
+ <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Worked</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><%loc('[_1] min', $TimeWorked)%></span>
+ </div>
+ </div>
<& /Elements/ShowCustomFields, Grouping => 'Basics', Object => $Ticket, Table => 0 &>
-</table>
+ </div>
</&>
@@ -115,7 +126,8 @@
<& /Ticket/Elements/ShowAttachments, Ticket => $Ticket,
Attachments => $attachments &>
-</td> <td class="boxcontainer" valign="top">
+ </div>
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'RightColumnStart' );
<&| /Widgets/TitleBox,
@@ -134,9 +146,8 @@
% $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'BeforeRequestor' );
<br />
<& /Ticket/Elements/ShowRequestor, Ticket => $Ticket, DisplayPath => RT::IR->HREFTo("Display.html") &>
- </td>
-</tr>
-</table>
+ </div>
+</div>
</&></div>
diff --git a/html/RTIR/Elements/ShowDates b/html/RTIR/Elements/ShowDates
index dfe13826..5803a42a 100644
--- a/html/RTIR/Elements/ShowDates
+++ b/html/RTIR/Elements/ShowDates
@@ -45,24 +45,38 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
- <tr>
- <td class="label"><&|/l&>Created</&>:</td>
- <td class="value"><% $Ticket->CreatedObj->AsString %></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Starts</&>:</td>
- <td class="value"><% $Ticket->StartsObj->AsString %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Created</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->CreatedObj->AsString %></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Starts</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->StartsObj->AsString %></span>
+ </div>
+ </div>
% if ( RT::IR->IsReportQueue($Ticket->QueueObj) || RT::IR->IsInvestigationQueue($Ticket->QueueObj) || RT::IR->IsCountermeasureQueue($Ticket->QueueObj) ) {
- <tr>
- <td class="label"><&|/l&>Started</&>:</td>
- <td class="value"><% $Ticket->StartedObj->AsString %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Started</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->StartedObj->AsString %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="labeltop"><&|/l&>Due</&>:</td>
- <td class="value">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Due</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control">
% my $due = $Ticket->DueObj;
% if ( ($due->Diff || 0) < 0 ) {
<span class="overdue"><% $due->AsString %></span>
@@ -76,14 +90,18 @@
[<a href="Display.html?Due_Date=now%20%2B%20<% $Due |u %>&id=<% $Ticket->Id %>"><% loc("Set to [_1] from now", $Due ) %></a>]
% }
% }
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Updated</&>:</td>
- <td class="value"><a href="#lasttrans"><% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %></a></td>
- </tr>
+ </span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Updated</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><a href="#lasttrans"><% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %></a></span>
+ </div>
+ </div>
<& /Elements/ShowCustomFields, Grouping => 'Dates', Object => $Ticket, Table => 0 &>
-</table>
<%ARGS>
$Ticket => undef
</%ARGS>
diff --git a/html/RTIR/Elements/ShowIncidents b/html/RTIR/Elements/ShowIncidents
index 1e76990b..0810c4a0 100644
--- a/html/RTIR/Elements/ShowIncidents
+++ b/html/RTIR/Elements/ShowIncidents
@@ -57,10 +57,10 @@
&>
<div class="actions">
% unless ( $action ) {
-<a class="button button-small" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">Link</a>
-<a class="button button-small" id="create-incident" href="<% RT::IR->HREFTo('CreateInQueue.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">New</a>
+<a class="button button-small btn btn-lg btn-primary" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">Link</a>
+<a class="button button-small btn btn-lg btn-primary" id="create-incident" href="<% RT::IR->HREFTo('CreateInQueue.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">New</a>
% } elsif ( $action ne 'No' ) {
-<a class="button button-small" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>"><% loc( $action ) %></a>
+<a class="button button-small btn btn-lg btn-primary" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>"><% loc( $action ) %></a>
% }
</div>
</span>
@@ -98,7 +98,7 @@ my $query = RT::IR->RelevantIncidentsQuery( $Ticket );
my $format = RT->Config->Get('RTIRSearchResultFormats')->{'ListIncidents'};
my $dformat = $format;
if ( $show_unlink ) {
- $dformat .= ", '<a class=\"button\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
+ $dformat .= ", '<a class=\"button button-small btn btn-lg btn-primary\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
}
</%INIT>
diff --git a/html/RTIR/Elements/ShowPeople b/html/RTIR/Elements/ShowPeople
index 7968d34d..5b62842f 100644
--- a/html/RTIR/Elements/ShowPeople
+++ b/html/RTIR/Elements/ShowPeople
@@ -48,15 +48,17 @@
%# XXX: this is a duplication of RT's /Ticket/Elements/ShowPeople
%# the only difference is s/Requestor/Correspondent/, keep in sync
-<table>
- <tr>
- <td class="label"><&|/l&>Owner</&>:</td>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
% my $owner = $Ticket->OwnerObj;
- <td class="value"><& /Elements/ShowUser, User => $owner, Ticket => $Ticket &>
- <& /Elements/ShowUserEmailFrequency, User => $owner, Ticket => $Ticket &>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Elements/ShowUser, User => $owner, Ticket => $Ticket &></span>
+ <& /Elements/ShowUserEmailFrequency, User => $owner, Ticket => $Ticket &>
% $m->callback( User => $owner, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' );
- </td>
- </tr>
+ </div>
+ </div>
% my $single_roles = $Ticket->QueueObj->CustomRoles;
% $single_roles->LimitToSingleValue;
@@ -68,38 +70,57 @@
%# so fall back to nobody
% my $user = $users->First || RT->Nobody;
- <tr>
- <td class="label"><% $role->Name %>:</td>
- <td class="value"><& /Elements/ShowUser, User => $user, Ticket => $Ticket &></td>
- <& /Elements/ShowUserEmailFrequency, User => $user, Ticket => $Ticket &>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% $role->Name %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Elements/ShowUser, User => $user, Ticket => $Ticket &></span>
+ <& /Elements/ShowUserEmailFrequency, User => $user, Ticket => $Ticket &>
% $m->callback( User => $user, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' );
- </tr>
+ </div>
+ </div>
% }
- <tr>
- <td class="labeltop"><&|/l&>Correspondents</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Cc</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>AdminCc</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Correspondents</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>AdminCc</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></span>
+ </div>
+ </div>
% my $multi_roles = $Ticket->QueueObj->CustomRoles;
% $multi_roles->LimitToMultipleValue;
% while (my $role = $multi_roles->Next) {
- <tr>
- <td class="labeltop"><% $role->Name %>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->RoleGroup($role->GroupType), Ticket => $Ticket &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% $role->Name %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->RoleGroup($role->GroupType), Ticket => $Ticket &></span>
+ </div>
+ </div>
% }
<& /Elements/ShowCustomFields, Grouping => 'People', Object => $Ticket, Table => 0 &>
-</table>
<%ARGS>
$Ticket => undef
</%ARGS>
commit be8d48a6a0694bc578cf7d2a712033dcce6b55c1
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Fri Sep 6 18:50:54 2019 -0500
Fix has_watchers test regex for elevator themes
diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 2d1635ab..9ff65a6d 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -310,7 +310,7 @@ sub has_watchers {
$self->display_ticket($id);
return $self->content_like(
-qr{<td class="labeltop">Correspondents:</td>\s*<td class="value">\s*<span class="user" data-user-id="\d+">\s*<a href="/User/Summary\.html\?id=\d+">\s*([@\w\.&;]+)\s*</a></span>}ms,
+qr{Correspondents:\s*</div>\s*<div class="value col-md-9">\s*<span[^>]*?\s*class="\w+[^>]*?><span class="user" data-user-id="\d+">\s*<a href="/User/Summary\.html\?id=\d+">\s*([@\w\.&;]+)\s*</a></span>}ms,
"Found $type",
);
}
commit a18bd87e71f8a3ddaf5b7b3c8e3d2f5ad647ebd7
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon Sep 9 14:47:10 2019 -0500
Fix ticket_is_linked_to_inc test regex for elevator themes
diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 9ff65a6d..36c9e7fc 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -188,7 +188,7 @@ sub ticket_is_linked_to_inc {
foreach my $inc( ref $incs? @$incs : ($incs) ) {
my $desc = shift || "Ticket $id is linked to the Incident #$inc";
$self->content_like(
- qr{Incident:\s*</td>\s*<td[^>]*?>.*?<td[^>]*?><b><a\s+href="/RTIR/Incident/Display.html\?id=\Q$inc\E">\Q$inc\E</a></b></td>}ism,
+ qr{<td[^>]*?><b><a\s+href="/RTIR/Incident/Display.html\?id=\Q$inc\E">\Q$inc\E</a></b></td>}ism,
$desc
) or return 0;
}
@@ -203,7 +203,7 @@ sub ticket_is_not_linked_to_inc {
foreach my $inc( @$incs ) {
my $desc = shift || "Ticket $id is not linked to the Incident #$inc";
$self->content_unlike(
- qr{Incident:\s*</td>\s*<td[^>]*?>.*?<a\s+href="/RTIR/Display.html\?id=\Q$inc\E">\Q$inc\E:\s+}ism,
+ qr{<td[^>]*?><b><a\s+href="/RTIR/Incident/Display.html\?id=\Q$inc\E">\Q$inc\E</a></b></td>}ism,
$desc
) or return 0;
}
commit e42a2dff086a5d18f2ad5ff4f5d2bd9d7eea1f9b
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon Sep 9 17:55:05 2019 -0500
Migrate RTIR/Incident/Display to elevator themes
diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 09b6f0a3..82bdc26e 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -70,7 +70,7 @@ my %actions;
$args{value} = $escaper->($args{value});
# don't execute on non-rtir tickets or in SelfService
return $args{value} unless defined $args{type} and !$SelfService;
- return qq{<a href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."q=".$args{value}).qq{">$args{value}</a>};
+ return qq{ <a href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."q=".$args{value}).qq{">$args{value}</a>};
},
url => sub {
my %args = @_;
@@ -82,7 +82,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -96,7 +96,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -108,17 +108,17 @@ my %actions;
$args{host} ||= $args{value};
my $escaped_host = $escaper->($args{host});
- my $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
+ my $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
.loc('Lookup IP') .q{</a>};
if ( $args{incident} && !RT->Config->Get('RTIR_DisableCountermeasures') ) {
- $result .= qq{<a class="button button-small btn btn-lg btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
+ $result .= qq{ <a class="button button-small btn btn-lg btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
RT::IR->HREFTo("CreateInQueue.html?Incident=".$args{incident}."&Lifecycle=".RT::IR->lifecycle_countermeasure.qq{&IP-Value=$escaped_host})
.qq{">Block</a>};
}
if ( $args{'object'} && $args{'object'}->id ) {
my $cf = RT::IR::GetCustomField('IP');
my $tid = $args{'object'}->id;
- $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
+ $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo("Edit.html?id=".$tid
.qq{&Object-RT::Ticket-$tid-CustomField-}. $cf->id .qq{-AddValue=$escaped_host}
.q{&SaveChanges=1})
@@ -161,7 +161,7 @@ my %actions;
if ( $r->uri =~ /Lookup.html$/ ) {
$result .= qq{<input type="checkbox" name="Requestorbox-$escaped_email" unchecked />};
}
- $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
+ $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo( "CreateInQueue.html"
. qq{?Incident=$args{'incident'}}
. qq{&Lifecycle=}.RT::IR->lifecycle_investigation
@@ -182,7 +182,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
.loc('lookup') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
@@ -193,7 +193,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
.loc('lookup host') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 1623f4bc..7754fb73 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -53,7 +53,9 @@
<& /Ticket/Elements/ShowUpdateStatus, Ticket => $TicketObj, DisplayPath => 'RTIR' &>
<div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
-<table class="ticket-summary" width="100%"><tr><td class="boxcontainer" valign="top">
+
+<div class="row ticket-summary">
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'LeftColumnStart' );
<&| /Widgets/TitleBox,
@@ -61,58 +63,80 @@
title_href => RT::IR->HREFTo("Edit.html?id=".$id),
class=> 'ticket-info-basics',
&>
-
-<table>
-
+ <div>
% if (my $constituency = RT::IR->ConstituencyFor($TicketObj)) {
- <tr>
- <td class="label"><% loc("Constituency") %>:</td>
- <td class="value">
- <% $constituency %>
- </td>
- </tr>
- <tr>
-% }
-
-
- <tr>
- <td class="label"><% loc("Queue") %>:</td>
- <td class="value" colspan="2">
- <% $TicketObj->QueueObj->Name %>
- </td>
- </tr>
- <tr>
- <td class="label"><% loc("Status") %>:</td>
- <td class="value" colspan="2">
- <% $TicketObj->Status %>
- </td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Constituency") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $constituency %></span>
+ </div>
+ </div>
+% }
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Queue") %>
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $TicketObj->QueueObj->Name %></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Status") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $TicketObj->Status %></span>
+ </div>
+ </div>
% if ( !$TicketObj->QueueObj->SLADisabled ) {
- <tr class="sla">
- <td class="label"><&|/l&>SLA</&>:</td>
- <td class="value"><% loc($TicketObj->SLA) %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% loc($TicketObj->SLA) %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><&|/l&>Owner</&>:</td>
- <td class="value"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><% $TicketObj->Subject %></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Priority</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowPriority, Ticket => $TicketObj &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><%loc('[_1] min', $TimeWorked)%></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $TicketObj->Subject %></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Priority</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowPriority, Ticket => $TicketObj &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Worked</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><%loc('[_1] min', $TimeWorked)%></span>
+ </div>
+ </div>
<& /Elements/ShowCustomFields, Grouping => 'Basics', Object => $TicketObj, Table => 0 &>
-</table>
+ </div>
+
</&>
<& /Elements/ShowCustomFieldCustomGroupings,
@@ -132,7 +156,8 @@
<& /Ticket/Elements/ShowAttachments, Ticket => $TicketObj, Attachments => $attachments &>
<& /Ticket/Elements/ShowRequestor, Ticket => $TicketObj, DisplayPath => RT::IR->HREFTo("Display.html") &>
-</td><td class="boxcontainer" valign="top">
+ </div>
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'RightColumnStart' );
% foreach my $lifecycle ( RT::IR->lifecycle_report, RT::IR->lifecycle_investigation, RT::IR->lifecycle_countermeasure ) {
@@ -144,8 +169,8 @@
<& /RTIR/Elements/ShowArticles, Ticket => $TicketObj &>
% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'RightColumnEnd' );
-
-</td></tr></table>
+ </div>
+</div>
</&></div>
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 31011680..0b20486f 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -81,11 +81,13 @@ body.rtir #topactions { min-width: 44em; white-space: no-wrap; }
width: 80%;
}
+/* TODO: this section of styling has been commented out to disable colored tabs until we re-implement.
body.rtir .titlebox.ticket-info-articles .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-report .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-incident .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-investigation .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-countermeasure .titlebox-title .left { background-color: #316531; color: #fff; }
+*/
body.rtir #comp-RTIR-Search #body {
commit ecec102a57d3fd9db20e089f597eb73e51a4e00a
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Wed Sep 11 14:40:28 2019 -0500
Migrate RTIR/Incident/Create to elevator themes
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 549935d4..8883e546 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -91,71 +91,94 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<div class="ticket-create-basics">
<&| /Widgets/TitleBox, title => 'Basics', class => 'ticket-info-basics' &>
-<table width="100%" border="0">
% if ($constituency) {
-<tr class="constituency"><td class="label"><% loc('Constituency') %>:</td>
- <td class="value"><% $constituency %></td></tr>
-
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc('Constituency') %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $constituency %></span>
+ </div>
+ </div>
% }
% if ( $Split ) {
-<tr class="split-from"><td class="label"><% loc('Split from') %>:</td>
- <td class="value"><a href="<%RT::IR->HREFTo('Incident/Display.html?id='.$SplitObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $SplitObj->QueueObj->Lifecycle), $SplitObj->Id, $SplitObj->Subject) %></a></td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc('Split from') %>:
+ </div>
+ <div class="value col-md-9">
+ <a href="<%RT::IR->HREFTo('Incident/Display.html?id='.$SplitObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $SplitObj->QueueObj->Lifecycle), $SplitObj->Id, $SplitObj->Subject) %></a>
+ </div>
+ </div>
% }
-
% if ( $ChildObj ) {
-<tr class="link-with"><td class="label"><% loc('Link with') %>:</td>
- <td class="value"><a href="<%RT::IR->HREFTo('Display.html?id='.$ChildObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $ChildObj->QueueObj->Lifecycle), $ChildObj->Id, $ChildObj->Subject) %></a></td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc('Link with') %>:
+ </div>
+ <div class="value col-md-9">
+ <a href="<%RT::IR->HREFTo('Display.html?id='.$ChildObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $ChildObj->QueueObj->Lifecycle), $ChildObj->Id, $ChildObj->Subject) %></a>
+ </div>
+ </div>
% }
-
-
-<tr class="queue">
- <td class="label"><&|/l&>Queue</&>:</td>
- <td colspan="2">
- <& /Ticket/Elements/ShowQueue, QueueObj => $QueueObj &>
- </td>
-</tr>
-
-
-
-<tr class="status">
- <td class="label"><&|/l&>Status</&>:</td>
- <td colspan="2">
- <& /Ticket/Elements/SelectStatus,
- Name => 'Status',
- Object => $QueueObj,
- DefaultValue => 0,
- Default => $ARGS{Status} || $QueueObj->LifecycleObj->DefaultOnCreate,
- &>
- </td>
-</tr>
-<tr class="owner">
- <td class="label"><&|/l&>Owner</&>:</td>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Queue</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowQueue, QueueObj => $QueueObj &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Status</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Ticket/Elements/SelectStatus,
+ Name => 'Status',
+ Object => $QueueObj,
+ DefaultValue => 0,
+ Default => $ARGS{Status} || $QueueObj->LifecycleObj->DefaultOnCreate,
+ &>
+ </div>
+ </div>
+
+ <div class="form-row owner">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
% if ( $ChildObj ) {
- <td class="value">
+ <div class="value col-md-9">
<& /Elements/ShowUser, User => $ChildObj->OwnerObj &>
<input type="hidden" name="Owner" value="<% $ChildObj->Owner %>" />
- </td>
+ </div>
% } else {
- <td class="value"><& /Elements/SelectOwner,
+ <div class="value col-md-9">
+ <& /Elements/SelectOwner,
Name => 'Owner',
QueueObj => $QueueObj,
Default => $ARGS{'Owner'} || $session{'CurrentUser'}->Id
- &></td>
+ &>
+ </div>
% }
% if ( !$QueueObj->SLADisabled ) {
- <tr class="sla">
- <td class="label"><&|/l&>SLA</&>:</td>
- <td class="value"><& /Elements/SelectSLA,
- Name => 'SLA',
- Default => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
- DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
- QueueObj => $QueueObj,
- &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectSLA,
+ Name => 'SLA',
+ Default => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
+ DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
+ QueueObj => $QueueObj,
+ &>
+ </div>
+ </div>
% }
-</tr>
+ </div>
-<& /RTIR/Elements/EditCustomFields,
+<& /RTIR/Elements/EditCustomFields,
%ARGS,
TicketObj => $ticket,
QueueObj => $QueueObj,
@@ -163,7 +186,7 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
CFDefaults => \%CFDefaults,
&>
-</table></&>
+</&>
<& /Elements/EditCustomFieldCustomGroupings,
%ARGS,
@@ -178,30 +201,41 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<div class="ticket-create-details">
<&| /Widgets/TitleBox, title => $Title, class => 'ticket-info-message' &>
-<table width="100%" border="0">
-
- <tr class="subject">
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input type="text" name="Subject" maxsize="200" value="<% $ARGS{'Subject'} || '' %>" /></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Subject" value="<% $ARGS{'Subject'} || '' %>" />
+ </div>
+ </div>
% if ( $gnupg_widget ) {
-<tr><td> </td><td>
-<& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
-</td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
+ </div>
+ </div>
% }
-<tr class="message"><td class="labeltop"><&|/l&>Message</&>:</td>
-<td>
-<& /Elements/MessageBox,
- Default => $ARGS{'Content'},
- IncludeSignature => 0,
-&>
-</td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Message</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/MessageBox,
+ Default => $ARGS{'Content'},
+ IncludeSignature => 0,
+ &>
+ </div>
+ </div>
<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
-</table></&>
+</&>
<&| /Widgets/TitleBox, title => loc('Details'), class => 'ticket-info-details' &>
<& /Ticket/Elements/EditBasics,
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 0b20486f..40d3c57f 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -97,12 +97,6 @@ body.rtir #comp-RTIR-Search .submit {
width: 58%;
}
-body.rtir #ticket-create-incident input[type=text]:not(.datepicker),
-body.rtir #ticket-create-investigation input[type=text]
-{
- width: 90%;
-}
-
body.sidebyside.rtir #ticket-create-incident .ticket-create-basics,
body.sidebyside.rtir #ticket-create-investigation .ticket-create-basics
{
commit 09016018037d0d9e0228b8d62a76f1c53d108c0e
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Wed Sep 11 18:57:14 2019 -0500
Migrate RTIR/Create to elevator themes
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 19785a14..203ec3b3 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -81,13 +81,16 @@
<div id="ticket-create-metadata">
<&| /Widgets/TitleBox, title => loc("Basics"), class=>'ticket-info-basics' &>
-<table width="100%" border="0">
% if ( $SplitObj ) {
- <tr class="split">
- <td class="label"><&|/l&>Split from</&>:</td>
- <td class="value"><% $SplitObj->id %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Split from</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $SplitObj->id %></span>
+ </div>
+ </div>
% }
<& /RTIR/Elements/SelectIncident,
@@ -104,6 +107,7 @@
comp => '/Ticket/Elements/ShowQueue',
args => {
QueueObj => $QueueObj,
+ Wrap => 1,
},
},
{
@@ -153,7 +157,7 @@
<& /Ticket/Elements/EditTransactionCustomFields,
%ARGS, QueueObj => $QueueObj, InTable => 1,
&>
-</table></&>
+</&>
<& /Elements/EditCustomFieldCustomGroupings,
%ARGS,
@@ -163,7 +167,7 @@
Groupings => [ RT::CustomField->CustomGroupings('RTIR::Ticket'), '' ],
&>
<&| /Widgets/TitleBox, title => loc("Dates"), class=>'ticket-info-dates' &>
-<table width="100%" border="0">
+
<& /Ticket/Elements/EditBasics,
InTable => 1,
QueueObj => $QueueObj,
@@ -180,10 +184,9 @@
},
],
&>
-</table></&>
+</&>
<&| /Widgets/TitleBox, title => loc("Time"), class=>'ticket-info-time' &>
-<table width="100%" border="0">
<& /Ticket/Elements/EditBasics,
InTable => 1,
QueueObj => $QueueObj,
@@ -214,7 +217,7 @@
},
],
&>
-</table></&>
+</&>
% if ( RT::IR->IsInvestigationQueue($QueueObj) && @IncidentObj ) {
<& /RTIR/Elements/AttachReports, Ticket => \@IncidentObj &>
@@ -225,82 +228,111 @@
<div id="ticket-create-message">
<&| /Widgets/TitleBox, title => $Title, class => 'messagedetails' &>
-<table width="100%" border="0">
- <tr>
- <td class="label"><&|/l&>Correspondents</&>:</td>
- <td class="value"><& /Elements/EmailInput,
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Correspondents</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => 'Requestors', Default => $ARGS{'Requestors'}, Size => undef,
- &></td>
- </tr>
- <tr>
- <td class="label"> </td>
- <td class="comment">
- <input type="checkbox" name="SkipNotification" value="Requestors" <% (grep $_ eq 'Requestors', @SkipNotification)? 'checked': '' %> />
- <&|/l&>Don't send any emails to correspondents.</&>
- </td>
- </tr>
+ &>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <div class="custom-control custom-checkbox">
+ <input class="custom-control-input checkbox" type="checkbox" name="SkipNotification" id="SkipNotification" value="Requestors" <% (grep $_ eq 'Requestors', @SkipNotification)? 'checked': '' %> />
+ <label class="custom-control-label" for="SkipNotification"><&|/l&>Don't send any emails to correspondents.</&></label>
+ </div>
+ </div>
+ </div>
+
% $m->callback( CallbackName => 'AfterRequestors', ARGSRef => \%ARGS );
- <tr>
- <td class="label"><&|/l&>Cc</&>:</td>
- <td class="value"><& /Elements/EmailInput,
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => 'Cc', Default => $ARGS{'Cc'}, Size => undef,
- &></td>
- </tr>
- <tr>
- <td class="label"> </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>
-
- <tr>
- <td class="label"><&|/l&>Admin Cc</&>:</td>
- <td class="value"><& /Elements/EmailInput,
+ &>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <i><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&></i>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Admin Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => 'AdminCc', Default => $ARGS{'AdminCc'}, Size => undef,
- &></td>
- </tr>
- <tr>
- <td class="label"> </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>
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <i><&|/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.)</&></i>
+ </div>
+ </div>
% my $roles = $QueueObj->CustomRoles;
% $roles->LimitToMultipleValue;
% while (my $role = $roles->Next) {
- <tr>
- <td class="label"><% $role->Name %>:</td>
- <td class="value"><& /Elements/EmailInput,
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% $role->Name %>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => $role->GroupType, Default => $ARGS{$role->GroupType}, Size => undef,
- &></td>
- </tr>
+ &>
+ </div>
+ </div>
% if ($role->EntryHint) {
- <tr>
- <td class="label"> </td>
- <td class="comment"><i><font size="-2">
- <% $role->EntryHint %>
- </font></i></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <i><% $role->EntryHint %></i>
+ </div>
+ </div>
% }
% }
- <tr>
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input type="text" name="Subject" maxsize="200" value="<% $Subject || '' %>" /></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Subject" value="<% $Subject || '' %>" />
+ </div>
+ </div>
% if ( $gnupg_widget ) {
- <tr><td> </td><td class="value">
- <& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
- </td></tr>
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><&|/l&>Message</&>:</td>
- <td class="value">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Message</&>:
+ </div>
+ <div class="value col-md-9">
<%perl>
my $include_signature = 1;
unless (exists $ARGS{Content}) {
@@ -339,12 +371,12 @@
% } else {
<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
% }
- </td>
- </tr>
+ </div>
+ </div>
<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
-</table></&>
+</&>
<& /Elements/Submit, Name => "Create", Label => $SubmitCaption, SubmitId => 'create-ticket' &>
</div></div>
diff --git a/html/RTIR/Elements/SelectIncident b/html/RTIR/Elements/SelectIncident
index 7cd77d1e..11b7ea6c 100644
--- a/html/RTIR/Elements/SelectIncident
+++ b/html/RTIR/Elements/SelectIncident
@@ -45,25 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr class="incident">
- <td class="label"><&|/l&>Incident</&>:</td>
- <td class="value">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Incident</&>:
+ </div>
+ <div class="value col-md-9">
+ <div class="form-row">
% if ( @potential ) {
- <& /RTIR/Search/Elements/ShowResults,
- Query => $query,
- Rows => 0,
- Format => $format,
- DisplayFormat => $dformat,
- AllowSorting => 0,
- ShowHeader => 0,
- &>
+ <& /RTIR/Search/Elements/ShowResults,
+ Query => $query,
+ Rows => 0,
+ Format => $format,
+ DisplayFormat => $dformat,
+ AllowSorting => 0,
+ ShowHeader => 0,
+ &>
% }
% if ( $hide ) {
<input type="hidden" name="<% $Name %>" value="<% $potential[0] %>" />
% }
- <input type="text" name="<% $Name %>" size="16" maxsize="16" value="" />
+ <div class="col-md-auto">
+ <input class="form-control" type="text" name="<% $Name %>" value="" />
+ </div>
% if ( $config->{'Multiple'} || @potential ) {
- <input type="submit" name="<% "More$Name" %>" value="<% $config->{'Multiple'}? loc('More') : loc('Other') %>" class="button" />
+ <div class="col-md-auto">
+ <input type="submit" name="<% "More$Name" %>" value="<% $config->{'Multiple'}? loc('More') : loc('Other') %>" class="form-control btn btn-primary button" />
+ </div>
% }
% if ( !$config->{'Required'} && $dformat =~ /RadioButton/ ) {
@@ -73,15 +80,17 @@ jQuery(function(){ jQuery('input[type="radio"][name="<% $Name %>"]').uncheckable
//]]>
</script>
% }
- </td>
-</tr>
-<tr>
- <td class="label"> </td>
- <td class="comment">
+ </div>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
(<&|/l&>Id of an Incident to link a new ticket to</&>.
<% $config->{'Required'}? '<strong>'.loc('Required').'</strong>': loc('Optional') |n %>.)
- </td>
-</tr>
+ </div>
+ </div>
<%ARGS>
$Type
$Name => 'Incident'
commit 24691153ebec349c5efa32baefb8173cafdddde1
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Thu Sep 12 17:40:32 2019 -0500
Migrate RTIR/Tools/Lookup to elevator themes
diff --git a/html/RTIR/Tools/Elements/LookupRelatedTickets b/html/RTIR/Tools/Elements/LookupRelatedTickets
index a9b12831..5c6a08c2 100644
--- a/html/RTIR/Tools/Elements/LookupRelatedTickets
+++ b/html/RTIR/Tools/Elements/LookupRelatedTickets
@@ -45,28 +45,18 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table width="100%" border="0" cellpadding="2" cellspacing="0">
-<tr><td valign="top" width="50%">
-
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_incident, Query => $query &>
-
-</td><td valign="top" width="50%">
-
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_investigation, Query => $query &>
-
-</td></tr><tr><td valign="top" width="50%">
-
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_report, Query => $query &>
-
-</td><td width="50%" valign="top">
-
+<div class="row">
+ <div class="boxcontainer col-md-6">
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_incident, Query => $query &>
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_investigation, Query => $query &>
+ </div>
+ <div class="boxcontainer col-md-6">
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_report, Query => $query &>
% unless ( RT->Config->Get('RTIR_DisableCountermeasures') ) {
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_countermeasure, Query => $query &>
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_countermeasure, Query => $query &>
% }
-
-</td></tr>
-
-</table>
+ </div>
+</div>
<%args>
$LookupType => undef
$q => undef
diff --git a/html/RTIR/Tools/Elements/SelectWhoisServer b/html/RTIR/Tools/Elements/SelectWhoisServer
index cf095538..7a993488 100644
--- a/html/RTIR/Tools/Elements/SelectWhoisServer
+++ b/html/RTIR/Tools/Elements/SelectWhoisServer
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<select name="<% $Name %>">
+<select class="form-control selectpicker" name="<% $Name %>">
<%PERL>
foreach my $s ( sort grep $servers{ $_ }, keys %servers ) {
my $srv = $servers{ $s };
diff --git a/html/RTIR/Tools/Elements/ToolFormIframe b/html/RTIR/Tools/Elements/ToolFormIframe
index 832aeb59..be5db02d 100644
--- a/html/RTIR/Tools/Elements/ToolFormIframe
+++ b/html/RTIR/Tools/Elements/ToolFormIframe
@@ -45,25 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr>
-<td valign="middle" class="label"><%loc('Research Tool')%>:</td>
-<td valign="middle">
<form action="Lookup.html" method="get">
+ <div class="form-row">
+ <div class="col-md-2">
+ <span class="current-value form-control"><%loc('Research Tool')%>:</span>
+ </div>
% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
- <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
+ <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
% }
- <span class="input">
- <input type="text" size="30" name="q" value="<% $q %>" /> at
- <select name="ResearchTool">
+ <div class="col-md-4">
+ <input class="form-control" type="text" name="q" value="<% $q %>" />
+ </div>
+ <div class="col-md-auto">
+ <span class="current-value form-control">at</span>
+ </div>
+ <div class="col-md-3">
+ <select class="form-control selectpicker" name="ResearchTool">
% for my $tool (grep {defined } keys %$research_tools) {
<option value="<%$tool%>" <%$tool eq $ResearchTool ? 'SELECTED' : ''%>><% $research_tools->{$tool}->{FriendlyName} %></option>
%}
</select>
- </span>
- <input type="submit" value="<%loc('Go')%>" />
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control btn btn-primary button" type="submit" value="<%loc('Go')%>" />
+ </div>
+ </div>
</form>
-</td>
-</tr>
<%args>
$q => ''
$ResearchTool => ''
diff --git a/html/RTIR/Tools/Elements/ToolFormTraceroute b/html/RTIR/Tools/Elements/ToolFormTraceroute
index 561ea90d..92b115e7 100644
--- a/html/RTIR/Tools/Elements/ToolFormTraceroute
+++ b/html/RTIR/Tools/Elements/ToolFormTraceroute
@@ -45,18 +45,22 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr>
-<td valign="top" class="label"><%loc('Traceroute to')%>:</td>
-<td valign="top">
<form action="Traceroute.html" method="get" target="_blank">
+ <div class="form-row">
+ <div class="col-md-2">
+ <span class="current-value form-control"><%loc('Traceroute to')%>:</span>
+ </div>
% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
- <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
+ <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
% }
- <span class="input"><input type="text" size="30" name="q" value="<% $q %>" /></span>
- <input type="submit" value="<%loc('Go')%>" />
+ <div class="col-md-4">
+ <input class="form-control" type="text" name="q" value="<% $q %>" />
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control btn btn-primary button" type="submit" value="<%loc('Go')%>" />
+ </div>
+ </div>
</form>
-</td>
-</tr>
<%args>
$q => ''
@PassArguments => ()
diff --git a/html/RTIR/Tools/Elements/ToolFormWhois b/html/RTIR/Tools/Elements/ToolFormWhois
index 3ef3220f..0fc70627 100644
--- a/html/RTIR/Tools/Elements/ToolFormWhois
+++ b/html/RTIR/Tools/Elements/ToolFormWhois
@@ -45,21 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr>
-<td valign="top" class="label"><%loc('WHOIS')%>:</td>
-<td valign="top">
<form name="ToolFormWhois" action="Lookup.html" method="get">
+ <div class="form-row">
+ <div class="col-md-2">
+ <span class="current-value form-control"><%loc('WHOIS')%>:</span>
+ </div>
% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
- <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
+ <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
% }
- <span class="input">
- <input type="text" size="30" name="q" value="<% $q %>" /> at
- <& SelectWhoisServer, Name => 'WhoisServer', Default => $WhoisServer &>
- </span>
- <input type="submit" value="<%loc('Go')%>" />
+ <div class="col-md-4">
+ <input class="form-control" type="text" name="q" value="<% $q %>" />
+ </div>
+ <div class="col-md-auto">
+ <span class="current-value form-control">at</span>
+ </div>
+ <div class="col-md-3">
+ <& SelectWhoisServer, Name => 'WhoisServer', Default => $WhoisServer &>
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control btn btn-primary button" type="submit" value="<%loc('Go')%>" />
+ </div>
+ </div>
</form>
-</td>
-</tr>
<%args>
$q => ''
$WhoisServer => undef
diff --git a/html/RTIR/Tools/Elements/Tools b/html/RTIR/Tools/Elements/Tools
index ec022b51..27c12ece 100644
--- a/html/RTIR/Tools/Elements/Tools
+++ b/html/RTIR/Tools/Elements/Tools
@@ -49,14 +49,20 @@
my $tools = RT->Config->Get('RTIRResearchTools') || ();
</%INIT>
-<table class="lookup-tool-forms">
+<div class="row">
+ <div class="col-md-6">
% for my $tool (@$tools) {
% if ($m->comp_exists('ToolForm' . $tool)) {
% $m->comp('ToolForm' . $tool, %ARGS);
% }
% }
-</table>
+ </div>
+</div>
+% unless ( $ARGS{ HideResults } ) {
+<br>
+<div class="row">
+ <div class="col-md-12">
<%perl>
for my $tool (@$tools) {
if ($m->comp_exists('ToolResults' . $tool)) {
@@ -64,3 +70,6 @@ for my $tool (@$tools) {
}
}
</%perl>
+ </div>
+</div>
+% }
commit 3833dcfe411ecab9a2d4374bc433563d1efd9fdc
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Fri Sep 13 19:14:41 2019 -0500
Migrate RTIR/Reporting to elevator themes
diff --git a/html/RTIR/Reporting/index.html b/html/RTIR/Reporting/index.html
index 1e9e8623..492507b0 100644
--- a/html/RTIR/Reporting/index.html
+++ b/html/RTIR/Reporting/index.html
@@ -49,45 +49,58 @@
<& /Elements/Tabs &>
<form action="index.html" method="post">
-<table>
- <tr>
- <td class="label"><&|/l&>Constituency</&>:</td>
- <td class="value">
- <& /Elements/EditCustomField,
- QueueObj => RT::Queue->new($session{CurrentUser}),
- CustomField => $constituency_cf,
- Name => 'Constituency',
- &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Start Date:</&></td>
- <td class="input">
- <& /Elements/SelectDate, Name => 'StartDate', Default => $start->AsString &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>End Date:</&></td>
- <td class="input">
- <& /Elements/SelectDate, Name => 'EndDate', Default => $end->AsString &>
- </td>
- </tr>
-</table>
-<& /Elements/Submit,
- Caption => loc("Generate a delimited text report"),
- Name => "TextReport",
- Label => loc("Text"),
-&>
-<& /Elements/Submit,
- Name => "HTMLReport",
- Caption => loc("Generate a HTML report"),
- Label => loc("HTML"),
-&>
-<& /Elements/Submit,
- Name => "SpreadsheetReport",
- Caption => loc("Generate a spreadsheet report"),
- Label => loc("Spreadsheet"),
-&>
+<div class="row">
+ <div class="col-md-3">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Constituency</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EditCustomField,
+ QueueObj => RT::Queue->new($session{CurrentUser}),
+ CustomField => $constituency_cf,
+ Name => 'Constituency',
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Start Date:</&>
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectDate, Name => 'StartDate', Default => $start->AsString &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>End Date:</&>
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectDate, Name => 'EndDate', Default => $end->AsString &>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="row">
+ <div class="col-md-12">
+ <& /Elements/Submit,
+ Caption => loc("Generate a delimited text report"),
+ Name => "TextReport",
+ Label => loc("Text"),
+ &>
+ <& /Elements/Submit,
+ Name => "HTMLReport",
+ Caption => loc("Generate a HTML report"),
+ Label => loc("HTML"),
+ &>
+ <& /Elements/Submit,
+ Name => "SpreadsheetReport",
+ Caption => loc("Generate a spreadsheet report"),
+ Label => loc("Spreadsheet"),
+ &>
+ </div>
+</div>
</form>
<%INIT>
commit 7d376de2eeeba51885d9ac13ad632e96028522ae
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon Sep 16 16:47:15 2019 -0500
Migrate RTIR/Incident/Reply to elevator themes
diff --git a/html/RTIR/Elements/UpdateData b/html/RTIR/Elements/UpdateData
index d75f56d7..69ad23dd 100644
--- a/html/RTIR/Elements/UpdateData
+++ b/html/RTIR/Elements/UpdateData
@@ -52,19 +52,29 @@
<& /Ticket/Elements/AddAttachments, %ARGS &>
% if ( $Ticket ) {
-<tr><td colspan="2"><& /RTIR/Elements/AttachReports, Ticket => $Ticket &></td></tr>
+<div class="form-row">
+ <div class="col-md-12">
+ <& /RTIR/Elements/AttachReports, Ticket => $Ticket &>
+ </div>
+</div>
% }
% if ( $GnuPGWidget ) {
-<tr><td> </td><td>
-<& /Elements/Crypt/SignEncryptWidget,
- self => $GnuPGWidget,
- TicketObj => $Ticket,
-&>
-</td></tr>
+<div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Crypt/SignEncryptWidget,
+ self => $GnuPGWidget,
+ TicketObj => $Ticket,
+ &>
+ </div>
+</div>
% }
-<tr><td class="label" valign="top"><&|/l&>Message</&>:</td><td>
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Message</&>:
+ </div>
+ <div class="value col-md-9">
<& /Articles/Elements/BeforeMessageBox, %ARGS &>
% $m->callback( %ARGS, CallbackPage => '/Ticket/Update.html', CallbackName => 'BeforeMessageBox' );
% if ( exists $ARGS{'UpdateContent'} ) {
@@ -73,7 +83,8 @@
% } else {
<& /Elements/MessageBox, Name => "UpdateContent", %ARGS &>
% }
-</td></tr>
+ </div>
+</div>
<%ARGS>
$Ticket => undef
diff --git a/html/RTIR/Incident/Elements/ReplyForm b/html/RTIR/Incident/Elements/ReplyForm
index f13e3952..0b9cb174 100644
--- a/html/RTIR/Incident/Elements/ReplyForm
+++ b/html/RTIR/Incident/Elements/ReplyForm
@@ -47,54 +47,74 @@
%# END BPS TAGGED BLOCK }}}
<&| /Widgets/TitleBox, title => $Title &>
-<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 class="label"><&|/l&>Update Type</&>:</td>
-<td class="value">
-<select name="UpdateType">
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><i>(<&|/l&>uses subjects from tickets</&>)</i></span>
+ </div>
+</div>
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Update Type</&>:
+ </div>
+ <div class="value col-md-9">
+ <select class="selectpicker form-control" name="UpdateType">
% if( $AllowComment ) {
- <option value="private" <% $CommentDefault %>><&|/l&>Comments (Not sent to requestors)</&></option>
+ <option value="private" <% $CommentDefault %>><&|/l&>Comments (Not sent to requestors)</&></option>
% }
% if( $AllowResponse ) {
- <option value="response" <% $ResponseDefault %>><&|/l&>Response to requestors</&></option>
+ <option value="response" <% $ResponseDefault %>><&|/l&>Response to requestors</&></option>
% }
-</select>
-</td></tr>
+ </select>
+ </div>
+</div>
% if ( $TicketObj ) {
-<tr><td class="label"><&|/l&>Resolution</&>:</td>
-<td class="value">
-<& /RTIR/Elements/EditRTIRField,
- TicketObj => $TicketObj,
- QueueObj => $TicketObj->QueueObj,
- Name => 'Resolution',
- Default => (
- $TicketObj->FirstCustomFieldValue('Resolution') ||
- RT->Config->Get('RTIR_CustomFieldsDefaults')->{'Resolution'}{$Status}
- ),
- Rows => 1,
-&></td></tr>
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Resolution</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /RTIR/Elements/EditRTIRField,
+ TicketObj => $TicketObj,
+ QueueObj => $TicketObj->QueueObj,
+ Name => 'Resolution',
+ Default => (
+ $TicketObj->FirstCustomFieldValue('Resolution') ||
+ RT->Config->Get('RTIR_CustomFieldsDefaults')->{'Resolution'}{$Status}
+ ),
+ Rows => 1,
+ &>
+ </div>
+</div>
% }
-
-<tr class="owner"><td class="label"><&|/l&>Owner</&>:</td>
-<td class="value">
-<& /Elements/SelectOwner,
- Name => "Owner",
- Default => $Owner || $session{'CurrentUser'}->Id || undef,
-&>
-<&|/l&>Worked</&>:
-<& /Elements/EditTimeValue,
- Name => 'UpdateTimeWorked',
- Default => $ARGS{'UpdateTimeWorked'} || '',
-&>
-</td></tr>
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectOwner,
+ Name => "Owner",
+ Default => $Owner || $session{'CurrentUser'}->Id || undef,
+ &>
+ </div>
+</div>
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Worked</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EditTimeValue,
+ Name => 'UpdateTimeWorked',
+ Default => $ARGS{'UpdateTimeWorked'} || '',
+ &>
+ </div>
+</div>
<& /RTIR/Elements/UpdateData, %ARGS, Ticket => $TicketObj, QueueObj => $QueueObj &>
-</table>
-
</&>
<%INIT>
diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index 0bf99645..dcfa8444 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -68,6 +68,7 @@
<& /Elements/Crypt/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
+<div class="form-row">
<h2><&|/l&>Reporters</&></h2>
<& /RTIR/Search/Elements/ShowResults,
BaseURL => $BaseURL,
@@ -80,7 +81,9 @@
OrderBy => $OrderBy,
Order => $Order,
&>
+</div>
% if ( $All ) {
+<div class="form-row">
<h2><&|/l&>Investigation Correspondents</&></h2>
<& /RTIR/Search/Elements/ShowResults,
BaseURL => $BaseURL,
@@ -93,7 +96,9 @@
OrderBy => $OrderBy,
Order => $Order,
&>
+</div>
% unless( RT->Config->Get('RTIR_DisableCountermeasures') ) {
+<div class="form-row">
<h2><&|/l&>Countermeasure Correspondents</&></h2>
<& /RTIR/Search/Elements/ShowResults,
BaseURL => $BaseURL,
@@ -106,6 +111,7 @@
OrderBy => $OrderBy,
Order => $Order,
&>
+</div>
% }
% }
commit a8537ca4132fee9b3ca3dc36e7d69c1df65f7536
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Sep 17 18:37:48 2019 -0500
Migrate RTIR/Update to elevator themes
diff --git a/html/RTIR/Update.html b/html/RTIR/Update.html
index 83068b6b..5dd05861 100644
--- a/html/RTIR/Update.html
+++ b/html/RTIR/Update.html
@@ -63,23 +63,31 @@
<div id="ticket-update-metadata">
<&|/Widgets/TitleBox, title => loc('Ticket and Transaction') &>
-<table width="100%" border="0">
-<tr><td class="label"><&|/l&>Update Type</&>:</td>
-<td class="value"><select name="UpdateType">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Update Type</&>:
+ </div>
+ <div class="value col-md-9">
+ <select class="selectpicker form-control" name="UpdateType">
% if ($CanComment) {
- <option value="private" <% $CommentDefault || '' %>><&|/l&>Comments (Not sent to requestors)</&></option>
+ <option value="private" <% $CommentDefault || '' %>><&|/l&>Comments (Not sent to requestors)</&></option>
% }
% if ($CanRespond) {
- <option value="response" <% $ResponseDefault || '' %>><&|/l&>Response to requestors</&></option>
+ <option value="response" <% $ResponseDefault || '' %>><&|/l&>Response to requestors</&></option>
% }
-</select>
-</td></tr>
-
-<tr>
- <td class="label"><&|/l&>Status</&>:</td>
- <td class="value"><% loc($Ticket->Status) %></td>
-</tr>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Status</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% loc($Ticket->Status) %></span>
+ </div>
+ </div>
<& /Ticket/Elements/EditBasics,
TicketObj => $Ticket,
@@ -115,7 +123,7 @@
%ARGS, TicketObj => $Ticket, InTable => 1,
&>
-</table></&></div>
+</&></div>
<div id="ticket-update-message">
@@ -124,7 +132,7 @@
<script type="text/javascript">
jQuery( function() {
var updateScrips = function() {
- jQuery('#recipients div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/ShowSimplifiedRecipients',
+ jQuery('#recipients div.titlebox-content div.card-body').load( '<% RT->Config->Get('WebPath')%>/Helpers/ShowSimplifiedRecipients',
jQuery('form[name=TicketUpdate]').serialize(),
function() {
var txn_send_field = jQuery("#recipients input[name=TxnSendMailTo]");
@@ -140,22 +148,23 @@ jQuery( function() {
</script>
<&|/Widgets/TitleBox, title => loc('Message'), class => 'messagedetails' &>
-<table width="100%" border="0">
-<tr>
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input type="text" name="UpdateSubject" value="<% $Subject || '' %>" /></td>
-</tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="UpdateSubject" value="<% $Subject || '' %>" />
+ </div>
+ </div>
% $ARGS{IncludeSignature} = 0 if $Action ne 'Respond' && !RT->Config->Get('MessageBoxIncludeSignatureOnComment');
<& /RTIR/Elements/UpdateData, %ARGS, Ticket => $Ticket, GnuPGWidget => $gnupg_widget &>
-</table>
+</&></div>
<& /Elements/Submit, Name => 'SubmitTicket' &>
-</&></div>
-
</form>
<%INIT>
commit f02a074400ca4305791e76db6bdcbb298121593f
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Wed Sep 18 13:00:35 2019 -0500
Migrate RTIR/Merge to elevator themes
diff --git a/html/RTIR/Elements/MergeWith b/html/RTIR/Elements/MergeWith
index 9827e32d..a43a1e92 100644
--- a/html/RTIR/Elements/MergeWith
+++ b/html/RTIR/Elements/MergeWith
@@ -45,6 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<div class="row">
<h3><% $Title %></h3>
<& /RTIR/Search/Elements/ShowResults,
Lifecycle => $Lifecycle,
@@ -58,6 +59,7 @@
Order => $Order,
BaseURL => RT::IR->HREFTo("Merge/?id=$id"),
&>
+</div>
<%INIT>
my $Type = RT::IR::TicketType( Lifecycle => $Lifecycle );
commit 74dbe3d5b5e865d62087eb1d13f97a7fb3a98878
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Thu Sep 19 16:28:19 2019 -0500
Migrate modals to new elevator themes
diff --git a/MANIFEST b/MANIFEST
index a732fd23..e4ac3361 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -77,6 +77,7 @@ html/RTIR/Edit.html
html/RTIR/EditUsername
html/RTIR/Elements/AddWatchers
html/RTIR/Elements/AttachReports
+html/RTIR/Elements/CreateInRTIRQueue
html/RTIR/Elements/CreateInRTIRQueueModal
html/RTIR/Elements/CreateTicketInQueue
html/RTIR/Elements/DueIncidents
diff --git a/html/RTIR/CreateInQueue.html b/html/RTIR/CreateInQueue.html
index ad4ddada..77571253 100644
--- a/html/RTIR/CreateInQueue.html
+++ b/html/RTIR/CreateInQueue.html
@@ -50,11 +50,11 @@
&>
<& /Elements/Tabs &>
-<& /RTIR/Elements/CreateInRTIRQueueModal, %ARGS &>
+<& /RTIR/Elements/CreateInRTIRQueue, %ARGS &>
<%INIT>
-my $ticket_type = RT::IR::TicketType( Lifecycle => $Lifecycle );
-my $title = "Select Queue for New $ticket_type";
+$ARGS{ticket_type} = RT::IR::TicketType( Lifecycle => $Lifecycle );
+my $title = "Select Queue for New $ARGS{ticket_type}";
</%INIT>
<%ARGS>
$Lifecycle
diff --git a/html/RTIR/Elements/CreateInRTIRQueueModal b/html/RTIR/Elements/CreateInRTIRQueue
similarity index 70%
copy from html/RTIR/Elements/CreateInRTIRQueueModal
copy to html/RTIR/Elements/CreateInRTIRQueue
index f0e643a0..91cf1d68 100644
--- a/html/RTIR/Elements/CreateInRTIRQueueModal
+++ b/html/RTIR/Elements/CreateInRTIRQueue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2018 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
%# <sales at bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -45,24 +45,33 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form action="<% RT::IR->HREFTo('Create.html') %>" id="CreateInQueue">
+ <form action="<% RT::IR->HREFTo('Create.html') %>" id="CreateInQueue">
% if ($Incident) {
-<input type="hidden" name="Incident" value="<%$Incident%>"/>
+ <input type="hidden" name="Incident" value="<%$Incident%>"/>
% }
% if ($Child) {
-<input type="hidden" name="Child" value="<%$Child%>"/>
+ <input type="hidden" name="Child" value="<%$Child%>"/>
% }
- <&|/l_unsafe, $ticket_type,
- $m->scomp('/RTIR/Elements/SelectRTIRQueue',
- Name => 'Queue',
- Lifecycle => $Lifecycle,
- ShowNullOption => 0,
- LimitToConstituency => $limit_to_constituency,
- Constituency => $m->{'RTIR_ConstituencyFilter'} || $linked_constituency)
-
- &>Create a new [_1] in the queue [_2]</&>
- <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled [_1] creation form.", $ticket_type) &>
-</form>
+ <div class="form-row">
+ <div class="col-md-12 text-center">
+ <&|/l, $ticket_type &>Create a new [_1] in the queue</&>:
+ <div class="d-inline-block">
+ <& /RTIR/Elements/SelectRTIRQueue,
+ Name => 'Queue',
+ Lifecycle => $Lifecycle,
+ ShowNullOption => 0,
+ LimitToConstituency => $limit_to_constituency,
+ Constituency => $m->{'RTIR_ConstituencyFilter'} || $linked_constituency
+ &>
+ </div>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled [_1] creation form.", $ticket_type) &>
+ </div>
+ </div>
+ </form>
<%INIT>
$Lifecycle = $Lifecycle->[0] if (ref $Lifecycle eq 'ARRAY');
@@ -89,11 +98,11 @@ my $limit_to_constituency =
(RT::IR->StrictConstituencyLinking && $linked_constituency)
? 1:0;
-my $ticket_type = lc RT::IR::TicketType( Lifecycle => $Lifecycle );
+$ticket_type = lc $ticket_type;
</%INIT>
<%ARGS>
$Lifecycle
$Incident => undef
$Child => undef
+$ticket_type => undef
</%ARGS>
-
diff --git a/html/RTIR/Elements/CreateInRTIRQueueModal b/html/RTIR/Elements/CreateInRTIRQueueModal
index f0e643a0..28a7c484 100644
--- a/html/RTIR/Elements/CreateInRTIRQueueModal
+++ b/html/RTIR/Elements/CreateInRTIRQueueModal
@@ -45,51 +45,22 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form action="<% RT::IR->HREFTo('Create.html') %>" id="CreateInQueue">
-% if ($Incident) {
-<input type="hidden" name="Incident" value="<%$Incident%>"/>
-% }
-% if ($Child) {
-<input type="hidden" name="Child" value="<%$Child%>"/>
-% }
- <&|/l_unsafe, $ticket_type,
- $m->scomp('/RTIR/Elements/SelectRTIRQueue',
- Name => 'Queue',
- Lifecycle => $Lifecycle,
- ShowNullOption => 0,
- LimitToConstituency => $limit_to_constituency,
- Constituency => $m->{'RTIR_ConstituencyFilter'} || $linked_constituency)
-
- &>Create a new [_1] in the queue [_2]</&>
- <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled [_1] creation form.", $ticket_type) &>
-</form>
+<div class="modal-dialog modal-dialog-centered" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h5 class="modal-title"><&|/l, $ARGS{ticket_type} &>Create [_1]</&></h5>
+ <a href="javascript:void(0)" class="close" data-dismiss="modal" aria-label="Close">
+ <span aria-hidden="true">×</span>
+ </a>
+ </div>
+ <div class="modal-body">
+ <& /RTIR/Elements/CreateInRTIRQueue, %ARGS &>
+ </div>
+ </div>
+</div>
<%INIT>
$Lifecycle = $Lifecycle->[0] if (ref $Lifecycle eq 'ARRAY');
-
-my ($linked_ticket, $linked_constituency);
-
-if ($Incident) {
- $linked_ticket = RT::Ticket->new( $session{CurrentUser} );
- $linked_ticket->Load($Incident);
-}
-
-if ($Child) {
- $linked_ticket = RT::Ticket->new( $session{CurrentUser} );
- $linked_ticket->Load($Child);
-}
-
-if ($linked_ticket && $linked_ticket->id) {
- $linked_constituency = RT::IR->ConstituencyFor($linked_ticket);
-}
-
-my $limit_to_constituency =
- # Limit no matter what if we have a filter
- $m->{'RTIR_ConstituencyFilter'} ||
- # Also limit if we have a linked constituency and StrictConstituencyLinking is set
- (RT::IR->StrictConstituencyLinking && $linked_constituency)
- ? 1:0;
-
-my $ticket_type = lc RT::IR::TicketType( Lifecycle => $Lifecycle );
+$ARGS{ticket_type} = RT::IR::TicketType( Lifecycle => $Lifecycle );
</%INIT>
<%ARGS>
$Lifecycle
diff --git a/static/js/rtir.js b/static/js/rtir.js
index 79c08de9..92616cb0 100644
--- a/static/js/rtir.js
+++ b/static/js/rtir.js
@@ -26,13 +26,18 @@ jQuery(function() {
var queues = jQuery(html).find("select[name='Queue'] > option");
if (queues.length === 1) {
window.location.href = RT.Config .WebHomePath + '/RTIR/Create.html?Queue=' + queues.first().val() + '&' + queryString;
- return;
+ return;
}
- jQuery("<div class='modal'></div>")
- .append(html).appendTo("body")
- .bind('modal:close', function(ev,modal) { modal.elm.remove(); })
- .modal();
+ var modal = jQuery("<div class='modal'></div>");
+ modal.append(html).appendTo("body");
+ modal.bind('modal:close', function(ev) { modal.remove(); })
+ modal.on('hide.bs.modal', function(ev) { modal.remove(); })
+ modal.modal('show');
+
+ // We need to refresh the select picker plugin on AJAX calls
+ // since the plugin only runs on page load.
+ jQuery('.selectpicker').selectpicker('refresh');
}
);
};
commit 2cfbb20fc2b89eb042bea8b9b336f7712c7511f5
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Fri Sep 20 18:47:54 2019 -0500
Migrate RTIR/Edit to elevator themes
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index e6371f28..c12a7a9b 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -61,99 +61,121 @@
<form method="post" action="Edit.html" enctype="multipart/form-data">
<input type="hidden" name="id" value="<% $id %>" />
-<table border="0" cellspacing="2" cellpadding="0" width="100%">
-<tr>
-<td valign="top" width="50%">
-<&| /Widgets/TitleBox, title => loc("The Basics"), class => 'ticket-info-basics' &>
-
-<table>
- <tr class="subject">
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input type="text" name="Subject" value="<% $ARGS{'Subject'} || $Ticket->Subject %>" size="50" /></td>
- </tr>
- <tr class="status">
- <td class="label"><&|/l&>Status</&>:</td>
- <td class="value" colspan="2">
+<div class="row">
+ <div class="col-md-6">
+ <&| /Widgets/TitleBox, title => loc("The Basics"), class => 'ticket-info-basics' &>
+
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Subject" value="<% $ARGS{'Subject'} || $Ticket->Subject %>" />
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Status</&>:
+ </div>
+ <div class="value col-md-9">
% unless ( RT::IR->IsCountermeasureQueue($Ticket->QueueObj) ) {
- <% loc($Ticket->Status) %>
+ <span class="current-value form-control"><% loc($Ticket->Status) %></span>
% } else {
- <& /Ticket/Elements/SelectStatus,
- Name => 'Status',
- Object => $Ticket->QueueObj,
- DefaultValue => 0,
- Default => $ARGS{'Status'} || $Ticket->Status,
- &>
+ <& /Ticket/Elements/SelectStatus,
+ Name => 'Status',
+ Object => $Ticket->QueueObj,
+ DefaultValue => 0,
+ Default => $ARGS{'Status'} || $Ticket->Status,
+ &>
% }
- </td>
- </tr>
- <tr class="owner">
- <td class="label"><&|/l&>Owner</&>:</td>
- <td class="value"><& /Elements/SelectOwner,
- Name => 'Owner', Default => $ARGS{'Owner'} || $Ticket->Owner,
- TicketObj => $Ticket, QueueObj => $Ticket->QueueObj,
- &></td>
- </tr>
- <tr class="queue">
- <td class="label"><&|/l&>Queue</&>:</td>
- <td class="value"><& /RTIR/Elements/SelectRTIRQueue,
- Name => 'Queue', Default => $ARGS{'Queue'} || $Ticket->Queue,
- TicketObj => $Ticket, Lifecycle => $Ticket->QueueObj->Lifecycle,
- LimitToConstituency => ($m->{'RTIR_ConstituencyFilter'} || RT::IR->StrictConstituencyLinking) ? 1 : 0,
- Constituency => RT::IR->ConstituencyFor($Ticket)
- &></td>
- </tr>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectOwner,
+ Name => 'Owner', Default => $ARGS{'Owner'} || $Ticket->Owner,
+ TicketObj => $Ticket, QueueObj => $Ticket->QueueObj,
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Queue</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /RTIR/Elements/SelectRTIRQueue,
+ Name => 'Queue', Default => $ARGS{'Queue'} || $Ticket->Queue,
+ TicketObj => $Ticket, Lifecycle => $Ticket->QueueObj->Lifecycle,
+ LimitToConstituency => ($m->{'RTIR_ConstituencyFilter'} || RT::IR->StrictConstituencyLinking) ? 1 : 0,
+ Constituency => RT::IR->ConstituencyFor($Ticket)
+ &>
+ </div>
+ </div>
% if ( !$Ticket->QueueObj->SLADisabled ) {
- <tr class="sla">
- <td class="label"><&|/l&>SLA</&>:</td>
- <td class="value"><& /Elements/SelectSLA,
- Name => 'SLA',
- Default => loc($Ticket->SLA)
- &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectSLA,
+ Name => 'SLA',
+ Default => loc($Ticket->SLA)
+ &>
+ </div>
+ </div>
% }
% if (!RT::IR->IsIncidentQueue($Ticket->QueueObj) ) {
- <tr class="incidents">
- <td class="label"><%loc("Incident")%>:</td>
- <td class="value"><& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <%loc("Incident")%>:
+ </div>
+ <div class="value col-md-9">
+ <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &>
+ </div>
+ </div>
% }
- <tr class="time-worked">
- <td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><& /Elements/EditTimeValue,
- Name => 'TimeWorked',
- Default => $ARGS{'TimeWorked'} || $Ticket->TimeWorked || '',
- &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Worked</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EditTimeValue,
+ Name => 'TimeWorked',
+ Default => $ARGS{'TimeWorked'} || $Ticket->TimeWorked || '',
+ &>
+ </div>
+ </div>
% if ( RT::IR->IsIncidentQueue($Ticket->QueueObj)) {
- <tr class="priority">
- <td class="label"><&|/l&>Priority</&>:</td>
- <td class="value"><&/Elements/SelectPriority, Name => 'Priority', Default => $ARGS{'Priority'} || $Ticket->Priority &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Priority</&>:
+ </div>
+ <div class="value col-md-9">
+ <&/Elements/SelectPriority, Name => 'Priority', Default => $ARGS{'Priority'} || $Ticket->Priority &>
+ </div>
+ </div>
% }
- <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
-</table>
-
-</&>
-
-<& /Elements/EditCustomFieldCustomGroupings,
- %ARGS,
- Object => $Ticket,
- CustomFieldGenerator => sub { $Ticket->QueueObj->TicketCustomFields },
- Groupings => [ RT::CustomField->CustomGroupings('RTIR::Ticket'), '' ],
-&>
-
-
-</td>
-<td valign="top" width="50%">
-
-<&| /Widgets/TitleBox, title => loc('Dates'), class => 'ticket-info-dates' &>
-<& /Ticket/Elements/EditDates, %ARGS, TicketObj => $Ticket &>
-</&>
-
-</td>
-</tr>
-</table>
-<br />
+ <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
+
+ </&>
+
+ <& /Elements/EditCustomFieldCustomGroupings,
+ %ARGS,
+ Object => $Ticket,
+ CustomFieldGenerator => sub { $Ticket->QueueObj->TicketCustomFields },
+ Groupings => [ RT::CustomField->CustomGroupings('RTIR::Ticket'), '' ],
+ &>
+
+ </div>
+ <div class="col-md-6">
+ <&| /Widgets/TitleBox, title => loc('Dates'), class => 'ticket-info-dates' &>
+ <& /Ticket/Elements/EditDates, %ARGS, TicketObj => $Ticket &>
+ </&>
+ </div>
+</div>
% if ( !RT::IR->IsIncidentQueue($Ticket->QueueObj)) {
<&| /Widgets/TitleBox, title => loc('People'), class => 'ticket-info-people' &>
diff --git a/html/RTIR/Elements/AddWatchers b/html/RTIR/Elements/AddWatchers
index 9f131458..9f7ec22a 100644
--- a/html/RTIR/Elements/AddWatchers
+++ b/html/RTIR/Elements/AddWatchers
@@ -49,35 +49,87 @@
<&|/l&>Add new Correspondents</&>:<br />
-<table>
% if ( $Users ) {
-<tr><td><&|/l&>Type</&></td><td><&|/l&>Username</&></td></tr>
-% while ( my $u = $Users->Next ) {
-<tr><td><& /Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-". $u->PrincipalId, Queue => $Ticket->QueueObj &></td>
-<td><& /Elements/ShowUser, User => $u &></td></tr>
+ <div class="form-row">
+ <div class="col-md-3">
+ <&|/l&>Type</&>
+ </div>
+ <div class="col-md-3">
+ <&|/l&>Username</&>
+ </div>
+ </div>
+% while (my $u = $Users->Next ) {
+ <div class="form-row">
+ <div class="col-md-3">
+ <& /Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-". $u->PrincipalId, Queue => $Ticket->QueueObj &>
+ </div>
+ <div class="col-md-3">
+ <span class="form-control current-value">
+ <& /Elements/ShowUser, User => $u &>
+ </span>
+ </div>
+ </div>
% }
% }
% if ( $Groups->Count ) {
-<tr><td><&|/l&>Type</&></td><td><&|/l&>Group</&></td></tr>
-% while ( my $g = $Groups->Next ) {
-<tr><td><& /Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-". $g->PrincipalId, Scope => 'queue', Queue => $Ticket->QueueObj &></td>
-<td><% $g->Name %> (<% $g->Description||'' %>)</td></tr>
+ <div class="form-row">
+ <div class="col-md-3">
+ <&|/l&>Type</&>
+ </div>
+ <div class="col-md-auto">
+ <&|/l&>Group</&>
+ </div>
+ </div>
+% while (my $g = $Groups->Next ) {
+ <div class="form-row">
+ <div class="col-md-3">
+ <& /Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-". $g->PrincipalId, Scope => 'queue', Queue => $Ticket->QueueObj &>
+ </div>
+ <div class="col-md-auto">
+ <span class="form-control current-value">
+ <% $g->Name %> (<% $g->Description||'' %>)
+ </span>
+ </div>
+ </div>
% }
% }
-<tr><td><&|/l&>Type</&></td><td><&|/l&>Email</&></td></tr>
+ <div class="form-row">
+ <div class="col-md-3">
+ <&|/l&>Type</&>
+ </div>
+ <div class="col-md-3">
+ <&|/l&>Email</&>
+ </div>
+ </div>
-<tr><td><& /Elements/SelectWatcherType, Name => "WatcherTypeEmail1", Queue => $Ticket->QueueObj &></td>
-<td><input type="text" name="WatcherAddressEmail1" size="15" /></td></tr>
+ <div class="form-row">
+ <div class="col-md-3">
+ <& /Elements/SelectWatcherType, Name => "WatcherTypeEmail1", Queue => $Ticket->QueueObj &>
+ </div>
+ <div class="col-md-3">
+ <input type="text" class="form-control" name="WatcherAddressEmail1" size="20" />
+ </div>
+ </div>
-<tr><td><& /Elements/SelectWatcherType, Name => "WatcherTypeEmail2", Queue => $Ticket->QueueObj &></td>
-<td><input type="text" name="WatcherAddressEmail2" size="15" /></td></tr>
+ <div class="form-row">
+ <div class="col-md-3">
+ <& /Elements/SelectWatcherType, Name => "WatcherTypeEmail2", Queue => $Ticket->QueueObj &>
+ </div>
+ <div class="col-md-3">
+ <input type="text" class="form-control" name="WatcherAddressEmail2" size="20" />
+ </div>
+ </div>
-<tr><td><& /Elements/SelectWatcherType, Name => "WatcherTypeEmail3", Queue => $Ticket->QueueObj &></td>
-<td><input type="text" name="WatcherAddressEmail3" size="15" /></td></tr>
-
-</table>
+ <div class="form-row">
+ <div class="col-md-3">
+ <& /Elements/SelectWatcherType, Name => "WatcherTypeEmail3", Queue => $Ticket->QueueObj &>
+ </div>
+ <div class="col-md-3">
+ <input type="text" class="form-control" name="WatcherAddressEmail3" size="20" />
+ </div>
+ </div>
<%INIT>
my ($Users, $Groups);
diff --git a/html/RTIR/Elements/EditPeople b/html/RTIR/Elements/EditPeople
index 89002841..93dd1145 100644
--- a/html/RTIR/Elements/EditPeople
+++ b/html/RTIR/Elements/EditPeople
@@ -45,78 +45,71 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
-<tr>
-<td valign="top" width="50%">
-<h3><&|/l&>Current Correspondents</&></h3>
-<table>
- <tr>
- <td> </td>
- <td><&|/l&>(Check box to delete)</&></td>
- <tr>
- <td class="labeltop">
- <&|/l&>Correspondents</&>:
- </td>
- <td class="value">
- <& /Ticket/Elements/EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Requestors &>
- </td>
- </tr>
- <tr>
- <td height="1" colspan="2" bgcolor="#999999"></td>
- <tr>
- <tr>
- <td class="labeltop">
- <&|/l&>Cc</&>:
- </td>
- <td class="value">
- <& /Ticket/Elements/EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Cc &>
- </td>
- </tr>
- <tr>
- <td height="1" colspan="2" bgcolor="#999999"></td>
- <tr>
- <td class="labeltop">
- <&|/l&>Admin Cc</&>:
- </td>
- <td class="value">
- <& /Ticket/Elements/EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->AdminCc &>
- </td>
- </tr>
+<div class="row">
+ <div class="col-md-6">
+ <h3><&|/l&>Current Correspondents</&></h3>
+ <div class="form-row">
+ <div class="label col-md-3 empty">
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><&|/l&>(Check box to delete)</&></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Correspondents</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Ticket/Elements/EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Requestors &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Ticket/Elements/EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Cc &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Admin Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Ticket/Elements/EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->AdminCc &>
+ </div>
+ </div>
% my $multi_roles = $Ticket->QueueObj->CustomRoles;
% $multi_roles->LimitToMultipleValue;
% while (my $role = $multi_roles->Next) {
-
- <tr>
- <td height="1" colspan="2" bgcolor="#999999"></td>
- <tr>
- <td class="labeltop">
- <% $role->Name %>:
- </td>
- <td class="value">
- <& /Ticket/Elements/EditWatchers, Watchers => $Ticket->RoleGroup($role->GroupType), TicketObj => $Ticket &>
- </td>
-
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% $role->Name %>:
+ </div>
+ <div class="value col-md-9">
+ <& /Ticket/Elements/EditWatchers, Watchers => $Ticket->RoleGroup($role->GroupType), TicketObj => $Ticket &>
+ </div>
+ </div>
% }
-</table>
-
-</td>
-<td valign="top" width="50%">
+ </div>
-<h3><&|/l&>New Correspondents</&></h3>
-<&|/l&>Find people whose</&><br />
-<& /Elements/SelectUsers &>
-<input type="submit" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+ <div class="col-md-6">
+ <h3><&|/l&>New Correspondents</&></h3>
+ <&|/l&>Find people whose</&><br />
+ <div class="form-row">
+ <& /Elements/SelectUsers &>
+ <div class="col-auto">
+ <input type="submit" class="button btn btn-lg btn-primary form-control" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+ </div>
+ </div>
-<& AddWatchers, Ticket => $Ticket, UserString => $UserString,
- UserOp => $UserOp, UserField => $UserField &>
-</td>
-</tr>
+ <& AddWatchers, Ticket => $Ticket, UserString => $UserString, UserOp => $UserOp, UserField => $UserField &>
+ </div>
-<& /Elements/EditCustomFields, Object => $Ticket, Grouping => 'People', InTable => 1 &>
+ <& /Elements/EditCustomFields, Object => $Ticket, Grouping => 'People', InTable => 1 &>
-</table>
+</div>
<%ARGS>
$UserField => undef
commit 21508531b282aa9d7daa487efcdfb94bd6640f24
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon Sep 23 16:18:04 2019 -0500
Migrate RTIR/Advanced to elevator themes
diff --git a/html/RTIR/Advanced.html b/html/RTIR/Advanced.html
index 942ff9ad..82945bdd 100644
--- a/html/RTIR/Advanced.html
+++ b/html/RTIR/Advanced.html
@@ -54,47 +54,73 @@
<input type="hidden" name="id" value="<% $Ticket->Id %>" />
<&| /Widgets/TitleBox, title => loc('Edit basics') &>
-<table>
- <tr>
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input type="text" name="Subject" value="<% $Ticket->Subject %>" /></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Queue</&>:</td>
- <td class="value"><& /Elements/SelectQueue, Name => 'Queue', Default => $Ticket->Queue &></td>
- </tr>
-
- <tr>
- <td class="label"><&|/l&>Time Estimated</&>:</td>
- <td class="value"><& /Elements/EditTimeValue,
- Name => 'TimeEstimated',
- Default => $ARGS{'TimeEstimated'} || $Ticket->TimeEstimated || '',
- &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><& /Elements/EditTimeValue,
- Name => 'TimeWorked',
- Default => $ARGS{'TimeWorked'} || $Ticket->TimeWorked || '',
- &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Time Left</&>:</td>
- <td class="value"><& /Elements/EditTimeValue,
- Name => 'TimeLeft',
- Default => $ARGS{'TimeLeft'} || $Ticket->TimeLeft || '',
- &></td>
- </tr>
-
- <tr>
- <td class="label"><&|/l&>Priority</&>:</td>
- <td class="value"><&/Elements/SelectPriority, Name=>"Priority", Default=>$Ticket->Priority &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Final Priority</&>:</td>
- <td class="value"><&/Elements/SelectPriority, Name=>"FinalPriority", Default=>$Ticket->FinalPriority &></td>
- </tr>
-</table>
+<div class="col-md-12">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Subject" value="<% $Ticket->Subject %>" />
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Queue</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectQueue, Name => 'Queue', Default => $Ticket->Queue &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Estimated</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EditTimeValue,
+ Name => 'TimeEstimated',
+ Default => $ARGS{'TimeEstimated'} || $Ticket->TimeEstimated || '',
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Worked</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EditTimeValue,
+ Name => 'TimeWorked',
+ Default => $ARGS{'TimeWorked'} || $Ticket->TimeWorked || '',
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Left</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EditTimeValue,
+ Name => 'TimeLeft',
+ Default => $ARGS{'TimeLeft'} || $Ticket->TimeLeft || '',
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Priority</&>:
+ </div>
+ <div class="value col-md-9">
+ <&/Elements/SelectPriority, Name=>"Priority", Default=>$Ticket->Priority &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Final Priority</&>:
+ </div>
+ <div class="value col-md-9">
+ <&/Elements/SelectPriority, Name=>"FinalPriority", Default=>$Ticket->FinalPriority &>
+ </div>
+ </div>
+</div>
</&>
<&| /Widgets/TitleBox, title => loc('Edit Links') &>
commit 8cdb81b7f19a6efb6431accc623fce3559f2c60d
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Sep 24 11:45:18 2019 -0500
Fix articles tests for RT 4.6 articles refactor
diff --git a/t/articles/on-create.t b/t/articles/on-create.t
index b319f530..f2703e2a 100644
--- a/t/articles/on-create.t
+++ b/t/articles/on-create.t
@@ -38,6 +38,8 @@ diag "create an article" if $ENV{'TEST_VERBOSE'};
# TODO: Once incident+investigation creation is re-added, this should be put back
#foreach my $q_name ( 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ) {
foreach my $q_name ( 'Incident Reports', 'Investigations', 'Countermeasures' ) {
+ note( "testing article in '$q_name' ticket create" );
+
my $queue = RT::Queue->new(RT->SystemUser);
$queue->Load( $q_name );
ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
@@ -47,29 +49,7 @@ foreach my $q_name ( 'Incident Reports', 'Investigations', 'Countermeasures' ) {
$agent->form_name('TicketCreate');
like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->field($prefix.'Articles-Include-Article-Named' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/this is a content/ );
-
- ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->select($prefix .'Articles-Include-Article-Named-Hotlist' => $article_id);
- $agent->click('Go');
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/this is a content/ );
-
- ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->field($prefix .'Articles_Content' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->click($prefix .'Articles-Include-Article-'. $article_id);
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/this is a content/ );
+ $agent->content_contains( $article_name, 'got article in dropdown' );
}
diff --git a/t/articles/on-update.t b/t/articles/on-update.t
index e0ee087d..6156d4a1 100644
--- a/t/articles/on-update.t
+++ b/t/articles/on-update.t
@@ -35,6 +35,8 @@ diag "create an article" if $ENV{'TEST_VERBOSE'};
my $incident_id;
foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ) {
+ note( "testing article in '$queue' ticket update" );
+
my $id = $agent->create_rtir_ticket_ok(
$queue,
{
@@ -49,31 +51,7 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Counterm
$agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
$agent->form_name('TicketUpdate');
like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->field('Articles-Include-Article-Named' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/this is a content/ );
-
- $agent->goto_ticket( $id );
- $agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->select('Articles-Include-Article-Named-Hotlist' => $article_id);
- $agent->click('Go');
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/this is a content/ );
-
- $agent->goto_ticket( $id );
- $agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->field('Articles_Content' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->click('Articles-Include-Article-'. $article_id);
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/this is a content/ );
+ $agent->content_contains( $article_name, 'got article in dropdown' );
}
undef $agent;
commit 291dc8c15a45500286bdc43fe73fe756228f5c54
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Feb 25 10:45:01 2020 -0600
Fix button styles
diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 82bdc26e..d6fcaed3 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -82,7 +82,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{ <a class="button btn-sm btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -96,7 +96,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{ <a class="button btn-sm btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -108,17 +108,17 @@ my %actions;
$args{host} ||= $args{value};
my $escaped_host = $escaper->($args{host});
- my $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
+ my $result .= qq{ <a class="button btn-sm btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
.loc('Lookup IP') .q{</a>};
if ( $args{incident} && !RT->Config->Get('RTIR_DisableCountermeasures') ) {
- $result .= qq{ <a class="button button-small btn btn-lg btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
+ $result .= qq{ <a class="button btn-sm btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
RT::IR->HREFTo("CreateInQueue.html?Incident=".$args{incident}."&Lifecycle=".RT::IR->lifecycle_countermeasure.qq{&IP-Value=$escaped_host})
.qq{">Block</a>};
}
if ( $args{'object'} && $args{'object'}->id ) {
my $cf = RT::IR::GetCustomField('IP');
my $tid = $args{'object'}->id;
- $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}.
+ $result .= qq{ <a class="button btn-sm btn-primary" href="}.
RT::IR->HREFTo("Edit.html?id=".$tid
.qq{&Object-RT::Ticket-$tid-CustomField-}. $cf->id .qq{-AddValue=$escaped_host}
.q{&SaveChanges=1})
@@ -154,14 +154,14 @@ my %actions;
my $email = $args{'value'}; $email =~ s/^<|>$//g;
my $escaped_email = $escaper->($email);
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}.
+ my $result = qq{<a class="button btn-sm btn-primary" href="}.
RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=email&q=$escaped_email}). qq{">}
.loc('lookup email') .q{</a>};
if ( $args{'incident'} ) {
if ( $r->uri =~ /Lookup.html$/ ) {
$result .= qq{<input type="checkbox" name="Requestorbox-$escaped_email" unchecked />};
}
- $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}.
+ $result .= qq{ <a class="button btn-sm btn-primary" href="}.
RT::IR->HREFTo( "CreateInQueue.html"
. qq{?Incident=$args{'incident'}}
. qq{&Lifecycle=}.RT::IR->lifecycle_investigation
@@ -171,7 +171,7 @@ my %actions;
}
my $domain = (split /@/, $email, 2)[1];
my $escaped_domain = $escaper->($domain);
- $result .= ' <a class="button button-small btn btn-lg btn-primary" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
+ $result .= ' <a class="button btn-sm btn-primary" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
.loc('lookup "[_1]"', $domain) .'</a>';
return $escaper->($args{'value'}) . qq{ <span class="clickylink">$result</span>};
},
@@ -182,7 +182,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
+ my $result = qq{ <a class="button btn-sm btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
.loc('lookup') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
@@ -193,7 +193,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
+ my $result = qq{ <a class="button btn-sm btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
.loc('lookup host') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
diff --git a/html/RTIR/Elements/CreateTicketInQueue b/html/RTIR/Elements/CreateTicketInQueue
index 3ede976d..b39b53d9 100644
--- a/html/RTIR/Elements/CreateTicketInQueue
+++ b/html/RTIR/Elements/CreateTicketInQueue
@@ -48,7 +48,7 @@
<form action="<% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
% $m->callback(CallbackName => 'InFormElement');
>
-% my $button_start = '<input type="submit" class="button btn btn-lg btn-primary form-control" value="';
+% my $button_start = '<input type="submit" class="button btn btn-primary form-control" value="';
% my $button_end = '" />';
% my $queue_selector = $m->scomp('/RTIR/Elements/SelectNewTicketQueue', OnChange => 'document.CreateTicketInQueue.submit()', SendTo => $SendTo );
<&|/l_unsafe, $button_start, $button_end, $queue_selector &>[_1]New ticket in[_2] [_3]</&>
diff --git a/html/RTIR/Elements/EditPeople b/html/RTIR/Elements/EditPeople
index 93dd1145..bc049127 100644
--- a/html/RTIR/Elements/EditPeople
+++ b/html/RTIR/Elements/EditPeople
@@ -100,7 +100,7 @@
<div class="form-row">
<& /Elements/SelectUsers &>
<div class="col-auto">
- <input type="submit" class="button btn btn-lg btn-primary form-control" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+ <input type="submit" class="button btn btn-primary form-control" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
</div>
</div>
diff --git a/html/RTIR/Elements/ShowIncidents b/html/RTIR/Elements/ShowIncidents
index 0810c4a0..32147da9 100644
--- a/html/RTIR/Elements/ShowIncidents
+++ b/html/RTIR/Elements/ShowIncidents
@@ -57,10 +57,10 @@
&>
<div class="actions">
% unless ( $action ) {
-<a class="button button-small btn btn-lg btn-primary" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">Link</a>
-<a class="button button-small btn btn-lg btn-primary" id="create-incident" href="<% RT::IR->HREFTo('CreateInQueue.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">New</a>
+<a class="button btn-sm btn btn-primary" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">Link</a>
+<a class="button btn-sm btn btn-primary" id="create-incident" href="<% RT::IR->HREFTo('CreateInQueue.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">New</a>
% } elsif ( $action ne 'No' ) {
-<a class="button button-small btn btn-lg btn-primary" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>"><% loc( $action ) %></a>
+<a class="button btn-sm btn btn-primary" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>"><% loc( $action ) %></a>
% }
</div>
</span>
@@ -98,7 +98,7 @@ my $query = RT::IR->RelevantIncidentsQuery( $Ticket );
my $format = RT->Config->Get('RTIRSearchResultFormats')->{'ListIncidents'};
my $dformat = $format;
if ( $show_unlink ) {
- $dformat .= ", '<a class=\"button button-small btn btn-lg btn-primary\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
+ $dformat .= ", '<a class=\"button btn-sm btn btn-primary\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
}
</%INIT>
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 40d3c57f..e2d25d7b 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -200,7 +200,3 @@ body.rtir .sf-menu a.sf-with-ul {
body.rtir table.lookup-tool-forms td {
vertical-align: middle;
}
-
-body.rtir .button.button-small {
- padding: 0.2em 0.5em;
-}
commit 9296bdf06c7f31ef16b34a7f34518e0698afc9e8
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Feb 25 11:44:51 2020 -0600
Fix position of topactions
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index e2d25d7b..8fe36133 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -75,7 +75,10 @@ body.rtir #topactions #simple-search input[type="search"]:focus {
transition: width 0.25s ease-in-out;
}
-body.rtir #topactions { min-width: 44em; white-space: no-wrap; }
+body.rtir #topactions {
+ white-space: no-wrap;
+ right: 22.7em;
+}
#comp-RTIR .myrt>table>tr>td:first-child {
width: 80%;
commit 1605bfe3c04659a8f90b7aca991cae977436208b
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Feb 25 18:54:13 2020 -0600
Fix label and value row alignment
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index 3ccfafe3..f267b2d6 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -71,7 +71,7 @@
<% loc("Constituency") %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $constituency %></span>
+ <span class="current-value"><% $constituency %></span>
</div>
</div>
% }
@@ -80,7 +80,7 @@
<% loc("Status") %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $Ticket->Status %></span>
+ <span class="current-value"><% $Ticket->Status %></span>
</div>
</div>
% if ( !$Ticket->QueueObj->SLADisabled ) {
@@ -89,7 +89,7 @@
<&|/l&>SLA</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% loc($Ticket->SLA) %></span>
+ <span class="current-value"><% loc($Ticket->SLA) %></span>
</div>
</div>
% }
@@ -106,7 +106,7 @@
<&|/l&>Time Worked</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><%loc('[_1] min', $TimeWorked)%></span>
+ <span class="current-value"><%loc('[_1] min', $TimeWorked)%></span>
</div>
</div>
diff --git a/html/RTIR/Elements/ShowDates b/html/RTIR/Elements/ShowDates
index 5803a42a..1bc48058 100644
--- a/html/RTIR/Elements/ShowDates
+++ b/html/RTIR/Elements/ShowDates
@@ -50,7 +50,7 @@
<&|/l&>Created</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $Ticket->CreatedObj->AsString %></span>
+ <span class="current-value"><% $Ticket->CreatedObj->AsString %></span>
</div>
</div>
<div class="form-row">
@@ -58,7 +58,7 @@
<&|/l&>Starts</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $Ticket->StartsObj->AsString %></span>
+ <span class="current-value"><% $Ticket->StartsObj->AsString %></span>
</div>
</div>
% if ( RT::IR->IsReportQueue($Ticket->QueueObj) || RT::IR->IsInvestigationQueue($Ticket->QueueObj) || RT::IR->IsCountermeasureQueue($Ticket->QueueObj) ) {
@@ -67,7 +67,7 @@
<&|/l&>Started</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $Ticket->StartedObj->AsString %></span>
+ <span class="current-value"><% $Ticket->StartedObj->AsString %></span>
</div>
</div>
% }
@@ -76,7 +76,7 @@
<&|/l&>Due</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control">
+ <span class="current-value">
% my $due = $Ticket->DueObj;
% if ( ($due->Diff || 0) < 0 ) {
<span class="overdue"><% $due->AsString %></span>
@@ -98,7 +98,7 @@
<&|/l&>Updated</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><a href="#lasttrans"><% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %></a></span>
+ <span class="current-value"><a href="#lasttrans"><% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %></a></span>
</div>
</div>
<& /Elements/ShowCustomFields, Grouping => 'Dates', Object => $Ticket, Table => 0 &>
diff --git a/html/RTIR/Elements/ShowPeople b/html/RTIR/Elements/ShowPeople
index 5b62842f..c9664487 100644
--- a/html/RTIR/Elements/ShowPeople
+++ b/html/RTIR/Elements/ShowPeople
@@ -54,7 +54,7 @@
</div>
% my $owner = $Ticket->OwnerObj;
<div class="value col-md-9">
- <span class="current-value form-control"><& /Elements/ShowUser, User => $owner, Ticket => $Ticket &></span>
+ <span class="current-value"><& /Elements/ShowUser, User => $owner, Ticket => $Ticket &></span>
<& /Elements/ShowUserEmailFrequency, User => $owner, Ticket => $Ticket &>
% $m->callback( User => $owner, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' );
</div>
@@ -75,7 +75,7 @@
<% $role->Name %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><& /Elements/ShowUser, User => $user, Ticket => $Ticket &></span>
+ <span class="current-value"><& /Elements/ShowUser, User => $user, Ticket => $Ticket &></span>
<& /Elements/ShowUserEmailFrequency, User => $user, Ticket => $Ticket &>
% $m->callback( User => $user, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' );
</div>
@@ -87,7 +87,7 @@
<&|/l&>Correspondents</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></span>
+ <span class="current-value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></span>
</div>
</div>
<div class="form-row">
@@ -95,7 +95,7 @@
<&|/l&>Cc</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></span>
+ <span class="current-value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></span>
</div>
</div>
<div class="form-row">
@@ -103,7 +103,7 @@
<&|/l&>AdminCc</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></span>
+ <span class="current-value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></span>
</div>
</div>
@@ -115,7 +115,7 @@
<% $role->Name %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->RoleGroup($role->GroupType), Ticket => $Ticket &></span>
+ <span class="current-value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->RoleGroup($role->GroupType), Ticket => $Ticket &></span>
</div>
</div>
% }
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 8883e546..c8b1e0f0 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -97,7 +97,7 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<% loc('Constituency') %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $constituency %></span>
+ <span class="current-value"><% $constituency %></span>
</div>
</div>
% }
@@ -107,7 +107,9 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<% loc('Split from') %>:
</div>
<div class="value col-md-9">
- <a href="<%RT::IR->HREFTo('Incident/Display.html?id='.$SplitObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $SplitObj->QueueObj->Lifecycle), $SplitObj->Id, $SplitObj->Subject) %></a>
+ <span class="current-value form-control">
+ <a href="<%RT::IR->HREFTo('Incident/Display.html?id='.$SplitObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $SplitObj->QueueObj->Lifecycle), $SplitObj->Id, $SplitObj->Subject) %></a>
+ </span>
</div>
</div>
% }
@@ -117,7 +119,9 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<% loc('Link with') %>:
</div>
<div class="value col-md-9">
- <a href="<%RT::IR->HREFTo('Display.html?id='.$ChildObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $ChildObj->QueueObj->Lifecycle), $ChildObj->Id, $ChildObj->Subject) %></a>
+ <span class="current-value form-control">
+ <a href="<%RT::IR->HREFTo('Display.html?id='.$ChildObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $ChildObj->QueueObj->Lifecycle), $ChildObj->Id, $ChildObj->Subject) %></a>
+ </span>
</div>
</div>
% }
@@ -161,22 +165,22 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
&>
</div>
% }
+ </div>
% if ( !$QueueObj->SLADisabled ) {
- <div class="form-row">
- <div class="label col-md-3">
- <&|/l&>SLA</&>:
- </div>
- <div class="value col-md-9">
- <& /Elements/SelectSLA,
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectSLA,
Name => 'SLA',
Default => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
QueueObj => $QueueObj,
- &>
- </div>
+ &>
</div>
-% }
</div>
+% }
<& /RTIR/Elements/EditCustomFields,
%ARGS,
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 7754fb73..bf1a0489 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -70,16 +70,16 @@
<% loc("Constituency") %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $constituency %></span>
+ <span class="current-value"><% $constituency %></span>
</div>
</div>
% }
<div class="form-row">
<div class="label col-md-3">
- <% loc("Queue") %>
+ <% loc("Queue") %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $TicketObj->QueueObj->Name %></span>
+ <span class="current-value"><% $TicketObj->QueueObj->Name %></span>
</div>
</div>
<div class="form-row">
@@ -87,7 +87,7 @@
<% loc("Status") %>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $TicketObj->Status %></span>
+ <span class="current-value"><% $TicketObj->Status %></span>
</div>
</div>
% if ( !$TicketObj->QueueObj->SLADisabled ) {
@@ -96,7 +96,7 @@
<&|/l&>SLA</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% loc($TicketObj->SLA) %></span>
+ <span class="current-value"><% loc($TicketObj->SLA) %></span>
</div>
</div>
% }
@@ -105,7 +105,7 @@
<&|/l&>Owner</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></span>
+ <span class="current-value"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></span>
</div>
</div>
<div class="form-row">
@@ -113,7 +113,7 @@
<&|/l&>Subject</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><% $TicketObj->Subject %></span>
+ <span class="current-value"><% $TicketObj->Subject %></span>
</div>
</div>
<div class="form-row">
@@ -121,7 +121,7 @@
<&|/l&>Priority</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><& /Ticket/Elements/ShowPriority, Ticket => $TicketObj &></span>
+ <span class="current-value"><& /Ticket/Elements/ShowPriority, Ticket => $TicketObj &></span>
</div>
</div>
<div class="form-row">
@@ -129,7 +129,7 @@
<&|/l&>Time Worked</&>:
</div>
<div class="value col-md-9">
- <span class="current-value form-control"><%loc('[_1] min', $TimeWorked)%></span>
+ <span class="current-value"><%loc('[_1] min', $TimeWorked)%></span>
</div>
</div>
commit 8fc8b8fe55407886cdd2ab17c6e49272592f0a93
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Feb 25 18:55:16 2020 -0600
Fix nav and header to match RT styling
This commit fixes the padding for main and page navigation and
removes the colored background for the header.
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 8fe36133..8648435d 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -1,8 +1,10 @@
+/* TODO: this section of stlying has been commented out to disable the colored header until we re-implement.
body.rtir div#header,
body.rtir .ticket-timer .ticket-link {
background: #404080;
color: #fff;
}
+*/
body.rtir input[type="reset"],
body.rtir input[type="submit"],
@@ -195,9 +197,8 @@ body.rtir #editquery, body.rtir #editsearches {
margin-top:8.1em;
}
-
body.rtir .sf-menu a.sf-with-ul {
- padding-right:2em;
+ padding-right: 1rem;
}
body.rtir table.lookup-tool-forms td {
commit bd34e727f18e1e9b699ac494118a72570ad574a5
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Thu Feb 27 18:01:30 2020 -0600
Fix message box alignment to match RT styling
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 203ec3b3..8f19872c 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -311,10 +311,10 @@
% }
<div class="form-row">
- <div class="label col-md-3">
+ <div class="form-group label col-md-3">
<&|/l&>Subject</&>:
</div>
- <div class="value col-md-9">
+ <div class="form-group value col-md-9">
<input class="form-control" type="text" name="Subject" value="<% $Subject || '' %>" />
</div>
</div>
@@ -328,11 +328,7 @@
</div>
% }
- <div class="form-row">
- <div class="label col-md-3">
- <&|/l&>Message</&>:
- </div>
- <div class="value col-md-9">
+ <div class="form-group">
<%perl>
my $include_signature = 1;
unless (exists $ARGS{Content}) {
@@ -371,7 +367,6 @@
% } else {
<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
% }
- </div>
</div>
<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
diff --git a/html/RTIR/Elements/UpdateData b/html/RTIR/Elements/UpdateData
index 69ad23dd..0941c315 100644
--- a/html/RTIR/Elements/UpdateData
+++ b/html/RTIR/Elements/UpdateData
@@ -70,11 +70,7 @@
</div>
% }
-<div class="form-row">
- <div class="label col-md-3">
- <&|/l&>Message</&>:
- </div>
- <div class="value col-md-9">
+<div class="form-group">
<& /Articles/Elements/BeforeMessageBox, %ARGS &>
% $m->callback( %ARGS, CallbackPage => '/Ticket/Update.html', CallbackName => 'BeforeMessageBox' );
% if ( exists $ARGS{'UpdateContent'} ) {
@@ -83,7 +79,6 @@
% } else {
<& /Elements/MessageBox, Name => "UpdateContent", %ARGS &>
% }
- </div>
</div>
<%ARGS>
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index c8b1e0f0..0736a277 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -206,10 +206,10 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<&| /Widgets/TitleBox, title => $Title, class => 'ticket-info-message' &>
<div class="form-row">
- <div class="label col-md-3">
+ <div class="form-group label col-md-3">
<&|/l&>Subject</&>:
</div>
- <div class="value col-md-9">
+ <div class="form-group value col-md-9">
<input class="form-control" type="text" name="Subject" value="<% $ARGS{'Subject'} || '' %>" />
</div>
</div>
@@ -225,16 +225,11 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
</div>
% }
- <div class="form-row">
- <div class="label col-md-3">
- <&|/l&>Message</&>:
- </div>
- <div class="value col-md-9">
- <& /Elements/MessageBox,
- Default => $ARGS{'Content'},
- IncludeSignature => 0,
- &>
- </div>
+ <div class="form-group">
+ <& /Elements/MessageBox,
+ Default => $ARGS{'Content'},
+ IncludeSignature => 0,
+ &>
</div>
<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
commit fdd0e3a9e09ef277141bde2e8820d40f7952693c
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Fri Feb 28 10:52:14 2020 -0600
Update requires_rt and message for 5.0
This check will still fail for the 5.0 alpha release tag, so for
now is set to 4.6.0. Once we have a full 5.0.0 release, the
requires_rt check needs to be updated to 5.0.0.
diff --git a/Makefile.PL b/Makefile.PL
index ea0a3645..9f3f91e8 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -7,8 +7,8 @@ author('Best Practical Solutions <sales at bestpractical.com>');
all_from('lib/RT/IR.pm');
# update README and docs/UPGRADING
-requires_rt('4.6.0');
-rt_too_new('4.8.0',"\nThis version of RTIR is only compatible with RT 4.6.x and you are using RT %s\n");
+requires_rt('4.6.0'); # NOTE: we’ll update this to 5.0.0 once an official 5.0.0 is available. fails for alpha tags otherwise.
+rt_too_new('5.2.0',"\nThis version of RTIR is only compatible with RT 5.0.x and you are using RT %s\n");
# XXX: This should be reported by M::I::RTx
my ($lib_path) = $INC{'RT.pm'} =~ /^(.*)[\\\/]/;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list