Source of file BootstrapModalFormAction.php
Size: 1,319 Bytes - Last Modified: 2022-02-21T10:01:11+00:00
/var/www/docs.ssmods.com/process/src/code/forms/BootstrapModalFormAction.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 | <?php /** * The action buttons are <input type="submit"> as well as <button> tags. * * Upon clicking the button below will redirect the user to doAction under the current controller. * * <code> * new FormAction ( * // doAction has to be a defined controller member * $action = "doAction", * $title = "Submit button" * ) * </code> * * @package forms * @subpackage actions */ class BootstrapModalFormAction extends FormAction { protected $target; /** * Enables the use of <button> instead of <input> * in {@link Field()} - for more customizeable styling. * * @var boolean $useButtonTag */ public $useButtonTag = false; protected $buttonContent = null; /** * Create a new action button. * * @param action The method to call when the button is clicked * @param title The label on the button * @param form The parent form, auto-set when the field is placed inside a form */ public function __construct($title = null) { $this->action = "action_modalToggle"; parent::__construct($this->action, $title, null, null); if($title != null) $this->setButtonContent($title); } public function setTarget($target) { $this->target = $target; return $this; } public function getTarget(){ return $this->target; } } |