diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-11-22 19:44:43 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-11-22 19:44:43 -0800 |
commit | 5bc19ba554e29029e7963e40012e43432892306b (patch) | |
tree | 9bcd1accd19ce5714c101cb33b62be11870413d2 /httemplate | |
parent | d69b5b413b9da6087a37d45aa06f4ea74f1fba35 (diff) | |
parent | 2e1e59ea99e9672310b59f57cfade4626c33190f (diff) |
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/edit/process/svc_dsl.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/httemplate/edit/process/svc_dsl.html b/httemplate/edit/process/svc_dsl.html index 627329a00..889366e07 100644 --- a/httemplate/edit/process/svc_dsl.html +++ b/httemplate/edit/process/svc_dsl.html @@ -1,5 +1,6 @@ <% include( 'elements/svc_Common.html', 'table' => 'svc_dsl', + 'precheck_callback' => $precheck_callback, ) %> <%init> @@ -7,4 +8,18 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? +my $precheck_callback = sub { + my $cgi = shift; + my $svcnum = $cgi->param('svcnum'); + my $error = ''; + if ( $svcnum ) { + my $old = FS::svc_dsl->by_key($svcnum); + my $newpass = $cgi->param('password'); + if ( $old and $newpass ne $old->password ) { + $error ||= $old->is_password_allowed($newpass); + } + } + $error; +}; + </%init> |