diff options
author | ivan <ivan> | 2010-05-23 01:59:19 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-05-23 01:59:19 +0000 |
commit | 940401c77b8455dd47b57e06dcfedd7514c24a7c (patch) | |
tree | 1abfdb7847feeba2b6bbba7687f869a62f55dda0 /httemplate/browse | |
parent | fc3c94d637caecb7932c09fb1e7baceaad069eda (diff) |
communigate pro rules, RT#7515
Diffstat (limited to 'httemplate/browse')
-rw-r--r-- | httemplate/browse/cgp_rule.html | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/httemplate/browse/cgp_rule.html b/httemplate/browse/cgp_rule.html index ea11d62bf..6f7b3e087 100644 --- a/httemplate/browse/cgp_rule.html +++ b/httemplate/browse/cgp_rule.html @@ -40,7 +40,15 @@ my $view = FS::UI::Web::svc_url( 'm' => $m, my $html_init = qq(<A HREF="$view">View this $svc_label</A><BR><BR>). - qq!<A HREF="${p}edit/cgp_rule.html?svcnum=$svcnum">Add new rule</A><BR><BR>!; + qq!<A HREF="${p}edit/cgp_rule.html?svcnum=$svcnum">Add new rule</A><BR><BR>!. + qq! + <SCRIPT> + function areyousure(href) { + if (confirm("Are you sure you want to delete this rule?") == true) + window.location.href = href; + } + </SCRIPT> +!; my $condition_sub = sub { my $cgp_rule = shift; @@ -77,6 +85,9 @@ my $action_sub = sub { }; my $edit_sub = [ $p.'edit/cgp_rule.html?', 'rulenum' ]; -my $del_sub = [ $p.'misc/delete-cgp_rule.html?', 'rulenum' ]; #XXX javascript areyousure or something +my $del_sub = sub { + my $rulenum = shift->rulenum; + [ "javascript:areyousure('${p}misc/delete-cgp_rule.html?$rulenum')", '' ]; +}; </%init> |