--- loncom/interface/loncommon.pm 2025/02/07 05:40:54 1.1451 +++ loncom/interface/loncommon.pm 2025/02/14 22:42:05 1.1453 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1451 2025/02/07 05:40:54 raeburn Exp $ +# $Id: loncommon.pm,v 1.1453 2025/02/14 22:42:05 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1250,9 +1250,8 @@ END %select2 = %{$hashref->{$firstdefault}->{'select2'}}; } } - $result .= $middletext; if ($middletext ne '') { - $result .= '<label>'; + $result .= '<label>'.$middletext; } $result .= "<select size=\"1\" name=\"$secondselectname\""; if ($onchangesecond) { @@ -3076,7 +3075,7 @@ sub select_level_form { =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 allow a user to select the domain to preform an operation in. @@ -3095,17 +3094,22 @@ The optional $excdoms is a reference to 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 #------------------------------------------- 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) { $onchange = ' onchange="'.$onchange.'"'; } if ($disabled) { $disabled = ' disabled="disabled"'; } + if ($id ne '') { + $id = ' id="'.$id.'"'; + } my (@domains,%exclude); if (ref($incdoms) eq 'ARRAY') { @domains = sort {lc($a) cmp lc($b)} (@{$incdoms}); @@ -3116,7 +3120,7 @@ sub select_dom_form { if (ref($excdoms) eq 'ARRAY') { 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) { next if ($exclude{$dom}); $selectdomain.="<option value=\"$dom\" ". @@ -7311,6 +7315,12 @@ form, .inline { display: inline; } +.LC_landmark { + margin: 0; + padding: 0; + border: none; +} + .LC_visually_hidden:not(:focus):not(:active) { clip-path: inset(50%); height: 1px; @@ -7321,6 +7331,12 @@ form, .inline { display: inline; } +.LC_heading_2 { + font-size: 1.17em; + margin-top: 1em; + margin-bottom: 1em; +} + .LC_menus_content.shown{ display: block; } @@ -19065,7 +19081,7 @@ sub needs_coursereinit { } } } - return ($update); + return ($update); } return (); } @@ -19596,9 +19612,9 @@ sub create_captcha { if (-e $Apache::lonnet::perlvar{'lonCaptchaDir'}.'/'.$md5sum.'.png') { $output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n". '<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" />'. - '</span><br />'. + '</label></span><br />'. '<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" alt="captcha" />'; last; }