コード例 #1
0
ファイル: UITable.php プロジェクト: rjwalsh88/BawkApp
 /**
  * $cells : cells of this table row
  * $name : name of the form (arbitrary at this point)
  * $buttonText : text of the confirm button
  * $buttonIconName : icon name of the confirm button, defaults to the buttonText
  * $method : form method, default GET
  * $action : form action, default current page
  */
 public function __construct($cells, $name, $buttonText, $buttonIconName = null, $method = 'GET', $action = null, $confirmmessage = null)
 {
     parent::__construct($cells);
     if ($action == null) {
         $action = Server::currentPageName();
     }
     $this->method = $method;
     $this->action = $action;
     $this->name = $name . self::nextID();
     if ($confirmmessage) {
         $js = "doConfirm('" . addslashes(htmlspecialchars($confirmmessage)) . "', document." . $this->name . ");";
     } else {
         $js = $this->name . ".submit();";
     }
     if (!$buttonIconName) {
         $buttonIconName = $buttonText;
     }
     $submitButton = UIButton::javascriptButton($buttonText, $js, $buttonIconName);
     $this->addButton($submitButton);
     require_js('validate');
     require_css('form');
 }
コード例 #2
0
ファイル: UIButton.php プロジェクト: rjwalsh88/BawkApp
 public function icon()
 {
     return $this->form . parent::icon();
 }