Diff for /loncom/interface/loncommon.pm between versions 1.1461 and 1.1477

version 1.1461, 2025/02/21 06:09:36 version 1.1477, 2025/03/31 13:55:07
Line 966  ENDSCRT Line 966  ENDSCRT
   
 sub select_timezone {  sub select_timezone {
    my ($name,$selected,$onchange,$includeempty,$id,$disabled)=@_;     my ($name,$selected,$onchange,$includeempty,$id,$disabled)=@_;
    my $output='<select name="'.$name.'" '.$id.$onchange.$disabled.'>'."\n";     my $labeltext = &HTML::Entities::encode(&mt('Select Time Zone'));
      my $output='<select name="'.$name.'" '.$id.$onchange.$disabled.
                 ' aria-label="'.$labeltext.'">'."\n";
    if ($includeempty) {     if ($includeempty) {
        $output .= '<option value=""';         $output .= '<option value=""';
        if (($selected eq '') || ($selected eq 'local')) {         if (($selected eq '') || ($selected eq 'local')) {
Line 1351  sub help_open_topic { Line 1353  sub help_open_topic {
     }      }
     $template.=' <a'.$target.' href="'.$link.'" title="'.$title.'">'      $template.=' <a'.$target.' href="'.$link.'" title="'.$title.'">'
               .'<img src="'.$helpicon.'" border="0"'                .'<img src="'.$helpicon.'" border="0"'
               .' alt="'.&mt('Help: [_1]',$topic).'"'                .' alt="'.&mt('Help icon').'"'
               .' title="'.$title.'" style="vertical-align:middle;"'.$imgid                 .' title="'.$title.'" style="vertical-align:middle;"'.$imgid 
               .' /></a>';                .' /></a>';
     if ($text ne "") {      if ($text ne "") {
Line 2798  sub create_text_file { Line 2800  sub create_text_file {
 # ------------------------------------------  # ------------------------------------------
   
 sub domain_select {  sub domain_select {
     my ($name,$value,$multiple,$incdoms,$excdoms)=@_;      my ($name,$value,$multiple,$incdoms,$excdoms,$id)=@_;
     my @possdoms;      my @possdoms;
     if (ref($incdoms) eq 'ARRAY') {      if (ref($incdoms) eq 'ARRAY') {
         @possdoms = @{$incdoms};          @possdoms = @{$incdoms};
Line 2819  sub domain_select { Line 2821  sub domain_select {
     if ($multiple) {      if ($multiple) {
  $domains{''}=&mt('Any domain');   $domains{''}=&mt('Any domain');
  $domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))];   $domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))];
  return &multiple_select_form($name,$value,4,\%domains);   return &multiple_select_form($name,$value,4,\%domains,undef,$id);
     } else {      } else {
  $domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))];   $domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))];
  return &select_form($name,$value,\%domains);   return &select_form($name,$value,\%domains,'','',$id);
     }      }
 }  }
   
Line 2834  sub domain_select { Line 2836  sub domain_select {
   
 =over 4  =over 4
   
 =item * &multiple_select_form($name,$value,$size,$hash,$order)  =item * &multiple_select_form($name,$value,$size,$hash,$order,$id)
   
 Returns a string containing a <select> element int multiple mode  Returns a string containing a <select> element int multiple mode
   
Line 2846  Args: Line 2848  Args:
   $hash - the elements should be 'option' => 'shown text'    $hash - the elements should be 'option' => 'shown text'
           (shown text should already have been &mt())            (shown text should already have been &mt())
   $order - (optional) array ref of the order to show the elements in    $order - (optional) array ref of the order to show the elements in
     $id = (optional) id for <select> element
   
 =cut  =cut
   
 #-------------------------------------------  #-------------------------------------------
 sub multiple_select_form {  sub multiple_select_form {
     my ($name,$value,$size,$hash,$order)=@_;      my ($name,$value,$size,$hash,$order,$id)=@_;
     my %selected = map { $_ => 1 } ref($value)?@{$value}:($value);      my %selected = map { $_ => 1 } ref($value)?@{$value}:($value);
     my $output='';      my $output='';
     if (! defined($size)) {      if (! defined($size)) {
Line 2860  sub multiple_select_form { Line 2863  sub multiple_select_form {
             $size = scalar(keys(%$hash));              $size = scalar(keys(%$hash));
         }          }
     }      }
     $output.="\n".'<select name="'.$name.'" size="'.$size.'" multiple="multiple">';      if ($id ne '') {
           $id = ' id="'.$id.'"'; 
       }
       $output.="\n".'<select name="'.$name.'" size="'.$size.'" multiple="multiple"'.$id.'>';
     my @order;      my @order;
     if (ref($order) eq 'ARRAY')  {      if (ref($order) eq 'ARRAY')  {
         @order = @{$order};          @order = @{$order};
Line 2884  sub multiple_select_form { Line 2890  sub multiple_select_form {
   
 =pod  =pod
   
 =item * &select_form($defdom,$name,$hashref,$onchange,$readonly)  =item * &select_form($defdom,$name,$hashref,$onchange,$readonly,$id,$aria_labelledby)
   
 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 options from a ref to a hash containing:  allow a user to select options from a ref to a hash containing:
Line 2892  option_name => displayed text. An option Line 2898  option_name => displayed text. An option
 a javascript onchange item, e.g., onchange="this.form.submit();".  a javascript onchange item, e.g., onchange="this.form.submit();".
 An optional arg -- $readonly -- if true will cause the select form  An optional arg -- $readonly -- if true will cause the select form
 to be disabled, e.g., for the case where an instructor has a section-  to be disabled, e.g., for the case where an instructor has a section-
 specific role, and is viewing/modifying parameters.   specific role, and is viewing/modifying parameters. An optional arg
   -- $id -- will be used as the id attribute of the select element. An
   optional arg -- $aria_labelledby -- will be included as the aria-labelledby
   attribute of the select element.
   
 See lonrights.pm for an example invocation and use.  See lonrights.pm for an example invocation and use.
   
Line 2900  See lonrights.pm for an example invocati Line 2909  See lonrights.pm for an example invocati
   
 #-------------------------------------------  #-------------------------------------------
 sub select_form {  sub select_form {
     my ($def,$name,$hashref,$onchange,$readonly) = @_;      my ($def,$name,$hashref,$onchange,$readonly,$id,$aria_labelledby) = @_;
     return unless (ref($hashref) eq 'HASH');      return unless (ref($hashref) eq 'HASH');
     if ($onchange) {      if ($onchange) {
         $onchange = ' onchange="'.$onchange.'"';          $onchange = ' onchange="'.$onchange.'"';
Line 2909  sub select_form { Line 2918  sub select_form {
     if ($readonly) {      if ($readonly) {
         $disabled = ' disabled="disabled"';          $disabled = ' disabled="disabled"';
     }      }
     my $selectform = "<select name=\"$name\" size=\"1\"$onchange$disabled>\n";      if ($id ne '') {
           $id = ' id="'.$id.'"';
       }
       if ($aria_labelledby ne '') {
           $aria_labelledby = ' aria-labelledby="'.$aria_labelledby.'"';
       }
       my $selectform = "<select name=\"$name\" size=\"1\"$onchange$disabled$id$aria_labelledby>\n";
     my @keys;      my @keys;
     if (exists($hashref->{'select_form_order'})) {      if (exists($hashref->{'select_form_order'})) {
  @keys=@{$hashref->{'select_form_order'}};   @keys=@{$hashref->{'select_form_order'}};
Line 2960  sub display_filter { Line 2975  sub display_filter {
     my $onchange = "javascript:toggleHistoryOptions(this,'containingphrase','$context',      my $onchange = "javascript:toggleHistoryOptions(this,'containingphrase','$context',
                                                     '$secondid','$thirdid')";                                                      '$secondid','$thirdid')";
     return '<span class="LC_nobreak"><label>'.&mt('Records: [_1]',      return '<span class="LC_nobreak"><label>'.&mt('Records: [_1]',
        &Apache::lonmeta::selectbox('show',$env{'form.show'},'',undef,         &Apache::lonmeta::selectbox('show',$env{'form.show'},'','',undef,
    (&mt('all'),10,20,50,100,1000,10000))).     (&mt('all'),10,20,50,100,1000,10000))).
    '</label></span> <span class="LC_nobreak">'.     '</label></span> <span class="LC_nobreak">'.
            &mt('Filter: [_1]',             &mt('Filter: [_1]',
Line 3062  sub gradeleveldescription { Line 3077  sub gradeleveldescription {
 }  }
   
 sub select_level_form {  sub select_level_form {
     my ($deflevel,$name)=@_;      my ($deflevel,$name,$id)=@_;
       if ($id ne '') {
           $id = ' id="'.$id.'"';
       }
     unless ($deflevel) { $deflevel=0; }      unless ($deflevel) { $deflevel=0; }
     my $selectform = "<select name=\"$name\" size=\"1\">\n";      my $selectform = "<select name=\"$name\" size=\"1\"$id>\n";
     for (my $i=0; $i<=18; $i++) {      for (my $i=0; $i<=18; $i++) {
         $selectform.="<option value=\"$i\" ".          $selectform.="<option value=\"$i\" ".
             ($i==$deflevel ? 'selected="selected" ' : '').              ($i==$deflevel ? 'selected="selected" ' : '').
Line 4859  sub filemimetype { Line 4877  sub filemimetype {
   
   
 sub filecategoryselect {  sub filecategoryselect {
     my ($name,$value)=@_;      my ($name,$value,$id)=@_;
     return &select_form($value,$name,      return &select_form($value,$name,
                         {'' => &mt('Any category'), map { $_,$_ } sort(keys(%category_extensions))});                          {'' => &mt('Any category'), map { $_,$_ } sort(keys(%category_extensions))},
                           '','',$id);
 }  }
   
 =pod  =pod
Line 7347  form, .inline { Line 7366  form, .inline {
   font-size: 1.0em;    font-size: 1.0em;
 }  }
   
   h1.LC_search_results {
     font-size: 1.0em;
     font-weight: normal;
   }
   
 .LC_menus_content.shown{  .LC_menus_content.shown{
   display: block;    display: block;
 }  }
Line 7359  form, .inline { Line 7383  form, .inline {
   text-align:right;    text-align:right;
 }  }
   
   .LC_left {
     text-align:left;
   }
   
 .LC_center {  .LC_center {
   text-align:center;    text-align:center;
 }  }
Line 7367  form, .inline { Line 7395  form, .inline {
   vertical-align:middle;    vertical-align:middle;
 }  }
   
   .LC_bottom {
     vertical-align:bottom;
   }
   
 .LC_floatleft {  .LC_floatleft {
   float: left;    float: left;
 }  }
Line 7452  div.LC_confirm_box .LC_success img { Line 7484  div.LC_confirm_box .LC_success img {
   height: auto;    height: auto;
 }  }
   
   div.LC_minheight {
     min-height: 24px;
     border: 0;
     margin: 4px 0 0 0;
     padding: 0;
     vertical-align: middle;
   }
   
 .LC_textsize_mobile {  .LC_textsize_mobile {
   \@media only screen and (max-device-width: 480px) {    \@media only screen and (max-device-width: 480px) {
       -webkit-text-size-adjust:100%; -moz-text-size-adjust:100%; -ms-text-size-adjust:100%;        -webkit-text-size-adjust:100%; -moz-text-size-adjust:100%; -ms-text-size-adjust:100%;
Line 7506  div.LC_confirm_box .LC_success img { Line 7546  div.LC_confirm_box .LC_success img {
   padding: 4px;    padding: 4px;
 }  }
   
 table.LC_pastsubmission {  .LC_pastsubmission {
   border: 1px solid black;    border: 1px solid black;
   margin: 2px;    margin: 2px;
     padding: 2px;
 }  }
   
 table#LC_menubuttons {  table#LC_menubuttons {
Line 7644  li.LC_menubuttons_inline_text img { Line 7685  li.LC_menubuttons_inline_text img {
   text-decoration: none;    text-decoration: none;
 }  }
   
   .LC_menubuttons_link img {
     vertical-align: middle;
   }
   
 .LC_menubuttons_category {  .LC_menubuttons_category {
   color: $font;    color: $font;
   background: $pgbg;    background: $pgbg;
Line 7651  li.LC_menubuttons_inline_text img { Line 7696  li.LC_menubuttons_inline_text img {
   font-weight: bold;    font-weight: bold;
 }  }
   
 td.LC_menubuttons_text {  .LC_menu_text {
     clear: left;
     text-align: left;
   color: $font;    color: $font;
 }  }
   
Line 7743  table.LC_data_table tr td.LC_leftcol_hea Line 7790  table.LC_data_table tr td.LC_leftcol_hea
 }  }
   
 table.LC_data_table tr.LC_empty_row td,  table.LC_data_table tr.LC_empty_row td,
 table.LC_nested tr.LC_empty_row td {  table.LC_nested tr.LC_empty_row td,
   table.LC_nested tr.LC_empty_row th {
   font-weight: bold;    font-weight: bold;
   font-style: italic;    font-style: italic;
   text-align: center;    text-align: center;
   padding: 8px;    padding: 8px;
     border: 0;
 }  }
   
 table.LC_data_table tr.LC_empty_row td,  table.LC_data_table tr.LC_empty_row td,
Line 7755  table.LC_data_table tr.LC_footer_row td Line 7804  table.LC_data_table tr.LC_footer_row td
   background-color: $sidebg;    background-color: $sidebg;
 }  }
   
   table.LC_nested tr.LC_empty_row th,
 table.LC_nested tr.LC_empty_row td {  table.LC_nested tr.LC_empty_row td {
     padding: 4ex;
   background-color: #FFFFFF;    background-color: #FFFFFF;
 }  }
   
 table.LC_caption {  table.LC_caption {
 }  }
   
 table.LC_nested tr.LC_empty_row td {  caption.LC_caption_prefs {
   padding: 4ex    font-weight: normal;
     text-align: left;
     padding-bottom: 0.8em;
 }  }
   
 table.LC_nested_outer tr th {  table.LC_nested_outer tr th {
Line 7782  table.LC_nested_outer tr td.LC_subheader Line 7835  table.LC_nested_outer tr td.LC_subheader
   text-align: right;    text-align: right;
 }  }
   
 table.LC_nested tr.LC_info_row td {  table.LC_nested tr.LC_info_row td,
   table.LC_nested tr.LC_info_row th {
   background-color: #CCCCCC;    background-color: #CCCCCC;
   font-weight: bold;    font-weight: bold;
   font-size: small;    font-size: small;
   text-align: center;    text-align: center;
     border: 0;
 }  }
   
 table.LC_nested tr.LC_info_row td.LC_left_item,  table.LC_nested tr.LC_info_row td.LC_left_item,
   table.LC_nested tr.LC_info_row th.LC_left_item,
 table.LC_nested_outer tr th.LC_left_item {  table.LC_nested_outer tr th.LC_left_item {
   text-align: left;    text-align: left;
 }  }
Line 7932  table.LC_data_table tr > td.LC_roles_sel Line 7988  table.LC_data_table tr > td.LC_roles_sel
   border-right: 8px solid #11CC55;    border-right: 8px solid #11CC55;
 }  }
   
   table.LC_data_table tr.LC_prefs_row {
      line-height: 250%;
   }
   
   table.LC_manage_reservations tr th {
     font-weight: normal;
     font-style: italic;
     text-align: left;
     background: transparent;
     font-size: 100%;
   }
   
 span.LC_current_location {  span.LC_current_location {
   font-size:larger;    font-size:larger;
   background: $pgbg;    background: $pgbg;
Line 8134  table.LC_pick_box td.LC_oddrow_value { Line 8202  table.LC_pick_box td.LC_oddrow_value {
   background-color: $data_table_light;    background-color: $data_table_light;
 }  }
   
   td.LC_log_filter,
   th.LC_log_filter {
     vertical-align: top;
     text-align: left;
     padding: 0 4px;
   }
   
 span.LC_helpform_receipt_cat {  span.LC_helpform_receipt_cat {
   font-weight: bold;    font-weight: bold;
 }  }
Line 8296  table.LC_prior_tries td { Line 8371  table.LC_prior_tries td {
   padding: 6px;    padding: 6px;
 }  }
   
 .LC_prob_status {  span.LC_prob_status {
   margin-top: 5px;    margin: 5px 0 0 0;
   padding-top: 0;    padding: 0 5px 0 0;
   padding-left: 0;    vertical-align: middle;
   padding-bottom: 0;  }
   padding-right: 5px;  
   div.LC_prob_status_outer {
     display: inline-block;
     margin: -5px 0 0 0;
     padding: 0;
   }
   
   div.LC_prob_status_inner {
     display: inline-block;
     margin: 0 5px 0 0;
     padding: 5px;
   }
   
   caption.LC_filesub_status {
     text-align: left;
     font-weight: bold;
 }  }
   
 .LC_mail_actions {  .LC_mail_actions {
Line 8627  h6 { Line 8717  h6 {
   border-bottom:solid 1px $lg_border_color;    border-bottom:solid 1px $lg_border_color;
 }  }
   
   .LC_MainMenu_Box > .LC_hcell,
 .LC_Box > .LC_hcell {  .LC_Box > .LC_hcell {
   margin: 0 -10px 10px -10px;    margin: 0 -10px 10px -10px;
 }  }
Line 8666  fieldset#LC_selectuser { Line 8757  fieldset#LC_selectuser {
   border: 0;    border: 0;
 }  }
   
   fieldset.LC_delete_slot {
     display:inline;
     margin: 0 4px 4px;
     padding: 4px;
   }
   
   fieldset.LC_delete_slot > legend {
     font-weight: normal;
   }
   
   p.LC_medium_line {
     line-height: 0.85em;
   }
   
 article.geogebraweb div {  article.geogebraweb div {
     margin: 0;      margin: 0;
 }  }
Line 9065  ol#LC_PathBreadcrumbs li a { Line 9170  ol#LC_PathBreadcrumbs li a {
   padding: 0 0 10px 10px;    padding: 0 0 10px 10px;
 }  }
   
   .LC_MainMenu_Box {
     border: solid 1px $lg_border_color;
     padding: 0 10px 0 10px;
   }
   
 .LC_AboutMe_Image {  .LC_AboutMe_Image {
   float:left;    float:left;
   margin-right:10px;    margin-right:10px;
Line 9086  dl.LC_ListStyleClean dd { Line 9196  dl.LC_ListStyleClean dd {
 .LC_ListStyleClean,  .LC_ListStyleClean,
 .LC_ListStyleSimple,  .LC_ListStyleSimple,
 .LC_ListStyleNormal,  .LC_ListStyleNormal,
   .LC_ListStyleMainMenu,
 .LC_ListStyleSpecial {  .LC_ListStyleSpecial {
   /* display:block; */    /* display:block; */
   list-style-position: inside;    list-style-position: inside;
Line 9123  dl.LC_ListStyleClean dd { Line 9234  dl.LC_ListStyleClean dd {
   margin-bottom: 4px;    margin-bottom: 4px;
 }  }
   
   .LC_ListStyleMainMenu li {
     margin: 0;
     padding: 2px 5px 2px 10px;
     clear: both;
   }
   
 table.LC_SimpleTable {  table.LC_SimpleTable {
   margin:5px;    margin:5px;
   border:solid 1px $lg_border_color;    border:solid 1px $lg_border_color;
Line 9360  pre.LC_wordwrap { Line 9477  pre.LC_wordwrap {
 /*  /*
   styles used for response display    styles used for response display
 */  */
 div.LC_radiofoil, div.LC_rankfoil {  div.LC_radiofoil, div.LC_rankfoil, div.LC_optionfoil, div.LC_matchfoil, div.LC_login_links {
   margin: .5em 0em .5em 0em;    margin: .5em 0em .5em 0em;
 }  }
 table.LC_itemgroup {  table.LC_itemgroup {
   margin-top: 1em;    margin-top: 1em;
 }  }
   
   table.LC_itemgroup tr th {
     font-weight: normal;
   }
   
   fieldset.LC_webbubbles {
     margin: 2px 0 0 0;
     padding: 0;
     border: 0;
   }
   
   ul.LC_webbubbles {
     list-style: none;
     padding: 0;
     margin: 0;
     text-align: left;
     float: left;
   }
   
   ul.LC_webbubbles li {
     line-height: 1.8em;
     border: 1px solid black;
     padding: 0 2px 0 5px;
     margin: 0 0 0 -1px;
     float: left;
   }
   
 /*  /*
   styles used by TTH when "Default set of options to pass to tth/m    styles used by TTH when "Default set of options to pass to tth/m
   when converting TeX" in course settings has been set    when converting TeX" in course settings has been set
Line 10863  sub simple_error_page { Line 11006  sub simple_error_page {
         return;          return;
     }      }
   
       sub set_data_table_count {
           my ($count) = @_;
           unshift(@row_count,$count);
       }
   
     sub start_data_table {      sub start_data_table {
  my ($add_class,$id) = @_;   my ($add_class,$id) = @_;
  my $css_class = (join(' ','LC_data_table',$add_class));   my $css_class = (join(' ','LC_data_table',$add_class));
Line 10910  sub simple_error_page { Line 11058  sub simple_error_page {
     }      }
   
     sub start_data_table_header_row {      sub start_data_table_header_row {
  return  '<tr class="LC_header_row">'."\n";;   my ($add_class,$id) = @_;
    my $css_class = 'LC_header_row';
    $css_class = (join(' ',$css_class,$add_class)) unless ($add_class eq '');
    $id = (' id="'.$id.'"') unless ($id eq '');
    return '<tr class="'.$css_class.'"'.$id.'>'."\n";
     }      }
   
     sub end_data_table_header_row {      sub end_data_table_header_row {
Line 10918  sub simple_error_page { Line 11070  sub simple_error_page {
     }      }
   
     sub data_table_caption {      sub data_table_caption {
         my $caption = shift;          my ($caption,$css_class) = @_;
         return "<caption class=\"LC_caption\">$caption</caption>";          return "<caption class=\"LC_caption $css_class\">$caption</caption>";
     }      }
 }  }
   
Line 15589  sub upfile_select_html { Line 15741  sub upfile_select_html {
                  tab   => &mt('Tabulator separated'),                   tab   => &mt('Tabulator separated'),
 #                 xml   => &mt('HTML/XML'),  #                 xml   => &mt('HTML/XML'),
                  );                   );
     my $Str = '<input type="file" name="upfile" size="50" />'.      my $Str = '<input type="file" name="upfile" id="upfile" size="50" />'.
         '<br />'.&mt('Type').': <select name="upfiletype">';          '<br /><label>'.&mt('Type').': <select name="upfiletype">';
     foreach my $type (sort(keys(%Types))) {      foreach my $type (sort(keys(%Types))) {
         $Str .= '<option value="'.$type.'" >'.$Types{$type}."</option>\n";          $Str .= '<option value="'.$type.'" >'.$Types{$type}."</option>\n";
     }      }
     $Str .= "</select>\n";      $Str .= "</select></label>\n";
     return $Str;      return $Str;
 }  }
   
Line 15678  sub csv_print_select_table { Line 15830  sub csv_print_select_table {
               &end_data_table_header_row()."\n");                &end_data_table_header_row()."\n");
     foreach my $array_ref (@$d) {      foreach my $array_ref (@$d) {
  my ($value,$display,$defaultcol)=@{ $array_ref };   my ($value,$display,$defaultcol)=@{ $array_ref };
  $r->print(&start_data_table_row().'<td>'.$display.'</td>');   $r->print(&start_data_table_row().'<td><label for="f'.$i.'">'.$display.'</label></td>');
   
  $r->print('<td><select name="f'.$i.'"'.   $r->print('<td><select name="f'.$i.'" id="f'.$i.'"'.
   ' onchange="javascript:flip(this.form,'.$i.');">');    ' onchange="javascript:flip(this.form,'.$i.');">');
  $r->print('<option value="none"></option>');   $r->print('<option value="none"></option>');
  foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {   foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {
Line 15725  sub csv_samples_select_table { Line 15877  sub csv_samples_select_table {
               &end_data_table_header_row());                &end_data_table_header_row());
   
     foreach my $key (sort(keys(%{ $samples->[0] }))) {      foreach my $key (sort(keys(%{ $samples->[0] }))) {
           my $num = $i+1;
           my $labeltext = &HTML::Entities::encode(&mt('Field for data in column [_1]',$num));
  $r->print(&start_data_table_row().'<td><select name="f'.$i.'"'.   $r->print(&start_data_table_row().'<td><select name="f'.$i.'"'.
   ' onchange="javascript:flip(this.form,'.$i.');">');    ' onchange="javascript:flip(this.form,'.$i.');" aria-label="'.$labeltext.'">');
  foreach my $option (@$d) {   foreach my $option (@$d) {
     my ($value,$display,$defaultcol)=@{ $option };      my ($value,$display,$defaultcol)=@{ $option };
     $r->print('<option value="'.$value.'"'.      $r->print('<option value="'.$value.'"'.
Line 19037  Returns: HTML to display with informatio Line 19191  Returns: HTML to display with informatio
 sub check_release_result {  sub check_release_result {
     my ($switchwarning,$switchserver) = @_;      my ($switchwarning,$switchserver) = @_;
     my $output = &start_page('Selected course unavailable on this server').      my $output = &start_page('Selected course unavailable on this server').
                  '<p class="LC_warning">';                   '<div class="LC_landmark" role="main"><p class="LC_warning">';
     if ($switchwarning) {      if ($switchwarning) {
         $output .= $switchwarning.'<br /><a href="/adm/roles">';          $output .= $switchwarning.'<br /><a href="/adm/roles">';
         if (&show_course()) {          if (&show_course()) {
Line 19053  sub check_release_result { Line 19207  sub check_release_result {
                    &mt('Switch Server').                     &mt('Switch Server').
                    '</a>';                     '</a>';
     }      }
     $output .= '</p>'.&end_page();      $output .= '</p></div>'.&end_page();
     return $output;      return $output;
 }  }
   
Line 19670  sub create_captcha { Line 19824  sub create_captcha {
             $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">'.
                       '<label>'.&mt('Type in the letters/numbers shown below').'&nbsp;'.                        '<label>'.&mt('Type in the letters/numbers shown below').'&nbsp;'.
                       '<input type="text" size="5" name="code" value="" autocomplete="new-password" />'.                        '<input type="text" size="5" name="code" value="" autocomplete="new-password" aria-required="true" />'.
                       '</label></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;

Removed from v.1.1461  
changed lines
  Added in v.1.1477


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>