version 1.1471, 2025/03/18 18:57:28
|
version 1.1474, 2025/03/22 21:18:30
|
Line 2848 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 |
$id = (optional) id for <select> element |
|
|
=cut |
=cut |
|
|
Line 2890 sub multiple_select_form {
|
Line 2890 sub multiple_select_form {
|
|
|
=pod |
=pod |
|
|
=item * &select_form($defdom,$name,$hashref,$onchange,$readonly,$id) |
=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 2899 a javascript onchange item, e.g., onchan
|
Line 2899 a javascript onchange item, e.g., onchan
|
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. An optional arg |
specific role, and is viewing/modifying parameters. An optional arg |
-- $id -- will be used as the id attribute of the select element. |
-- $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 2907 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,$id) = @_; |
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 2919 sub select_form {
|
Line 2921 sub select_form {
|
if ($id ne '') { |
if ($id ne '') { |
$id = ' id="'.$id.'"'; |
$id = ' id="'.$id.'"'; |
} |
} |
my $selectform = "<select name=\"$name\" size=\"1\"$onchange$disabled$id>\n"; |
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 7361 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 7470 div.LC_confirm_box .LC_success img {
|
Line 7480 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 7762 table.LC_data_table tr td.LC_leftcol_hea
|
Line 7780 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 7774 table.LC_data_table tr.LC_footer_row td
|
Line 7794 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; |
} |
} |
|
|
Line 7787 caption.LC_caption_prefs {
|
Line 7809 caption.LC_caption_prefs {
|
padding-bottom: 0.8em; |
padding-bottom: 0.8em; |
} |
} |
|
|
table.LC_nested tr.LC_empty_row td { |
|
padding: 4ex |
|
} |
|
|
|
table.LC_nested_outer tr th { |
table.LC_nested_outer tr th { |
font-weight: bold; |
font-weight: bold; |
color:$fontmenu; |
color:$fontmenu; |
Line 7807 table.LC_nested_outer tr td.LC_subheader
|
Line 7825 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 8163 table.LC_pick_box td.LC_oddrow_value {
|
Line 8184 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 8710 fieldset#LC_selectuser {
|
Line 8738 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 15668 sub upfile_select_html {
|
Line 15710 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 15757 sub csv_print_select_table {
|
Line 15799 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 15804 sub csv_samples_select_table {
|
Line 15846 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.'"'. |