示例#1
0
文件: Submit.php 项目: dalu/widget
 public function init()
 {
     $this->content = HTML::openTag('button', ['type' => 'submit', 'name' => $this->owner . '_submit']);
     $this->content .= $this->label;
     $this->content .= HTML::closeTag('button');
     return $this;
 }
示例#2
0
文件: Password.php 项目: dalu/widget
 public function init()
 {
     $this->content = HTML::openTag('input', ['type' => 'password', 'name' => $this->owner . '_password[]', 'placeholder' => 'Password']);
     if ($this->repeat) {
         $this->content .= HTML::openTag('input', ['type' => 'password', 'name' => $this->owner . '_password[]', 'placeholder' => 'Repeat Password']);
     }
     return $this;
 }
示例#3
0
 public function __construct($action, $method, $enctype = 'application/x-www-form-urlencoded')
 {
     $this->header = HTML::openTag('form', ['action' => $action, 'method' => $method, 'enctype' => $enctype]);
     $this->footer = HTML::closeTag('form');
     $this->form = new Form('signup');
     $this->form->add(new Text('username'));
     $this->form->add(new Password());
     $this->form->add(new Submit('Sign Up'));
 }
示例#4
0
文件: Text.php 项目: dalu/widget
 public function init()
 {
     $this->content = HTML::openTag('input', ['type' => 'text', 'name' => $this->owner . '_' . $this->text, 'placeholder' => ucfirst($this->text)]);
     return $this;
 }
示例#5
0
文件: Search.php 项目: dalu/widget
 public function init()
 {
     $this->content = HTML::openTag('input', ['type' => 'text', 'name' => $this->owner . '_searchterm', 'placeholder' => 'Search']);
     return $this;
 }
示例#6
0
文件: File.php 项目: dalu/widget
 public function init()
 {
     $this->content = HTML::openTag('input', ['type' => 'file', 'name' => $this->owner . '_file[]']);
     return $this;
 }