X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fsvc_dsl.html;h=436ca766b1b70ec731c9b6055dcfe3bbb47a1d59;hp=889366e074ba25e4dda8a484471528e4072fee44;hb=8c4fb61d3ab13ca97f9fe037555087506435d9da;hpb=992573160bf2fc89b1d957973109e03d2abf0a47 diff --git a/httemplate/edit/process/svc_dsl.html b/httemplate/edit/process/svc_dsl.html index 889366e07..436ca766b 100644 --- a/httemplate/edit/process/svc_dsl.html +++ b/httemplate/edit/process/svc_dsl.html @@ -12,8 +12,21 @@ my $precheck_callback = sub { my $cgi = shift; my $svcnum = $cgi->param('svcnum'); my $error = ''; + my $old; + my $part_svc; + if ( $svcnum ) { - my $old = FS::svc_dsl->by_key($svcnum); + $old = FS::svc_dsl->by_key($svcnum); + $part_svc = $old->part_svc; + } else { + my $svcpart = $cgi->param('svcpart') or die "svcpart required"; + $part_svc = FS::part_svc->by_key($svcpart); + } + my $psc = $part_svc->part_svc_column('password'); + if ( $psc->columnflag eq 'F' ) { + # enforce it here and skip password validation + $cgi->param('password', $psc->columnvalue; + } else { my $newpass = $cgi->param('password'); if ( $old and $newpass ne $old->password ) { $error ||= $old->is_password_allowed($newpass);