Пример #1
0
 /**
  * constructor
  *
  * @param string $elementName (optional) name of the checkbox
  * @param string $value (optional) value for the button
  * @param mixed $attributes (optional) Either a typical HTML attribute string
  *              or an associative array
  */
 public function __construct($elementName = null, $value = null, $attributes = null)
 {
     if ($elementName == null) {
         $elementName = 'cancel';
     }
     if ($value == null) {
         $value = get_string('cancel');
     }
     parent::__construct($elementName, $value, $attributes);
     $this->updateAttributes(array('onclick' => 'skipClientValidation = true; return true;'));
     // Add the class btn-cancel.
     $class = $this->getAttribute('class');
     if (empty($class)) {
         $class = '';
     }
     $this->updateAttributes(array('class' => $class . ' btn-cancel'));
 }
Пример #2
0
 /**
  * constructor
  *
  * @param string $elementName (optional) name of the field
  * @param string $value (optional) field label
  * @param string $attributes (optional) Either a typical HTML attribute string or an associative array
  */
 public function __construct($elementName = null, $value = null, $attributes = null)
 {
     parent::__construct($elementName, $value, $attributes);
 }
Пример #3
0
 /**
  * constructor
  *
  * @param string $elementName (optional) name of the field
  * @param string $value (optional) field label
  * @param string $attributes (optional) Either a typical HTML attribute string or an associative array
  */
 public function __construct($elementName = null, $value = null, $attributes = null)
 {
     debugging('Element type submitlink is deprecated.', DEBUG_DEVELOPER);
     parent::__construct($elementName, $value, $attributes);
 }