Diff for /loncom/interface/loncreateuser.pm between versions 1.474 and 1.476

version 1.474, 2023/11/17 17:02:20 version 1.476, 2024/02/29 16:28:35
Line 245  function toggleCustom(form,item,name) { Line 245  function toggleCustom(form,item,name) {
         if (radioname) {          if (radioname) {
             if (radioname.length > 0) {              if (radioname.length > 0) {
                 var setvis;                  var setvis;
                   var RegExp = /^customtext_(aboutme|blog|portfolio|portaccess|timezone|webdav)\$/;
                 for (var i=0; i<radioname.length; i++) {                  for (var i=0; i<radioname.length; i++) {
                     if (radioname[i].checked == true) {                      if (radioname[i].checked == true) {
                         if (radioname[i].value == 1) {                          if (radioname[i].value == 1) {
                             divid.style.display = 'block';                              if (RegExp.test(item)) {
                                   divid.style.display = 'inline';
                               } else {
                                   divid.style.display = 'block';
                               }
                             setvis = 1;                              setvis = 1;
                         }                          }
                         break;                          break;
Line 273  sub build_tools_display { Line 278  sub build_tools_display {
     my ($ccuname,$ccdomain,$context) = @_;      my ($ccuname,$ccdomain,$context) = @_;
     my (@usertools,%userenv,$output,@options,%validations,%reqtitles,%reqdisplay,      my (@usertools,%userenv,$output,@options,%validations,%reqtitles,%reqdisplay,
         $colspan,$isadv,%domconfig,@defaulteditors,@customeditors,@custommanagers,          $colspan,$isadv,%domconfig,@defaulteditors,@customeditors,@custommanagers,
         @possmanagers,$editorsty,$customsty);          @possmanagers);
     my %lt = &Apache::lonlocal::texthash (      my %lt = &Apache::lonlocal::texthash (
                    'blog'       => "Personal User Blog",                     'blog'       => "Personal User Blog",
                    'aboutme'    => "Personal Information Page",                     'aboutme'    => "Personal Information Page",
Line 337  sub build_tools_display { Line 342  sub build_tools_display {
     }      }
     foreach my $item (@usertools) {      foreach my $item (@usertools) {
         my ($custom_access,$curr_access,$cust_on,$cust_off,$tool_on,$tool_off,          my ($custom_access,$curr_access,$cust_on,$cust_off,$tool_on,$tool_off,
             $currdisp,$custdisp,$custradio,$onclick);              $currdisp,$custdisp,$custradio,$onclick,$customsty,$editorsty);
         $cust_off = 'checked="checked" ';          $cust_off = 'checked="checked" ';
         $tool_on = 'checked="checked" ';          $tool_on = 'checked="checked" ';
         unless (($context eq 'authordefaults') && ($item ne 'webdav')) {          unless (($context eq 'authordefaults') && ($item ne 'webdav')) {
Line 476  sub build_tools_display { Line 481  sub build_tools_display {
                    '  </tr>'."\n".                     '  </tr>'."\n".
                    &Apache::loncommon::start_data_table_row()."\n";                     &Apache::loncommon::start_data_table_row()."\n";
         if (($context eq 'requestcourses') || ($context eq 'requestauthor')) {          if (($context eq 'requestcourses') || ($context eq 'requestauthor')) {
             my ($curroption,$currlimit,$customsty);              my ($curroption,$currlimit);
             my $envkey = $context.'.'.$item;              my $envkey = $context.'.'.$item;
             if ($context eq 'requestauthor') {              if ($context eq 'requestauthor') {
                 $envkey = $context;                  $envkey = $context;
             }              }
             if ($userenv{$envkey} ne '') {              if ($userenv{$envkey} ne '') {
                 $curroption = $userenv{$envkey};                  $curroption = $userenv{$envkey};
                 $customsty = ' style="display:block"';  
             } else {              } else {
                 $customsty = ' style="display:none"';  
                 my (@inststatuses);                  my (@inststatuses);
                 if ($context eq 'requestcourses') {                  if ($context eq 'requestcourses') {
                     $curroption =                      $curroption =

Removed from v.1.474  
changed lines
  Added in v.1.476


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