');
+ if ($saml_landing) {
+ $ssoauthstyle = 'inline-block';
+ $stdauthformstyle = 'none';
+ $logintype = $samlssotext;
+ my $ssologin = '/adm/sso';
+ if ($samlssourl ne '') {
+ $ssologin = $samlssourl;
+ }
+ if (($logtoken eq 'con_lost') || ($logtoken eq 'no_such_host')) {
+ my $querystring;
+ if ($env{'form.firsturl'} ne '') {
+ $querystring = 'origurl=';
+ if ($env{'form.firsturl'} =~ /[^\x00-\xFF]/) {
+ $querystring .= &uri_escape_utf8($env{'form.firsturl'});
+ } else {
+ $querystring .= &uri_escape($env{'form.firsturl'});
+ }
+ $querystring = &HTML::Entities::encode($querystring,"'");
+ }
+ if ($env{'form.ltoken'} ne '') {
+ $querystring .= (($querystring eq '')?'':'&') . 'ltoken='.
+ &HTML::Entities::encode(&uri_escape($env{'form.ltoken'}));
+ } elsif ($env{'form.linkkey'}) {
+ $querystring .= (($querystring eq '')?'':'&') . 'linkkey='.
+ &HTML::Entities::encode(&uri_escape($env{'form.linkkey'}));
+ }
+ if ($querystring ne '') {
+ $ssologin .= (($ssologin=~/\?/)?'&':'?') . $querystring;
+ }
+ } elsif ($logtoken ne '') {
+ $ssologin .= (($ssologin=~/\?/)?'&':'?') . 'logtoken='.$logtoken;
+ }
+ my $ssohref;
+ if ($samlssoimg ne '') {
+ $ssohref = '
'.
+ '';
+ } else {
+ $ssohref = '
'.$samlssotext.'';
+ }
+ if (($env{'form.saml'} eq 'no') ||
+ (($env{'form.username'} ne '') && ($env{'form.domain'} ne ''))) {
+ $ssoauthstyle = 'none';
+ $stdauthformstyle = 'inline-block';
+ $logintype = $samlnonsso;
+ }
+ $r->print(<
+Log-in type:
+$logintype
+$lt{'change'}
+
+
+
+$ssohref
+$noscript_warning
+
+
+$loginhelp
+$contactblock
+$coursecatalog
+
+
+ENDSAML
+ } else {
+ if ($env{'form.ltoken'}) {
+ &Apache::lonnet::tmpdel($env{'form.ltoken'});
+ delete($env{'form.ltoken'});
+ }
+ }
+ my $in_frame_js;
+ if ($linkprot_for_login) {
+ my ($linkprotector,$linkproturi) = split(/:/,$linkprot_for_login,2);
+ if (($linkprotector =~ /^\d+(c|d)$/) && ($linkproturi =~ m{^/+tiny/+$LONCAPA::match_domain/+\w+$})) {
+ my $set_target;
+ if (($env{'form.retry'}) || ($env{'form.sso'})) {
+ if ($linkproturi eq $env{'form.firsturl'}) {
+ $set_target = " document.server.target = '_self';";
+ }
+ } else {
+ $set_target = <
+//
+
+ENDJS
+ }
+ }
+
+ $r->print(<
$logintitle
$loginform
@@ -742,10 +950,11 @@ HEADER
-'."\n");
if ($showmainlogo) {
- $r->print('
'."\n");
+ my $alttext = &Apache::loncommon::designparm('login.alttext_logo',$domain);
+ $r->print('
'."\n");
}
$r->print(<
+$in_frame_js