--- loncom/interface/domainprefs.pm 2017/07/18 16:03:08 1.302 +++ loncom/interface/domainprefs.pm 2017/07/26 19:45:45 1.303 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.302 2017/07/18 16:03:08 raeburn Exp $ +# $Id: domainprefs.pm,v 1.303 2017/07/26 19:45:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -281,7 +281,7 @@ sub handler { {col1 => 'Internal Authentication', col2 => 'Value'}, {col1 => 'Institutional user types', - col2 => 'Assignable to e-mail usernames'}], + col2 => 'Assignable to non-institutional users'}], print => \&print_defaults, modify => \&modify_defaults, }, @@ -363,7 +363,7 @@ sub handler { col2 => 'Enabled?'}, {col1 => 'Institutional user type (login/SSO self-creation)', col2 => 'Information user can enter'}, - {col1 => 'Self-creation with e-mail as username', + {col1 => 'Self-creation with e-mail verification', col2 => 'Settings'}], print => \&print_selfcreation, modify => \&modify_selfcreation, @@ -5752,7 +5752,7 @@ sub print_usercreation { sub print_selfcreation { my ($position,$dom,$settings,$rowtotal) = @_; - my (@selfcreate,$createsettings,$processing,$datatable); + my (@selfcreate,$createsettings,$processing,$emailverified,$emaildomain,$datatable); if (ref($settings) eq 'HASH') { if (ref($settings->{'cancreate'}) eq 'HASH') { $createsettings = $settings->{'cancreate'}; @@ -5769,6 +5769,12 @@ sub print_selfcreation { if (ref($createsettings->{'selfcreateprocessing'}) eq 'HASH') { $processing = $createsettings->{'selfcreateprocessing'}; } + if (ref($createsettings->{'emailverified'}) eq 'HASH') { + $emailverified = $createsettings->{'emailverified'}; + } + if (ref($createsettings->{'emaildomain'}) eq 'HASH') { + $emaildomain = $createsettings->{'emaildomain'}; + } } } } @@ -5859,7 +5865,7 @@ sub print_selfcreation { } } else { my %choices = &Apache::lonlocal::texthash ( - cancreate_email => 'E-mail address as username', + cancreate_email => 'Non-institutional username (e-mail verification)', ); my @toggles = sort(keys(%choices)); my %defaultchecked = ( @@ -5891,16 +5897,27 @@ sub print_selfcreation { $usertypeshash{'default'} = $othertitle; $additional .= ''; foreach my $status (@ordered) { - $additional .= ''; + $additional .= ''; + } + $additional .= ''; + foreach my $status (@ordered) { + $additional .= ''; + } + $additional .= '
'.$usertypeshash{$status}.''.$usertypeshash{$status}.'
'.&validate_by_email($rowtotal,$processing,$status).'

