Subversion Repositories wimsdev

Rev

Rev 16690 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !if $(module_title_$moduclass_lang)!=$empty
  2.   !set module_title=$(module_title_$moduclass_lang)
  3. !endif
  4. !read adm/class/class.lang names.phtml
  5.  
  6. !read adm/css.phtml
  7. !header1
  8.  
  9. !read adm/class/classname.phtml $wims_classname\
  10. $wims_institutionname
  11.  
  12. !read adm/title.phtml 1\
  13. $classname\
  14. $module_title
  15.  
  16. !set password_pattern=pattern="[a-zA-Z0-9]{4,16}"
  17. !if $wims_user=supervisor
  18.   !set wims_menu_items=!append line SE_config,1,module=adm/class/config to $wims_menu_items
  19. !endif
  20. !if $error!=$empty
  21.   <div class="wims_msg
  22.    !if success iswordof $error
  23.      success
  24.    !else
  25.      alert
  26.    !endif
  27.    ">
  28.     !read lang/msg.phtml.$moduclass_lang
  29.   </div>
  30.   !set wims_ref_class=wims_button
  31.   <p class="wimscenter">
  32.     !href module=home $wims_name_back2
  33.   </p>
  34.   !goto end
  35. !endif
  36.  
  37. !form reply
  38.  
  39. !if $class_type=4 or $class_type=2 or ($class_type=3 and $class_typename!=class) or  /0// isin $wims_class//
  40.   !! in a group or portal or program or level or test zone$
  41.   !! for groups and portal, the class password is used for teachers registration
  42.   !set name_classpasswd = $name_classpasswdt
  43.   !set name_classpasswd_hlp = $name_classpasswdt_hlp
  44. !endif
  45.  
  46. !if $cmd=new and $job=user and $wims_user!=supervisor
  47.   !readproc adm/class/userdef classes,$wims_class,$wims_user
  48.   !defread $userdef
  49.   !if $user_forcechpwd=yes
  50.     <div class="wims_msg alert">
  51.      !if $user_supervisable=yes
  52.        $name_desc_forcechpwd2
  53.      !else
  54.        $name_desc_forcechpwd
  55.      !endif
  56.     </div>
  57.   !endif
  58. !endif
  59.  
  60. <fieldset class="property_fields halfwidth blockcenter">
  61.   !if $wims_user=supervisor
  62.     !default job=user
  63.     !if $job=none
  64.       !set ch_$job=checked
  65.       <legend>$wims_name_Password</legend>
  66.       <div class="field box">
  67.         $name_passwdtype
  68.         <div>
  69.           <input type="radio" name="job" $ch_user value="user" id="job1">
  70.           <label for="job1">$name_userpasswd</label>
  71.           <div class="formHelp">$name_userpasswd_hlp</div>
  72.         </div>
  73.         <div>
  74.           <input type="radio" name="job" $ch_class value="class" id="job2">
  75.           <label for="job2">$name_classpasswd</label>
  76.           <div class="formHelp">$name_classpasswd_hlp</div>
  77.         </div>
  78.       </div>
  79.     !else
  80.       <legend>
  81.         $(name_$(job)passwd)
  82.         !if $job=part
  83.           <span class="tt">$part</span>
  84.         !endif
  85.       </legend>
  86.       <p class="formHelp">$(name_$(job)passwd_hlp)</p>
  87.       <input type="hidden" name="job" value="$job">
  88.     !endif
  89.   !else
  90.     !if $job=user or $job=none
  91.       <legend>$wims_name_Password</legend>
  92.     !endif
  93.     <input type="hidden" name="job" value="user">
  94.   !endif
  95.  
  96.   !if $job=user or $job=none
  97.     <div class="field box">
  98.       <label for="old">$name_actualpasswd</label>
  99.       <input type="password" size="16" name="old" id="old"
  100.       !if $job=user
  101.         required="required" $password_pattern
  102.       !endif
  103.       >
  104.       !if $job=none and $wims_user=supervisor
  105.         <div class="formHelp">$name_actualpasswd_hlp.</div>
  106.       !endif
  107.     </div>
  108.   !endif
  109.  
  110.   <div class="field box">
  111.     <label for="pw1">$name_newpasswd</label>
  112.     <input type="password" size="16" name="pw1" id="pw1"
  113.     !if $job=user
  114.       required="required" $password_pattern
  115.     !endif
  116.     >
  117.     <div class="formHelp">
  118.       $name_alphanumer
  119.       !if $job isitemof none,class and $wims_user=supervisor
  120.         <br>($name_emptypasswd).
  121.       !endif
  122.     </div>
  123.   </div>
  124.   <div class="field box">
  125.     <label for="pw2">$name_newpasswd2</label>
  126.     <input type="password" size="16" name="pw2" id="pw2"
  127.     !if $job=user
  128.       required="required" $password_pattern
  129.     !endif
  130.     >
  131.   </div>
  132.   <div class="wimscenter wimsform">
  133.     <input type="submit" value="$wims_name_tosave">
  134.     !set wims_ref_class=wims_button wims_secondary_button
  135.     !href module=home $wims_name_giveup
  136.   </div>
  137. </fieldset>
  138.  
  139. !if $job notwordof class
  140.   <p class="small wimscenter">
  141.     $name_jetable
  142.     !set wims_ref_class=wims_button_help
  143.     !href target=wims_mhelp cmd=help $wims_name_help
  144.   </p>
  145. !endif
  146.  
  147. !formend
  148.  
  149. :end
  150. !tail
  151.  
  152. !distribute item $ into job,pw1,pw2,old
  153.