Example #1
0
 /**
  * Returns a button that can be clicked to start the progress bar.
  *
  * @param mixed $arg_array \MUtil_Ra::args() arguments to populate link with
  * @return \MUtil_Html_HtmlElement
  */
 public function getStartButton($args_array = 'Start')
 {
     $args = \MUtil_Ra::args(func_get_args());
     $args['onclick'] = 'if (! this.disabled) {' . $this->getFunctionPrefix() . 'Start();} this.disabled = true; event.cancelBubble=true;';
     $button = new \MUtil_Html_HtmlElement('button', $args);
     $button->appendAttrib('class', $this->_buttonClass . ' btn-succes');
     return $button;
 }
Example #2
0
 /**
  * Applies the $this=>attributes and $this->class snippet parameters to the
  * $html element.
  *
  * @param \MUtil_Html_HtmlElement $html Element to apply the snippet parameters to.
  */
 protected function applyHtmlAttributes(\MUtil_Html_HtmlElement $html)
 {
     if ($this->attributes) {
         foreach ($this->attributes as $name => $value) {
             if (!is_numeric($name)) {
                 $html->appendAttrib($name, $value);
             }
         }
     }
     if ($this->class) {
         $html->appendAttrib('class', $this->class);
     }
 }