projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rt 4.2.16
[freeside.git]
/
rt
/
share
/
html
/
Dashboards
/
Subscription.html
diff --git
a/rt/share/html/Dashboards/Subscription.html
b/rt/share/html/Dashboards/Subscription.html
index
df612d2
..
ae977b4
100644
(file)
--- a/
rt/share/html/Dashboards/Subscription.html
+++ b/
rt/share/html/Dashboards/Subscription.html
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
4
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
9
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-75,7
+75,7
@@
<ol class="dashboard-queries">
% for my $portlet (@portlets) {
<li class="dashboard-query">
<ol class="dashboard-queries">
% for my $portlet (@portlets) {
<li class="dashboard-query">
- <% loc(
$portlet->{description}
, $fields{'Rows'}) %>
+ <% loc(
RT::SavedSearch->EscapeDescription($portlet->{description})
, $fields{'Rows'}) %>
</li>
% }
</ol>
</li>
% }
</ol>
@@
-92,16
+92,17
@@
<&|/l&>Frequency</&>:
</td><td class="value">
<&|/l&>Frequency</&>:
</td><td class="value">
-<input type="radio"
name="Frequency" value="daily" <% $fields{'Frequency'} eq 'daily' ? 'checked="checked"' : "" |n %>
>
-
<&|/l&>daily</&
>
-<
/input><
br />
+<input type="radio"
id="Frequency-daily" name="Frequency" value="daily" <% $fields{'Frequency'} eq 'daily' ? 'checked="checked"' : "" |n %>></input
>
+
<label for="Frequency-daily"><&|/l&>daily</&></label
>
+<br />
-<input type="radio"
name="Frequency" value="m-f" <% $fields{'Frequency'} eq 'm-f' ? 'checked="checked"' : "" |n %>
>
-
<&|/l&>Monday through Friday</&
>
-<
/input><
br />
+<input type="radio"
id="Frequency-m-f" name="Frequency" value="m-f" <% $fields{'Frequency'} eq 'm-f' ? 'checked="checked"' : "" |n %>></input
>
+
<label for="Frequency-m-f"><&|/l&>Monday through Friday</&></label
>
+<br />
-<input type="radio" name="Frequency" value="weekly"<% $fields{'Frequency'} eq 'weekly' ? 'checked="checked"' : "" |n %>>
-<&|/l&>weekly</&></input>, <&|/l&>on</&>
+<input type="radio" id="Frequency-weekly" name="Frequency" value="weekly"<% $fields{'Frequency'} eq 'weekly' ? 'checked="checked"' : "" |n %>></input>
+<label for="Frequency-weekly">
+<&|/l&>weekly</&>, <&|/l&>on</&>
<select name="Dow">
<option value="Monday" <% $fields{'Dow'} eq 'Monday' ? 'selected="selected"' : '' |n %>><&|/l&>Monday</&></option>
<option value="Tuesday" <% $fields{'Dow'} eq 'Tuesday' ? 'selected="selected"' : '' |n %>><&|/l&>Tuesday</&></option>
<select name="Dow">
<option value="Monday" <% $fields{'Dow'} eq 'Monday' ? 'selected="selected"' : '' |n %>><&|/l&>Monday</&></option>
<option value="Tuesday" <% $fields{'Dow'} eq 'Tuesday' ? 'selected="selected"' : '' |n %>><&|/l&>Tuesday</&></option>
@@
-118,20
+119,22
@@
% }
</select>
<&|/l&>weeks</&>
% }
</select>
<&|/l&>weeks</&>
+</label>
<br />
<br />
-<input type="radio" name="Frequency" value="monthly"<% $fields{'Frequency'} eq 'monthly' ? 'checked="checked"' : "" |n %>>
-<&|/l&>monthly</&></input> , <&|/l&>on day</&>
+<input type="radio" id="Frequency-monthly" name="Frequency" value="monthly"<% $fields{'Frequency'} eq 'monthly' ? 'checked="checked"' : "" |n %>></input>
+<label for="Frequency-monthly">
+<&|/l&>monthly</&>, <&|/l&>on day</&>
<select name="Dom">
% for my $dom (1..31) {
<option value="<% $dom %>" <% $fields{'Dom'} == $dom ? 'selected="selected"' : '' |n %>><% loc($dom) %></option>
% }
</select>
<select name="Dom">
% for my $dom (1..31) {
<option value="<% $dom %>" <% $fields{'Dom'} == $dom ? 'selected="selected"' : '' |n %>><% loc($dom) %></option>
% }
</select>
+</label>
<br />
<br />
-<input type="radio" name="Frequency" value="never" <% $fields{'Frequency'} eq 'never' ? 'checked="checked"' : "" |n %>>
- <&|/l&>never</&>
-</input>
+<input type="radio" id="Frequency-never" name="Frequency" value="never" <% $fields{'Frequency'} eq 'never' ? 'checked="checked"' : "" |n %>></input>
+<label for="Frequency-never"><&|/l&>never</&></label>
</td></tr>
<tr><td class="label">
</td></tr>
<tr><td class="label">
@@
-173,6
+176,8
@@
<input name="Recipient" id="Recipient" size="30" value="<%$fields{Recipient} ? $fields{Recipient} : ''%>" />
<div class="hints"><% loc("Leave blank to send to your current email address ([_1])", $session{'CurrentUser'}->EmailAddress) %></div>
</td></tr>
<input name="Recipient" id="Recipient" size="30" value="<%$fields{Recipient} ? $fields{Recipient} : ''%>" />
<div class="hints"><% loc("Leave blank to send to your current email address ([_1])", $session{'CurrentUser'}->EmailAddress) %></div>
</td></tr>
+% $m->callback( %ARGS, CallbackName => 'SubscriptionFormEnd', FieldsRef => \%fields,
+% SubscriptionObj => $SubscriptionObj, DashboardObj => $Dashboard );
</table>
</&>
</td>
</table>
</&>
</td>
@@
-213,6
+218,9
@@
my %fields = (
Counter => 0,
);
Counter => 0,
);
+$m->callback( %ARGS, CallbackName => 'SubscriptionFields', FieldsRef => \%fields,
+ SubscriptionObj => $SubscriptionObj, DashboardObj => $Dashboard);
+
# update any fields with the values from the subscription object
if ($SubscriptionObj) {
for my $field (keys %fields) {
# update any fields with the values from the subscription object
if ($SubscriptionObj) {
for my $field (keys %fields) {
@@
-227,6
+235,8
@@
for my $field (keys %fields) {
if defined($ARGS{$field});
}
if defined($ARGS{$field});
}
+$m->callback( %ARGS, CallbackName => 'MassageSubscriptionFields', FieldsRef => \%fields,
+ SubscriptionObj => $SubscriptionObj, DashboardObj => $Dashboard);
# this'll be defined on submit
if (defined $ARGS{Save}) {
# this'll be defined on submit
if (defined $ARGS{Save}) {
@@
-248,16
+258,12
@@
if (defined $ARGS{Save}) {
($ok, $msg) = $SubscriptionObj->SetSubValues(%fields);
$fields{'DashboardId'} = $id;
($ok, $msg) = $SubscriptionObj->SetSubValues(%fields);
$fields{'DashboardId'} = $id;
- # not so good to spew base64-encoded data at the user :)
- if ($msg =~ /^Content changed from/) {
- $msg = "Subscription updated.";
- }
-
+ $msg = loc("Subscription updated") if $ok;
push @results, $msg;
}
# create
else {
push @results, $msg;
}
# create
else {
- Abort(loc("Unable to subscribe to dashboard [_1]: Permission
d
enied", $id))
+ Abort(loc("Unable to subscribe to dashboard [_1]: Permission
D
enied", $id))
unless $Dashboard->CurrentUserCanSubscribe;
$SubscriptionObj = RT::Attribute->new($session{CurrentUser});
unless $Dashboard->CurrentUserCanSubscribe;
$SubscriptionObj = RT::Attribute->new($session{CurrentUser});