You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
773 B

  1. <?php
  2. /**
  3. * Class helper_plugin_bureaucracy_fieldpassword
  4. *
  5. * Creates a single line password input field
  6. */
  7. class helper_plugin_bureaucracy_fieldpassword extends helper_plugin_bureaucracy_field {
  8. /**
  9. * Arguments:
  10. * - cmd
  11. * - label
  12. * - ^ (optional)
  13. *
  14. * @param array $args The tokenized definition, only split at spaces
  15. */
  16. function initialize($args) {
  17. parent::initialize($args);
  18. $attr = array();
  19. if(!isset($this->opt['optional'])) {
  20. $attr['required'] = 'required';
  21. }
  22. $this->tpl = form_makePasswordField('@@NAME@@', '@@DISPLAY@@', '@@ID@@', '@@CLASS@@', $attr);
  23. if(!isset($this->opt['optional'])){
  24. $this->tpl['class'] .= ' required';
  25. }
  26. }
  27. }