'. + ''; + foreach my $status (@ordered) { + $additional .= ''; } $additional .= ''; foreach my $status (@ordered) { - $additional .= ''; + $additional .= ''; } $additional .= '
'.$usertypeshash{$status}.'
'.&email_as_username($rowtotal,$processing,$status).''.&email_as_username($rowtotal,$emailverified,$emaildomain,$status).'
'; + } else { $usertypeshash{'default'} = $othertitle; - $additional .= &email_as_username($rowtotal,$processing); + $additional .= &mt('Approval:').' '.&validate_by_email($rowtotal,$processing).'
'. + &mt('Username:').' '.&email_as_username($rowtotal,$emailverified,$emaildomain); } $additional .= ''."\n"; @@ -5930,15 +5947,20 @@ sub print_selfcreation { return $datatable; } -sub email_as_username { +sub validate_by_email { my ($rowtotal,$processing,$type) = @_; my %choices = &Apache::lonlocal::texthash ( automatic => 'Automatic approval', approval => 'Queued for approval', + notinuse => 'Unavailable', ); my $output; - foreach my $option ('automatic','approval') { + my @options = ('automatic','approval'); + unless ($type eq '') { + push(@options,'notinuse'); + } + foreach my $option (@options) { my $checked; if (ref($processing) eq 'HASH') { if ($type eq '') { @@ -5983,6 +6005,83 @@ sub email_as_username { return $output; } +sub email_as_username { + my ($rowtotal,$emailverified,$emaildomain,$type) = @_; + my %choices = + &Apache::lonlocal::texthash ( + email => 'Username is e-mail', + other => 'Username is chosen', + ); + my $name = 'cancreate_emailverified'; + my $condition = 'cancreate_emaildomain'; + if (($type ne '') && ($type ne 'default')) { + $name .= '_'.$type; + $condition .= '_'.$type; + } + my $display = 'none'; + my $onclick = "toggleDisplay(this.form,'$name');"; + + my $output; + foreach my $option ('email','other') { + my ($checked,$domain); + if (ref($emailverified) eq 'HASH') { + if ($type eq '') { + if (!exists($emailverified->{'default'})) { + if ($option eq 'email') { + $checked = ' checked="checked"'; + } + } else { + if ($emailverified->{'default'} eq $option) { + $checked = ' checked="checked"'; + } + } + } else { + if (!exists($emailverified->{$type})) { + if ($option eq 'email') { + $checked = ' checked="checked"'; + } + } else { + if ($emailverified->{$type} eq $option) { + $checked = ' checked="checked"'; + if ($option eq 'other') { + $display = 'inline'; + } + } + } + } + } elsif ($option eq 'email') { + $checked = ' checked="checked"'; + } + $output .= ''; + if ($type eq '') { + $output .= ' '; + } else { + $output .= '
'; + } + } + my $domain; + if (ref($emaildomain) eq 'HASH') { + if ($type eq '') { + if (exists($emaildomain->{'default'})) { + $domain = $emaildomain->{'default'}; + } + } else { + if (exists($emaildomain->{$type})) { + $domain = $emaildomain->{$type}; + } + } + } + $output .= '
'. + ''.&mt('E-mail domain').' '. + ''. + '
'; + $$rowtotal ++; + return $output; +} + sub captcha_choice { my ($context,$settings,$itemcount) = @_; my ($keyentry,$currpub,$currpriv,%checked,$rowname,$pubtext,$privtext, @@ -10959,12 +11058,10 @@ sub modify_usercreation { if ($key eq 'cancreate') { if (ref($domconfig{'usercreation'}{$key}) eq 'HASH') { foreach my $item (keys(%{$domconfig{'usercreation'}{$key}})) { - if (($item eq 'selfcreate') || ($item eq 'statustocreate') || - ($item eq 'captcha') || ($item eq 'recaptchakeys') || - ($item eq 'recaptchaversion')) { - $save_usercreate{$key}{$item} = $domconfig{'usercreation'}{$key}{$item}; - } else { + if (($item eq 'requestcrs') || ($item eq 'course') || ($item eq 'author')) { $curr_usercreation{$key}{$item} = $domconfig{'usercreation'}{$key}{$item}; + } else { + $save_usercreate{$key}{$item} = $domconfig{'usercreation'}{$key}{$item}; } } } @@ -11169,12 +11266,18 @@ sub modify_usercreation { sub modify_selfcreation { my ($dom,%domconfig) = @_; my ($resulttext,$warningmsg,%curr_usercreation,%curr_usermodify,%changes,%cancreate); - my (%save_usercreate,%save_usermodify); - my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); - if (ref($types) eq 'ARRAY') { - $usertypes->{'default'} = $othertitle; - push(@{$types},'default'); + my (%save_usercreate,%save_usermodify,@types,%usertypes); + my ($othertitle,$usertypesref,$typesref) = &Apache::loncommon::sorted_inst_types($dom); + if (ref($typesref) eq 'ARRAY') { + @types = @{$typesref}; + } + unless (grep(/^default$/,@types)) { + push(@types,'default'); } + if (ref($usertypesref) eq 'HASH') { + %usertypes = %{$usertypesref}; + } + $usertypes{'default'} = $othertitle; # # Retrieve current domain configuration for self-creation of usernames from $domconfig{'usercreation'}. # @@ -11184,10 +11287,11 @@ sub modify_selfcreation { if (ref($domconfig{'usercreation'}{$key}) eq 'HASH') { foreach my $item (keys(%{$domconfig{'usercreation'}{$key}})) { if (($item eq 'selfcreate') || ($item eq 'statustocreate') || - ($item eq 'captcha') || ($item eq 'recaptchakeys') || - ($item eq 'recaptchaversion') || - ($item eq 'emailusername') || ($item eq 'notify') || - ($item eq 'selfcreateprocessing') || ($item eq 'shibenv')) { + ($item eq 'captcha') || ($item eq 'recaptchakeys') || + ($item eq 'recaptchaversion') || ($item eq 'notify') || + ($item eq 'emailusername') || ($item eq 'shibenv') || + ($item eq 'selfcreateprocessing') || ($item eq 'emailverified') || + ($item eq 'emaildomain')) { $curr_usercreation{$key}{$item} = $domconfig{'usercreation'}{$key}{$item}; } else { $save_usercreate{$key}{$item} = $domconfig{'usercreation'}{$key}{$item}; @@ -11220,10 +11324,12 @@ sub modify_selfcreation { @{$cancreate{'statustocreate'}} = (); %{$cancreate{'selfcreateprocessing'}} = (); %{$cancreate{'shibenv'}} = (); + %{$cancreate{'emailverified'}} = (); + %{$cancreate{'emaildomain'}} = (); my %selfcreatetypes = ( sso => 'users authenticated by institutional single sign on', login => 'users authenticated by institutional log-in', - email => 'users who provide a valid e-mail address for use as username', + email => 'users verified by e-mail', ); # # Populate $cancreate{'selfcreate'} array reference with types of user, for which self-creation of user accounts @@ -11242,12 +11348,22 @@ sub modify_selfcreation { if ($item eq 'email') { if ($env{'form.cancreate_email'}) { push(@{$cancreate{'selfcreate'}},'email'); - push(@contexts,'selfcreateprocessing'); + push(@contexts,('selfcreateprocessing','emailverified','emaildomain')); foreach my $type (@statuses) { if ($type eq 'default') { $cancreate{'selfcreateprocessing'}{$type} = $env{'form.cancreate_emailprocess'}; + unless ($cancreate{'selfcreateprocessing'}{$type} eq 'notinuse') { + $cancreate{'emailverified'}{$type} = $env{'form.cancreate_emailverified'}; + if ($cancreate{'emailverified'}{$type} eq 'other') { + $cancreate{'emaildomain'}{$type} =$env{'form.cancreate_emaildomain'}; + } + } } else { $cancreate{'selfcreateprocessing'}{$type} = $env{'form.cancreate_emailprocess_'.$type}; + $cancreate{'emailverified'}{$type} = $env{'form.cancreate_emailverified_'.$type}; + if ($cancreate{'emailverified'}{$type} eq 'other') { + $cancreate{'emaildomain'}{$type} =$env{'form.cancreate_emaildomain_'.$type}; + } } } } @@ -11266,8 +11382,8 @@ sub modify_selfcreation { if ($env{'form.cancreate_email'}) { push(@contexts,'emailusername'); - if (ref($types) eq 'ARRAY') { - foreach my $type (@{$types}) { + if (@types) { + foreach my $type (@types) { if (ref($infofields) eq 'ARRAY') { foreach my $field (@{$infofields}) { if ($env{'form.canmodify_emailusername_'.$type.'_'.$field} =~ /^(required|optional)$/) { @@ -11279,7 +11395,7 @@ sub modify_selfcreation { } # # Populate $cancreate{'notify'} hash ref with names of Domain Coordinators who are to be notified of -# queued requests for self-creation of account using e-mail address as username +# queued requests for self-creation of account verified by e-mail. # my @approvalnotify = &Apache::loncommon::get_env_multiple('form.selfcreationnotifyapproval'); @@ -11300,7 +11416,7 @@ sub modify_selfcreation { } # -# Retrieve rules (if any) governing types of e-mail address which may be used as a username +# Retrieve rules (if any) governing types of e-mail address which may be used to verify a username. # @email_rule = &Apache::loncommon::get_env_multiple('form.email_rule'); &process_captcha('cancreate',\%changes,\%savecaptcha,$curr_usercreation{'cancreate'}); @@ -11347,14 +11463,14 @@ sub modify_selfcreation { # which the user may supply, if institutional data is unavailable. # if (($env{'form.cancreate_login'}) || ($env{'form.cancreate_sso'})) { - if (ref($types) eq 'ARRAY') { - if (@{$types} > 1) { + if (@types) { + if (@types > 1) { @{$cancreate{'statustocreate'}} = &Apache::loncommon::get_env_multiple('form.statustocreate'); push(@contexts,'statustocreate'); } else { undef($cancreate{'statustocreate'}); } - foreach my $type (@{$types}) { + foreach my $type (@types) { my @modifiable = &Apache::loncommon::get_env_multiple('form.canmodify_'.$type); foreach my $field (@fields) { if (grep(/^\Q$field\E$/,@modifiable)) { @@ -11365,7 +11481,7 @@ sub modify_selfcreation { } } if (ref($curr_usermodify{'selfcreate'}) eq 'HASH') { - foreach my $type (@{$types}) { + foreach my $type (@types) { if (ref($curr_usermodify{'selfcreate'}{$type}) eq 'HASH') { foreach my $field (@fields) { if ($save_usermodify{'selfcreate'}{$type}{$field} ne @@ -11377,7 +11493,7 @@ sub modify_selfcreation { } } } else { - foreach my $type (@{$types}) { + foreach my $type (@types) { push(@{$changes{'selfcreate'}},$type); } } @@ -11435,7 +11551,7 @@ sub modify_selfcreation { } } } - } elsif ($item eq 'selfcreateprocessing') { + } elsif (($item eq 'selfcreateprocessing') || ($item eq 'emailverified') || ($item eq 'emaildomain')) { if ($cancreate{$item}{$curr} ne $curr_usercreation{'cancreate'}{$item}{$curr}) { if (!grep(/^$item$/,@{$changes{'cancreate'}})) { push(@{$changes{'cancreate'}},$item); @@ -11523,6 +11639,12 @@ sub modify_selfcreation { if (ref($cancreate{'selfcreateprocessing'}) eq 'HASH') { $save_usercreate{'cancreate'}{'selfcreateprocessing'} = $cancreate{'selfcreateprocessing'}; } + if (ref($cancreate{'emailverified'}) eq 'HASH') { + $save_usercreate{'cancreate'}{'emailverified'} = $cancreate{'emailverified'}; + } + if (ref($cancreate{'emaildomain'}) eq 'HASH') { + $save_usercreate{'cancreate'}{'emaildomain'} = $cancreate{'emaildomain'}; + } if (ref($cancreate{'statustocreate'}) eq 'ARRAY') { $save_usercreate{'cancreate'}{'statustocreate'} = $cancreate{'statustocreate'}; } @@ -11547,7 +11669,7 @@ sub modify_selfcreation { if (ref($changes{'cancreate'}) eq 'ARRAY') { my %lt = &selfcreation_types(); foreach my $type (@{$changes{'cancreate'}}) { - my $chgtext; + my $chgtext = ''; if ($type eq 'selfcreate') { if (@{$cancreate{$type}} == 0) { $chgtext .= &mt('Self creation of a new user account is not permitted.'); @@ -11562,10 +11684,25 @@ sub modify_selfcreation { if (grep(/^(login|sso)$/,@{$cancreate{$type}})) { if (ref($cancreate{'statustocreate'}) eq 'ARRAY') { if (@{$cancreate{'statustocreate'}} == 0) { - $chgtext .= '
'. - ''. - &mt("However, no institutional affiliations (including 'other') are currently permitted to create accounts."). - ''; + $chgtext .= ''. + &mt("However, no institutional affiliations (including 'other') are currently permitted to create accounts via log-in or single sign-on."). + '
'; + } + } + } + if (grep(/^email$/,@{$cancreate{$type}})) { + if (@statuses > 1) { + my $numtypes = 0; + foreach my $type (@statuses) { + unless ($cancreate{'selfcreateprocessing'}{$type} eq 'notinuse') { + $numtypes ++; + } + } + if (!$numtypes) { + $chgtext .= ''. + &mt("However, e-mail verification is currently set to 'unavailable' for all user types (including 'other'), so self-creation of accounts is not possible for non-institutional log-in."). + '
'; + } } } @@ -11573,7 +11710,7 @@ sub modify_selfcreation { } } elsif ($type eq 'shibenv') { if (keys(%{$cancreate{$type}}) == 0) { - $chgtext .= &mt('Shibboleth-autheticated user does not use environment variables to set user information'); + $chgtext .= &mt('Shibboleth-autheticated user does not use environment variables to set user information').'
'; } else { $chgtext .= &mt('Shibboleth-autheticated user information set from environment variables, as follows:'). ''; - } + } } elsif ($type eq 'statustocreate') { if ((ref($cancreate{'selfcreate'}) eq 'ARRAY') && (ref($cancreate{'statustocreate'}) eq 'ARRAY')) { @@ -11599,7 +11736,7 @@ sub modify_selfcreation { &mt("However, no institutional affiliations (including 'other') are currently permitted to create accounts."). ''; } - } elsif (ref($usertypes) eq 'HASH') { + } elsif (keys(%usertypes) > 0) { if (grep(/^(login|sso)$/,@{$cancreate{'selfcreate'}})) { $chgtext .= &mt('Creation of a new account for an institutional user is restricted to the following institutional affiliation(s):'); } else { @@ -11610,12 +11747,12 @@ sub modify_selfcreation { if ($case eq 'default') { $chgtext .= '
  • '.$othertitle.'
  • '; } else { - $chgtext .= '
  • '.$usertypes->{$case}.'
  • '; + $chgtext .= '
  • '.$usertypes{$case}.'
  • '; } } $chgtext .= ''; if (!grep(/^(login|sso)$/,@{$cancreate{'selfcreate'}})) { - $chgtext .= '
    '. + $chgtext .= ''. &mt('However, users authenticated by institutional login/single sign on are not currently permitted to create accounts.'). ''; } @@ -11627,26 +11764,109 @@ sub modify_selfcreation { $chgtext .= &mt('Although institutional affiliations permitted to create accounts were changed, self creation of accounts is not currently permitted for any authentication types.'); } } + $chgtext .= '
    '; } } elsif ($type eq 'selfcreateprocessing') { my %choices = &Apache::lonlocal::texthash ( automatic => 'Automatic approval', approval => 'Queued for approval', + notinuse => 'Unavailable', ); if (@statuses > 1) { - $chgtext .= &mt('Processing of requests to create account with e-mail address as username set as follows:'). - ''; + my $numtypes = 0; + foreach my $type (@statuses) { + unless ($cancreate{'selfcreateprocessing'}{$type} eq 'notinuse') { + $numtypes ++; + } + } + if ($numtypes) { + $chgtext .= &mt('Processing of requests to create account with e-mail verification set as follows:'). + ''; + } } else { - $chgtext .= &mt('Processing of requests to create account with e-mail address as username set to: "[_1]"', - $choices{$cancreate{'selfcreateprocessing'}{'default'}}); + $chgtext .= &mt('Processing of requests to create account with e-mail verification set to: "[_1]"', + $choices{$cancreate{'selfcreateprocessing'}{'default'}}); + } + } elsif ($type eq 'emailverified') { + my %options = &Apache::lonlocal::texthash ( + email => 'Username is e-mail', + other => 'Username is chosen', + ); + if (@statuses > 1) { + my $numtypes = 0; + foreach my $type (@statuses) { + unless ($cancreate{'selfcreateprocessing'}{$type} eq 'notinuse') { + $numtypes ++; + } + } + if ($numtypes) { + $chgtext .= &mt('For self-created accounts verified by e-mail address, username is set as follows:'). + ''; + } + } else { + $chgtext .= &mt('For self-created accounts verified by e-mail address: "[_1]"', + $choices{$cancreate{'emailverified'}{'default'}}); + } + } elsif ($type eq 'emaildomain') { + if (@statuses > 1) { + my $numtypes = 0; + foreach my $type (@statuses) { + unless ($cancreate{'selfcreateprocessing'}{$type} eq 'notinuse') { + if ($cancreate{'emailverified'}{$type} eq 'other') { + $numtypes ++; + } + } + } + if ($numtypes) { + $chgtext .= &mt('For self-created accounts verified by e-mail address, with username chosen by user ...'). + ''; + } + } else { + if ($cancreate{'emailverified'}{'default'} eq 'other') { + if ($cancreate{'emaildomain'}{'default'} eq '') { + $chgtext .= &mt('No restriction on e-mail domain for self-created accounts verified by e-mail address, where username is chosen by user.'); + } else { + $chgtext .= &mt('For self-created accounts verified by e-mail address, where username is chosen by user, e-mail domain needs to be: [_1], + $cancreate{'selfcreateprocessing'}{'default'}); + } + } } } elsif ($type eq 'captcha') { if ($savecaptcha{$type} eq 'notused') { @@ -11683,11 +11903,11 @@ sub modify_selfcreation { } } elsif ($type eq 'emailusername') { if (ref($cancreate{'emailusername'}) eq 'HASH') { - if (ref($types) eq 'ARRAY') { - foreach my $type (@{$types}) { + if (@types) { + foreach my $type (@types) { if (ref($cancreate{'emailusername'}{$type}) eq 'HASH') { if (keys(%{$cancreate{'emailusername'}{$type}}) > 0) { - $chgtext .= &mt('When self-creating account with e-mail as username, the following information will be provided by [_1]:',"'$usertypes->{$type}'"). + $chgtext .= &mt('When self-creating account with e-mail verification, the following information will be provided by [_1]:',"'$usertypes{$type}'"). ''; } else { - $chgtext .= &mt('When self creating account with e-mail as username, no information besides e-mail address will be provided by [_1].',"'$usertypes->{$type}'").'
    '; + $chgtext .= &mt('When self creating account with e-mail verification, no information besides e-mail address will be provided by [_1].',"'$usertypes{$type}'").'
    '; } } else { - $chgtext .= &mt('When self creating account with e-mail as username, no information besides e-mail address will be provided by [_1].',"'$usertypes->{$type}'").'
    '; + $chgtext .= &mt('When self creating account with e-mail verification, no information besides e-mail address will be provided by [_1].',"'$usertypes{$type}'").'
    '; } } } } } elsif ($type eq 'notify') { - $chgtext = &mt('No Domain Coordinators will receive notification of username requests requiring approval.'); + my $numapprove = 0; if (ref($changes{'cancreate'}) eq 'ARRAY') { if ((grep(/^notify$/,@{$changes{'cancreate'}})) && (ref($cancreate{'notify'}) eq 'HASH')) { if ($cancreate{'notify'}{'approval'}) { - $chgtext = &mt('Notification of username requests requiring approval will be sent to: ').$cancreate{'notify'}{'approval'}; + $chgtext .= &mt('Notification of username requests requiring approval will be sent to: ').$cancreate{'notify'}{'approval'}; + $numapprove ++; } } } + unless ($numapprove) { + $chgtext .= &mt('No Domain Coordinators will receive notification of username requests requiring approval.'); + } } if ($chgtext) { $resulttext .= '
  • '.$chgtext.'
  • '; @@ -11731,12 +11955,12 @@ sub modify_selfcreation { $chgtext .= ''; if (@email_rule > 0) { $resulttext .= '
  • '. - &mt('Accounts may not be created by users self-enrolling with e-mail addresses of the following types: '). + &mt('Accounts may not be created by users verified by e-mail, for e-mail addresses of the following types: '). $chgtext. '
  • '; } else { $resulttext .= '
  • '. - &mt('There are now no restrictions on e-mail addresses which may be used as a username when self-enrolling.'). + &mt('There are now no restrictions on e-mail addresses which may be used for verification when self-enrolling.'). '
  • '; } } @@ -11745,9 +11969,9 @@ sub modify_selfcreation { my %fieldtitles = &Apache::loncommon::personal_data_fieldtitles(); foreach my $type (@{$changes{'selfcreate'}}) { my $typename = $type; - if (ref($usertypes) eq 'HASH') { - if ($usertypes->{$type} ne '') { - $typename = $usertypes->{$type}; + if (keys(%usertypes) > 0) { + if ($usertypes{$type} ne '') { + $typename = $usertypes{$type}; } } my @modifiable; @@ -15248,6 +15472,7 @@ function toggleDisplay(domForm,caller) { var optionsElement = domForm.coursecredits; var checkval = 1; var dispval = 'block'; + var selfcreateRegExp = /^cancreate_emailverified/; if (caller == 'emailoptions') { optionsElement = domForm.cancreate_email; } @@ -15258,6 +15483,11 @@ function toggleDisplay(domForm,caller) { optionsElement = domForm.canclone; checkval = 'instcode'; } + if (selfcreateRegExp.test(caller)) { + optionsElement = domForm.elements[caller]; + checkval = 'other'; + dispval = 'inline' + } if (optionsElement.length) { var currval; for (var i=0; i