';
- foreach my $item (@components) {
- $output .= '';
- if (($item eq 'protect') || ($item eq 'menus')) {
- my $selected = $values{$item};
- foreach my $option (@{$options{$item}}) {
- if ($item eq 'protect') {
- if ($option eq 'ltid') {
- next unless (keys(%domlti));
- } elsif ($option eq 'ltic') {
- next unless (keys(%crslti));
- }
- } elsif (($item eq 'menus') && ($option eq 'colls')) {
- next unless (@possmenus);
- }
- my $checked;
- if ($item eq 'menus') {
- if (($selected =~ /^\d+$/) && (@possmenus) &&
- (grep(/^\Q$selected\E$/,@possmenus))) {
- if ($option eq 'colls') {
+ my $output = '';
+ foreach my $table ('upper','lower') {
+ next unless (ref($components{$table}) eq 'ARRAY');
+ $output .= '';
+ foreach my $item (@{$components{$table}}) {
+ $output .= ''.$titles{$item}.' | ';
+ }
+ $output .= ' ';
+ foreach my $item (@{$components{$table}}) {
+ $output .= '';
+ if (($item eq 'protect') || ($item eq 'menus') || ($item eq 'exit')) {
+ my $selected = $values{$item};
+ foreach my $option (@{$options{$item}}) {
+ if ($item eq 'protect') {
+ if ($option eq 'ltid') {
+ next unless (keys(%domlti));
+ } elsif ($option eq 'ltic') {
+ next unless (keys(%crslti));
+ }
+ } elsif (($item eq 'menus') && ($option eq 'colls')) {
+ next unless (@possmenus);
+ }
+ my $checked;
+ if ($item eq 'menus') {
+ if (($selected =~ /^\d+$/) && (@possmenus) &&
+ (grep(/^\Q$selected\E$/,@possmenus))) {
+ if ($option eq 'colls') {
+ $checked = ' checked="checked"';
+ }
+ } elsif (($option eq 'std') && ($selected == 0) && ($selected ne '')) {
$checked = ' checked="checked"';
}
- } elsif (($option eq 'std') && ($selected == 0) && ($selected ne '')) {
+ } elsif ($selected =~ /^\Q$option\E/) {
$checked = ' checked="checked"';
}
- } elsif ($selected =~ /^\Q$option\E/) {
- $checked = ' checked="checked"';
- }
- my $onclick;
- unless ($readonly) {
- my $esc_key = &js_escape($thiskey);
- $onclick = ' onclick="toggleDeepLink(this.form,'."'$item','$esc_key'".');"';
- }
- $output .= '';
- if (($item eq 'protect') && ($option eq 'key')) {
- my $visibility="hidden";
- my $currkey;
- if ($checked) {
- $visibility = "text";
- $currkey = (split(/\:/,$values{$item}))[1];
- }
- $output .= ' '.
- '';
- } elsif (($option eq 'ltic') || ($option eq 'ltid') || ($option eq 'colls')) {
- my $display="none";
- my ($current,$blankcheck,@possibles);
- if ($checked) {
- $display = 'inline-block';
- if (($option eq 'ltic') || ($option eq 'ltid')) {
- $current = (split(/\:/,$selected))[1];
+ my $onclick;
+ unless ($readonly) {
+ my $esc_key = &js_escape($thiskey);
+ $onclick = ' onclick="toggleDeepLink(this.form,'."'$item','$esc_key'".');"';
+ }
+ $output .= '';
+ if (($item eq 'protect') && ($option eq 'key')) {
+ my $visibility="hidden";
+ my $currkey;
+ if ($checked) {
+ $visibility = "text";
+ $currkey = (split(/\:/,$values{$item}))[1];
+ }
+ $output .= ' '.
+ '';
+ } elsif (($option eq 'ltic') || ($option eq 'ltid') || ($option eq 'colls')) {
+ my $display="none";
+ my ($current,$blankcheck,@possibles);
+ if ($checked) {
+ $display = 'inline-block';
+ if (($option eq 'ltic') || ($option eq 'ltid')) {
+ $current = (split(/\:/,$selected))[1];
+ } else {
+ $current = $selected;
+ }
} else {
- $current = $selected;
+ $blankcheck = ' selected="selected"';
}
- } else {
- $blankcheck = ' selected="selected"';
- }
- if ($option eq 'ltid') {
- @possibles = keys(%domlti);
- } elsif ($option eq 'ltic') {
- @possibles = keys(%crslti);
- } else {
- @possibles = @possmenus;
- }
- $output .= ' ';
+ $output .= ' '.&mt('Button text').': '.
+ ' ';
}
- $output .= ' ';
- }
+ } else {
+ my $selected = $values{$item};
+ my $defsel;
+ if ($selected eq '') {
+ $defsel = ' selected="selected"';
+ }
+ $output .= ''."\n".
+ ''."\n";
+ foreach my $option (@{$options{$item}}) {
+ $output .= '';
+ }
+ $output .= ' | ';
+ }
+ $output .= ' '."\n";
+ if ($table eq 'upper') {
+ $output .= ' ';
+ }
+ }
+ return $output;
+}
+
+sub string_grace_selector {
+ my ($thiskey, $showval, $readonly) = @_;
+ my $addmore;
+ unless ($readonly) {
+ $addmore = "\n".'';
+ }
+ my $output = ''.
+ ''."\n".
+ ' '."\n";
+ if ($showval ne '') {
+ my @current;
+ if ($showval =~ /,/) {
+ @current = split(/,/,$showval);
} else {
- my $selected = $values{$item};
- my $defsel;
- if ($selected eq '') {
- $defsel = ' selected="selected"';
- }
- $output .= ''."\n".
- ''."\n";
- foreach my $option (@{$options{$item}}) {
- $output .= '';
}
- $output .= ' | ';
+ } elsif (!$readonly) {
+ $output .= &grace_form($thiskey,'','','',$readonly);
+ }
+ $output .= ''.$addmore.'';
+ return $output;
+}
+
+sub grace_form {
+ my ($thiskey,$delta,$fraction,$gradchkon,$readonly) = @_;
+ my $disabled;
+ if ($readonly) {
+ $disabled = ' disabled="disabled"';
}
- $output .= '