version 1.1449, 2025/02/03 19:07:54
|
version 1.1457, 2025/02/18 02:38:06
|
Line 1174 sub linked_select_forms {
|
Line 1174 sub linked_select_forms {
|
$menuorder, |
$menuorder, |
$onchangefirst, |
$onchangefirst, |
$onchangesecond, |
$onchangesecond, |
$suffix |
$suffix, |
|
$haslabel |
) = @_; |
) = @_; |
my $second = "document.$formname.$secondselectname"; |
my $second = "document.$formname.$secondselectname"; |
my $first = "document.$formname.$firstselectname"; |
my $first = "document.$formname.$firstselectname"; |
Line 1240 END
|
Line 1241 END
|
$result.=">".&mt($hashref->{$value}->{'text'})."</option>\n"; |
$result.=">".&mt($hashref->{$value}->{'text'})."</option>\n"; |
} |
} |
$result .= "</select>\n"; |
$result .= "</select>\n"; |
|
if ($haslabel) { |
|
$result .= '</label>'; |
|
} |
my %select2; |
my %select2; |
if (ref($hashref->{$firstdefault}) eq 'HASH') { |
if (ref($hashref->{$firstdefault}) eq 'HASH') { |
if (ref($hashref->{$firstdefault}->{'select2'}) eq 'HASH') { |
if (ref($hashref->{$firstdefault}->{'select2'}) eq 'HASH') { |
%select2 = %{$hashref->{$firstdefault}->{'select2'}}; |
%select2 = %{$hashref->{$firstdefault}->{'select2'}}; |
} |
} |
} |
} |
$result .= $middletext; |
if ($middletext ne '') { |
|
$result .= '<label>'.$middletext; |
|
} |
$result .= "<select size=\"1\" name=\"$secondselectname\""; |
$result .= "<select size=\"1\" name=\"$secondselectname\""; |
if ($onchangesecond) { |
if ($onchangesecond) { |
$result .= ' onchange="'.$onchangesecond.'"'; |
$result .= ' onchange="'.$onchangesecond.'"'; |
Line 1264 END
|
Line 1270 END
|
$result.=">".&mt($select2{$value})."</option>\n"; |
$result.=">".&mt($select2{$value})."</option>\n"; |
} |
} |
$result .= "</select>\n"; |
$result .= "</select>\n"; |
|
if ($middletext ne '') { |
|
$result .= '</label>'; |
|
} |
# return $debug; |
# return $debug; |
return $result; |
return $result; |
} # end of sub linked_select_forms { |
} # end of sub linked_select_forms { |
Line 2300 sub import_crsauthor_form {
|
Line 2309 sub import_crsauthor_form {
|
dire => 'Directory', |
dire => 'Directory', |
se => 'Select', |
se => 'Select', |
); |
); |
$output = $lt{'dire'}.': '. |
$output = '<label>'.$lt{'dire'}.': '. |
'<select id="'.$firstselectname.'" name="'.$firstselectname.'" '. |
'<select id="'.$firstselectname.'" name="'.$firstselectname.'" '. |
'onchange="populateCrsSelects(this.form,'."'$firstselectname','$secondselectname',1,'$js_only',0,1,0,0,0".');">'. |
'onchange="populateCrsSelects(this.form,'."'$firstselectname','$secondselectname',1,'$js_only',0,1,0,0,0".');">'. |
'<option value="" selected="selected">'.$lt{'se'}.'</option>'; |
'<option value="" selected="selected">'.$lt{'se'}.'</option>'; |
Line 2311 sub import_crsauthor_form {
|
Line 2320 sub import_crsauthor_form {
|
next if ($key eq '/'); |
next if ($key eq '/'); |
$output .= '<option value="'.$key.'">'.$key.'</option>'."\n"; |
$output .= '<option value="'.$key.'">'.$key.'</option>'."\n"; |
} |
} |
$output .= '</select><br />'."\n". |
$output .= '</select></label><br /><label>'."\n". |
$lt{'fnam'}.': <select id="'.$secondselectname.'" name="'.$secondselectname.'">'."\n". |
$lt{'fnam'}.': <select id="'.$secondselectname.'" name="'.$secondselectname.'">'."\n". |
'<option value="" selected="selected"></option>'."\n". |
'<option value="" selected="selected"></option>'."\n". |
'</select>'."\n". |
'</select></label>'."\n". |
'<input type="hidden" id="crsres_include_'.$suffix.'" value="'.$only.'" />'; |
'<input type="hidden" id="crsres_include_'.$suffix.'" value="'.$only.'" />'; |
return ($numdirs,$output); |
return ($numdirs,$output); |
} |
} |
Line 3066 sub select_level_form {
|
Line 3075 sub select_level_form {
|
|
|
=pod |
=pod |
|
|
=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled) |
=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled,$id) |
|
|
Returns a string containing a <select name='$name' size='1'> form to |
Returns a string containing a <select name='$name' size='1'> form to |
allow a user to select the domain to preform an operation in. |
allow a user to select the domain to preform an operation in. |
Line 3085 The optional $excdoms is a reference to
|
Line 3094 The optional $excdoms is a reference to
|
|
|
The optional $disabled argument, if true, adds the disabled attribute to the select tag. |
The optional $disabled argument, if true, adds the disabled attribute to the select tag. |
|
|
|
The option $id argument is the value (if any) to set as the (unique) id attribute for the select tag. |
|
|
=cut |
=cut |
|
|
#------------------------------------------- |
#------------------------------------------- |
sub select_dom_form { |
sub select_dom_form { |
my ($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled) = @_; |
my ($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled,$id) = @_; |
if ($onchange) { |
if ($onchange) { |
$onchange = ' onchange="'.$onchange.'"'; |
$onchange = ' onchange="'.$onchange.'"'; |
} |
} |
if ($disabled) { |
if ($disabled) { |
$disabled = ' disabled="disabled"'; |
$disabled = ' disabled="disabled"'; |
} |
} |
|
if ($id ne '') { |
|
$id = ' id="'.$id.'"'; |
|
} |
my (@domains,%exclude); |
my (@domains,%exclude); |
if (ref($incdoms) eq 'ARRAY') { |
if (ref($incdoms) eq 'ARRAY') { |
@domains = sort {lc($a) cmp lc($b)} (@{$incdoms}); |
@domains = sort {lc($a) cmp lc($b)} (@{$incdoms}); |
Line 3106 sub select_dom_form {
|
Line 3120 sub select_dom_form {
|
if (ref($excdoms) eq 'ARRAY') { |
if (ref($excdoms) eq 'ARRAY') { |
map { $exclude{$_} = 1; } @{$excdoms}; |
map { $exclude{$_} = 1; } @{$excdoms}; |
} |
} |
my $selectdomain = "<select name=\"$name\" size=\"1\"$onchange$disabled>\n"; |
my $selectdomain = "<select name=\"$name\" size=\"1\"$onchange$disabled$id>\n"; |
foreach my $dom (@domains) { |
foreach my $dom (@domains) { |
next if ($exclude{$dom}); |
next if ($exclude{$dom}); |
$selectdomain.="<option value=\"$dom\" ". |
$selectdomain.="<option value=\"$dom\" ". |
Line 6933 sub bodytag {
|
Line 6947 sub bodytag {
|
$role = &Apache::lonnet::plaintext($role); |
$role = &Apache::lonnet::plaintext($role); |
} |
} |
|
|
if (!$realm) { $realm=' '; } |
|
|
|
my $extra_body_attr = &make_attr_string($forcereg,\%design); |
my $extra_body_attr = &make_attr_string($forcereg,\%design); |
|
|
# construct main body tag |
# construct main body tag |
Line 6958 sub bodytag {
|
Line 6970 sub bodytag {
|
undef($role); |
undef($role); |
} |
} |
unless ($ltimenu->{'coursetitle'}) { |
unless ($ltimenu->{'coursetitle'}) { |
$realm=' '; |
|
$showcrstitle = 0; |
$showcrstitle = 0; |
} |
} |
} |
} |
Line 6968 sub bodytag {
|
Line 6979 sub bodytag {
|
undef($role); |
undef($role); |
} |
} |
unless ($menuref->{'crs'}) { |
unless ($menuref->{'crs'}) { |
$realm=' '; |
|
$showcrstitle = 0; |
$showcrstitle = 0; |
} |
} |
} |
} |
Line 7036 END
|
Line 7046 END
|
$args->{'links_disabled'}, |
$args->{'links_disabled'}, |
$args->{'links_target'}, |
$args->{'links_target'}, |
$collapsible); |
$collapsible); |
|
my $labeltext = &HTML::Entities::encode(&mt('Primary links')); |
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
if ($dc_info) { |
if ($dc_info) { |
$dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|; |
$dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|; |
} |
} |
$bodytag .= qq|<div id="LC_nav_bar">$left $role<br /> |
$bodytag .= qq|<div id="LC_nav_bar" role="navigation" aria-label="$labeltext">$left $role</div>|; |
<em>$realm</em> $dc_info</div>|; |
unless (($realm eq '') && ($dc_info eq '')) { |
|
$bodytag .= qq|<div id="LC_realm" role="complementary"><em>$realm</em> $dc_info</div>|; |
|
} |
if ($need_endlcint) { |
if ($need_endlcint) { |
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
} |
} |
return $bodytag; |
return $bodytag; |
} |
} |
|
|
|
$bodytag .= '<div class="LC_landmark" style="margin: 3px 0 0 0;" role="navigation" aria-label="'.$labeltext.'">'; |
unless ($env{'request.symb'} =~ m/\.page___\d+___/) { |
unless ($env{'request.symb'} =~ m/\.page___\d+___/) { |
$bodytag .= qq|<div id="LC_nav_bar">$left $role</div>|; |
$bodytag .= qq|<div id="LC_nav_bar">$left $role</div>|; |
} |
} |
|
|
$bodytag .= $right; |
$bodytag .= $right.'</div>'; |
|
|
if ($dc_info) { |
if ($dc_info) { |
$dc_info = &dc_courseid_toggle($dc_info); |
$dc_info = &dc_courseid_toggle($dc_info); |
} |
} |
$bodytag .= qq|<div id="LC_realm">$realm $dc_info</div>|; |
unless (($realm eq '') && ($dc_info eq '')) { |
|
$bodytag .= qq|<div id="LC_realm" role="complementary">$realm $dc_info</div>|; |
|
} |
|
$bodytag .= qq|<div style="clear: both; margin: 5px 0 0 0;"></div>|; |
} |
} |
|
|
#if directed to not display the secondary menu, don't. |
#if directed to not display the secondary menu, don't. |
Line 7301 form, .inline {
|
Line 7317 form, .inline {
|
display: inline; |
display: inline; |
} |
} |
|
|
|
.LC_landmark { |
|
margin: 0; |
|
padding: 0; |
|
border: none; |
|
} |
|
|
.LC_visually_hidden:not(:focus):not(:active) { |
.LC_visually_hidden:not(:focus):not(:active) { |
clip-path: inset(50%); |
clip-path: inset(50%); |
height: 1px; |
height: 1px; |
Line 7311 form, .inline {
|
Line 7333 form, .inline {
|
display: inline; |
display: inline; |
} |
} |
|
|
|
.LC_heading_2 { |
|
font-size: 1.17em; |
|
} |
|
|
.LC_menus_content.shown{ |
.LC_menus_content.shown{ |
display: block; |
display: block; |
} |
} |
Line 7979 table#LC_helpmenu fieldset legend {
|
Line 8005 table#LC_helpmenu fieldset legend {
|
font-size: larger; |
font-size: larger; |
} |
} |
|
|
table#LC_helpmenu_links { |
.LC_helpdesk_headbox { |
width: 100%; |
border: 2px groove threedface; |
border: 1px solid black; |
padding: 1em; |
|
} |
|
|
|
h1.LC_helpdesk_legend { |
|
float: left; |
|
margin: -1.7em 0 0; |
|
padding: 0 .5em; |
background: $pgbg; |
background: $pgbg; |
|
font-size: 1em; |
|
font-weight: bold; |
|
} |
|
|
|
h1.LC_helpdesk_title { |
|
display: inline; |
|
font-size: 1em; |
|
line-height: 2.5em; |
|
margin: 0; |
padding: 0; |
padding: 0; |
border-spacing: 1px; |
vertical-align: bottom; |
} |
} |
|
|
table#LC_helpmenu_links tr td { |
.LC_helpdesk_links { |
padding: 1px; |
border: 1px solid black; |
|
padding: 3px; |
background: $tabbg; |
background: $tabbg; |
text-align: center; |
text-align: center; |
font-weight: bold; |
font-weight: bold; |
|
display: inline; |
|
margin-right: -6px; |
|
} |
|
|
|
.LC_helpdesk_img, |
|
.LC_helpdesk_text { |
|
padding: 0; |
|
margin: 0; |
|
border: 0; |
|
display: inline; |
} |
} |
|
|
table#LC_helpmenu_links a:link, |
.LC_helpdesk_img a:link, |
table#LC_helpmenu_links a:visited, |
.LC_helpdesk_img a:visited, |
table#LC_helpmenu_links a:active { |
.LC_helpdesk_img a:active, |
|
.LC_helpdesk_text a:link, |
|
.LC_helpdesk_text a:visited, |
|
.LC_helpdesk_text a:active { |
text-decoration: none; |
text-decoration: none; |
color: $font; |
color: $font; |
} |
} |
|
|
table#LC_helpmenu_links a:hover { |
div.LC_helpdesk_text a:hover { |
text-decoration: underline; |
text-decoration: underline; |
color: $vlink; |
color: $vlink; |
} |
} |
Line 8028 table.LC_pick_box {
|
Line 8083 table.LC_pick_box {
|
border-spacing: 1px; |
border-spacing: 1px; |
} |
} |
|
|
table.LC_pick_box td.LC_pick_box_title { |
table.LC_pick_box th.LC_pick_box_title { |
background: $sidebg; |
background: $sidebg; |
font-weight: bold; |
font-weight: bold; |
text-align: left; |
text-align: left; |
Line 9713 OFFLOAD
|
Line 9768 OFFLOAD
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
<meta name="apple-mobile-web-app-capable" content="yes" />'; |
<meta name="apple-mobile-web-app-capable" content="yes" />'; |
} |
} |
$result .= '<meta name="google" content="notranslate" />'."\n"; |
$result .= '<meta name="google" content="notranslate"'; |
|
if (!$args->{'frameset'}) { |
|
$result .= ' /'; |
|
} |
|
$result .= '>'."\n"; |
return $result.'</head>'; |
return $result.'</head>'; |
} |
} |
|
|
Line 19054 sub needs_coursereinit {
|
Line 19113 sub needs_coursereinit {
|
$update = 'supp'; |
$update = 'supp'; |
} |
} |
} |
} |
return ($update); |
|
} |
} |
|
return ($update); |
} |
} |
return (); |
return (); |
} |
} |
Line 19586 sub create_captcha {
|
Line 19645 sub create_captcha {
|
if (-e $Apache::lonnet::perlvar{'lonCaptchaDir'}.'/'.$md5sum.'.png') { |
if (-e $Apache::lonnet::perlvar{'lonCaptchaDir'}.'/'.$md5sum.'.png') { |
$output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n". |
$output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n". |
'<span class="LC_nobreak">'. |
'<span class="LC_nobreak">'. |
&mt('Type in the letters/numbers shown below').' '. |
'<label>'.&mt('Type in the letters/numbers shown below').' '. |
'<input type="text" size="5" name="code" value="" autocomplete="new-password" />'. |
'<input type="text" size="5" name="code" value="" autocomplete="new-password" />'. |
'</span><br />'. |
'</label></span><br />'. |
'<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" alt="captcha" />'; |
'<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" alt="captcha" />'; |
last; |
last; |
} |
} |