%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
<&|/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>
<&|/l&>weeks</&>
+</label>
<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>
+</label>
<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">
<&|/l&>Recipient</&>:
</td><td class="value">
<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'}->UserObj->EmailAddress) %></div>
+<div class="hints"><% loc("Leave blank to send to your current email address ([_1])", $session{'CurrentUser'}->EmailAddress) %></div>
</td></tr>
</table>
</&>
($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 {
- Abort(loc("Unable to subscribe to dashboard [_1]: Permission denied", $id))
+ Abort(loc("Unable to subscribe to dashboard [_1]: Permission Denied", $id))
unless $Dashboard->CurrentUserCanSubscribe;
$SubscriptionObj = RT::Attribute->new($session{CurrentUser});