示例#1
0
 /**
  * Render the field with the correct attributes
  * @param array $properties
  * @return  FormAction
  */
 public function Field($properties = array())
 {
     if ($this->isGrouped()) {
         $this->transformToInput();
     } else {
         $this->transformToButton();
     }
     return parent::Field($properties);
 }
示例#2
0
 /**
  * FieldList::forTemplate() for an action list returns a concatenation of Field values.
  * Internally, this works by having FormAction::FieldHolder return just the field, but it's an important
  * use-case to test.
  */
 public function testForTemplateForActionList()
 {
     $set = new FieldList($a = new FormAction('A'), $b = new FormAction('B'));
     $this->assertEquals($a->Field() . $b->Field(), $set->forTemplate());
 }
 /**
  * @param array $properties
  * @return Field
  */
 public function Field($properties = array())
 {
     Requirements::customScript("jQuery('#" . $this->ID() . "').click(function() { jQuery(this).parents('form').parsley().destroy();})");
     return parent::Field($properties);
 }
 /**
  * @desc Overload the Field attribute to include noscript tags
  * Allows the input tags to only be shown if javascript is disabled.
  */
 function Field()
 {
     return "<noscript>" . parent::Field() . "</noscript>";
 }
 public function Field($properties = array())
 {
     return parent::Field($properties);
 }
 public function Field($properties = array())
 {
     $this->setAttribute('onclick', "javascript:(function(that){setTimeout(function(){if(that.form.checkValidity()){that.disabled=true;that.innerHTML='" . $this->sendingMessage . "';}},0);})(this);");
     return parent::Field($properties);
 }