'."\n".
+ '
'."\n";
+ if ($showval ne '') {
+ my @current;
+ if ($showval =~ /,/) {
+ @current = split(/,/,$showval);
+ } else {
+ @current = ($showval);
+ }
+ my $num = scalar(@current);
+ foreach my $item (@current) {
+ my ($delta,$fraction,$gradational) = split(/:/,$item);
+ if (($delta =~ /^\d+$/) && ($fraction =~ /^(0|1)\.?\d*$/) &&
+ (($gradational eq 1) || ($gradational eq '0'))) {
+ my $gradchk = '';
+ if ($gradational) {
+ $gradchk = ' checked="checked"';
+ }
+ $output .= &grace_form($thiskey,$delta,$fraction,$gradchk,
+ $readonly);
+ }
+ }
+ } 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"';
+ }
+ my %lt = &grace_titles();
+ my $output = '