本文整理汇总了PHP中Bootstrap::textfield方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::textfield方法的具体用法?PHP Bootstrap::textfield怎么用?PHP Bootstrap::textfield使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bootstrap
的用法示例。
在下文中一共展示了Bootstrap::textfield方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
public function indexAction()
{
$content = Bootstrap::row();
$panel = Bootstrap::panel('My profile');
$form = BootstrapUI::form()->horizontal(3)->add(Bootstrap::textfield('username', $this->getUser('username'), 'username')->required())->add(Bootstrap::textfield('first_name', $this->getUser('first_name'), 'first name'))->add(Bootstrap::textfield('last_name', $this->getUser('last_name'), 'last name'))->add(Bootstrap::textfield('password', null, 'password')->type('password'))->add(Bootstrap::textfield('password2', null, 'password again')->type('password'))->add(BootstrapUI::select2('timezone', 'time zone', Timezone::$timezones, $this->getUser('timezone')))->addSubmit('Update');
$panel->content($form);
$content->add(6, $panel, 3);
return View::create('base')->with('title', 'My profile')->with('content', $content);
}
示例2: getLoginForm
public static function getLoginForm()
{
$container = Bootstrap::container();
$panel = Bootstrap::panel('Login into ' . Request::hostName())->color('blue');
$r = Url::controller() == 'index' && Url::action() == 'index' ? '/dashboard/first' : Request::uri();
$form = BootstrapUI::form(Url::href(''))->add(Bootstrap::hiddenfield('r', base64_encode($r)))->add(Bootstrap::textfield('username', Cookie::get('username'))->placeholder('username')->required())->add(Bootstrap::textfield('pass')->type('password')->placeholder('password')->required())->addSubmit('Login');
$panel->content($form);
$container->add(Bootstrap::row()->add(4, $panel, 4))->setAttribute('style', 'margin-top: 20px');
return $container;
}
示例3: packageAction
public function packageAction()
{
$content = array();
$panel = Bootstrap::panel('Filter')->collapsible(true);
$form = BootstrapUI::form()->horizontal()->add(Bootstrap::textfield('name', null, 'name'))->addSubmit('Filter');
$panel->content($form);
$content[] = Bootstrap::row()->add(12, $panel);
return View::create('base')->with('title', 'Package reports')->with('content', $content);
}
示例4: getUserForm
/**
* Get the user form for add/update
* @param array $values
*/
private function getUserForm(array $values = null)
{
if ($values === null) {
$values = array('id' => 0, 'username' => null, 'first_name' => null, 'last_name' => null, 'password' => null, 'password2' => null, 'account_type' => 'normal', 'timezone' => 'Europe/London');
}
$form = BootstrapUI::form()->horizontal(3)->add(Bootstrap::hiddenfield('id', $values['id']))->add(Bootstrap::textfield('username', $values['username'], 'username'))->add(Bootstrap::textfield('first_name', $values['first_name'], 'first name'))->add(Bootstrap::textfield('last_name', $values['last_name'], 'last name'))->add(Bootstrap::textfield('pass', null, 'password')->type('password'))->add(Bootstrap::textfield('pass2', null, 'password again')->type('password'))->add(Bootstrap::radio('account_type', array('admin' => 'administrator', 'normal' => 'normal user'), 'account type', $values['account_type']))->add(BootstrapUI::select2('timezone', 'timezone', Timezone::$timezones, $values['timezone']))->addSubmit('Submit')->addButton(Bootstrap::anchor('Cancel', Url::href('system', 'users'))->asButton()->color('red'));
return $form;
}