--- loncom/interface/loncommon.pm 2024/08/22 15:16:05 1.1433 +++ loncom/interface/loncommon.pm 2024/09/11 00:40:07 1.1436 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1433 2024/08/22 15:16:05 raeburn Exp $ +# $Id: loncommon.pm,v 1.1436 2024/09/11 00:40:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3950,6 +3950,21 @@ sub passwd_validation_js { } else { $alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n'; } + } elsif ($context eq 'ltitools') { + my %domconfig = &Apache::lonnet::get_dom('configuration',['toolsec'],$domain); + if (ref($domconfig{'toolsec'}) eq 'HASH') { + if (ref($domconfig{'toolsec'}{'rules'}) eq 'HASH') { + %passwdconf = %{$domconfig{'toolsec'}{'rules'}}; + } + } + if ($id eq 'add') { + $alertmsg = &mt('Secret for added external tool did not satisfy requirement(s):').'\n\n'; + } elsif ($id =~ /^\d+$/) { + my $pos = $id+1; + $alertmsg = &mt('Secret for external tool [_1] did not satisfy requirement(s):','#'.$pos).'\n\n'; + } else { + $alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n'; + } } else { %passwdconf = &Apache::lonnet::get_passwdconf($domain); $alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n'; @@ -7259,6 +7274,7 @@ body { line-height:130%; font-size:0.83em; color:$font; + background-color: $pgbg_or_bgcolor; } a:focus, @@ -9634,7 +9650,7 @@ OFFLOAD } if ($clientmobile) { $result .= ' - + '; } $result .= ''."\n";