本文整理汇总了PHP中Form::input_wrap方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::input_wrap方法的具体用法?PHP Form::input_wrap怎么用?PHP Form::input_wrap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form::input_wrap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo Form::open();
?>
<fieldset>
<?php
echo Form::input_wrap('name', $this->blog_entry->name, array('class' => 'input-lg', 'placeholder' => __('Title')), null, Arr::get($this->errors, 'name'));
?>
<?php
echo Form::textarea_wrap('content', $this->blog_entry->content, array('class' => 'input-lg', 'placeholder' => __('Content')), true, null, Arr::get($this->errors, 'content'), null, true);
?>
</fieldset>
<fieldset>
<?php
echo Form::csrf();
?>
<?php
echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary btn-lg'));
?>
<?php
echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : '';
?>
</fieldset>
<?php
echo Form::close();
return ob_get_clean();
}
示例2: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo $this->message;
echo Form::open();
echo Form::input_wrap('email', $this->email, array('type' => 'email', 'required', 'class' => 'input-lg', 'placeholder' => __('Username or email')), __('Send a new password to'), null, __('We will send you a "new" password generated from the hash of your current, forgotten password.') . '<br><em>' . __('Please change your password after signing in!') . '</em>');
echo Form::button(null, '<i class="fa fa-envelope"></i> ' . __('Send'), array('class' => 'btn btn-primary'));
echo Form::close();
?>
<hr />
<blockquote cite="http://dilbert.com/strips/comic/1996-09-05/">
<dl class="dl-horizontal">
<dt>Asok:</dt> <dd>I have forgotten my password. I humbly beg for assistance.</dd>
<dt>Dogbert:</dt> <dd>I have no time for boring administrative tasks, you fool! I'm too busy upgrading the network.</dd>
<dt>Asok:</dt> <dd>You could have given me a new password in the time it took to belittle me.</dd>
<dt>Dogbert:</dt> <dd>Yeah, but which option would give me job satisfaction?</dd>
</dl>
<small class="pull-right"><a href="http://dilbert.com/strips/comic/1996-09-05/">Dilbert</a></small>
</blockquote>
<?php
return ob_get_clean();
}
示例3: form
/**
* Get form.
*
* @return string
*/
public static function form()
{
ob_start();
echo HTML::anchor(Route::url('oauth', array('action' => 'login', 'provider' => 'facebook')), ' <i class="fa fa-facebook"></i> ' . __('Connect with Facebook') . ' ', array('class' => 'btn btn-block btn-facebook', 'title' => __('Sign in with your Facebook account')));
echo '<hr>';
echo Form::open(Route::url('sign', array('action' => 'in')));
echo Form::input_wrap('username', null, array('autofocus'), __('Username or email'));
echo Form::password_wrap('password', null, null, __('Password') . ' ' . HTML::anchor(Route::url('sign', array('action' => 'password')), __('Forgot?'), array('class' => 'text-muted')));
echo Form::form_group(Form::checkbox_wrap('remember', 'true', true, null, __('Stay logged in')));
echo Form::button(null, __('Login'), array('class' => 'btn btn-block btn-primary', 'title' => __('Remember to sign out if on a public computer!')));
echo Form::close();
return ob_get_clean();
}
示例4: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo Form::open(null, array('autocomplete' => 'off'));
?>
<fieldset>
<legend><?php
echo __('Almost there!');
?>
</legend>
<?php
echo Form::input_wrap('username', $this->user->username, array('class' => 'input-lg', 'placeholder' => __('JohnDoe'), 'required'), __('Username'), Arr::get($this->errors, 'username'), __('Choose a unique username with at least <var>:length</var> characters. No special characters, thank you.', array(':length' => Kohana::$config->load('visitor.username.length_min'))));
?>
<?php
echo Form::password_wrap('password', null, array('class' => 'input-lg', 'required'), __('Password'), Arr::get($this->errors, 'password'), __('Try to use letters, numbers and special characters for a stronger password, with at least <var>8</var> characters.'));
?>
<?php
echo Form::input_wrap('email', $this->user->email, array('class' => 'input-lg', 'type' => 'email', 'disabled', 'placeholder' => __('john.doe@domain.tld')), __('Email'), Arr::get($this->errors, 'email'));
?>
</fieldset>
<fieldset>
<?php
echo Form::hidden('code', $this->code);
?>
<?php
echo Form::button('register', __('Sign up!'), array('type' => 'submit', 'class' => 'btn btn-primary btn-lg'));
?>
<?php
echo HTML::anchor(Request::back('/', true), __('Cancel'), array('class' => 'cancel'));
?>
</fieldset>
<?php
echo Form::close();
return ob_get_clean();
}
示例5: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo Form::open();
?>
<div class="row">
<fieldset class="col-sm-6">
<?php
echo Form::input_wrap('name', $this->name, null, __('Name'), Arr::get($this->errors, 'name'));
?>
<?php
echo Form::input_wrap('email', $this->email, array('type' => 'email'), __('Email'), Arr::get($this->errors, 'email'));
?>
<?php
echo Form::input_wrap('subject', $this->subject, null, __('Subject'), Arr::get($this->errors, 'subject'));
?>
<?php
echo Form::textarea_wrap('content', $this->content, null, true, __('Content'), Arr::get($this->errors, 'content'));
?>
</fieldset>
</div>
<fieldset>
<?php
echo Form::csrf();
?>
<?php
echo Form::button('save', __('Send'), array('type' => 'submit', 'class' => 'btn btn-primary btn-lg'));
?>
</fieldset>
<?php
echo Form::close();
return ob_get_clean();
}
示例6: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo Form::open();
?>
<fieldset>
<?php
echo Form::input_wrap('name', $this->group->name, null, __('Name'), Arr::get($this->errors, 'name'));
?>
<?php
echo Form::input_wrap('description', $this->group->description, null, __('Description'), Arr::get($this->errors, 'description'));
?>
<?php
echo Form::input_wrap('sort', $this->group->sort, null, __('Sort'), Arr::get($this->errors, 'sort'));
?>
</fieldset>
<fieldset>
<?php
echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large'));
?>
<?php
echo HTML::anchor(Request::back(Route::url('forum'), true), __('Cancel'), array('class' => 'cancel'));
?>
<?php
echo Form::csrf();
?>
</fieldset>
<?php
echo Form::close();
return ob_get_clean();
}
示例7: array
echo Form::open();
?>
<fieldset class="horizontal">
<ul>
<?php
if (isset($private) && $private) {
?>
<?php
echo Form::checkbox_wrap('private', '1', $values, array('onchange' => "\$('input[name=comment]').toggleClass('private', this.checked)\""), '<abbr class="private" title="' . __('Private comment') . '">' . __('Priv') . '</abbr>');
?>
<?php
}
?>
<?php
echo Form::input_wrap('comment', $values, array('maxlength' => 300), null, $errors);
?>
<li><?php
echo Form::submit(false, __('Comment'));
?>
</li>
</ul>
<?php
echo Form::csrf();
?>
</fieldset>
<?php
echo Form::close();
$new_comments = isset($new_comments) ? (int) $new_comments : 0;
foreach ($comments as $comment) {
示例8: implode
<?php
echo implode("\n", array_reverse($ordered));
?>
</ul>
<?php
if ($can_shout) {
?>
<?php
echo Form::open(Route::get('shouts')->uri(array('action' => 'shout')));
?>
<fieldset class="horizontal">
<ul>
<?php
echo Form::input_wrap('shout', '', array('maxlength' => 300, 'title' => __('Shout')), '', $errors);
?>
<li><?php
echo Form::submit(false, __('Shout'));
?>
</li>
</ul>
<?php
echo Form::csrf();
?>
</fieldset>
<?php
echo Form::close();
?>
<?php
示例9: date
/**
* Date select form.
*
* @return string
*/
public function date()
{
ob_start();
// Date picker options
$options = array('changeMonth' => true, 'changeYear' => true, 'dateFormat' => 'd.m.yy', 'dayNames' => array(__('Sunday'), __('Monday'), __('Tuesday'), __('Wednesday'), __('Thursday'), __('Friday'), __('Saturday')), 'dayNamesMin' => array(__('Su'), __('Mo'), __('Tu'), __('We'), __('Th'), __('Fr'), __('Sa')), 'firstDay' => 1, 'monthNames' => array(__('January'), __('February'), __('March'), __('April'), __('May'), __('June'), __('July'), __('August'), __('September'), __('October'), __('November'), __('December')), 'monthNamesShort' => array(__('Jan'), __('Feb'), __('Mar'), __('Apr'), __('May'), __('Jun'), __('Jul'), __('Aug'), __('Sep'), __('Oct'), __('Nov'), __('Dec')), 'nextText' => __('»'), 'prevText' => __('«'), 'showWeek' => true, 'showOtherMonths' => true, 'weekHeader' => __('Wk'));
// Form
echo Form::open(null, array('id' => 'form-flyer-edit', 'class' => 'form-inline'));
echo Form::input_wrap('name', $this->flyer->name, array('id' => 'field-unknown-event', 'class' => 'input-xxlarge', 'title' => __('Clean event name'), 'placeholder' => __('Clean event name')), __('Event')) . ' ';
echo Form::input_wrap('stamp_begin[date]', is_numeric($this->flyer->stamp_begin) ? Date::format('DMYYYY', $this->flyer->stamp_begin) : $this->flyer->stamp_begin, array('id' => 'field-date', 'class' => 'input-small date', 'maxlength' => 10), __('Date')) . ' ';
echo Form::select_wrap('stamp_begin[time]', array_reverse(Date::hours_minutes(30, true), true), is_numeric($this->flyer->stamp_begin) ? Date::format('HHMM', $this->flyer->stamp_begin) : (empty($this->flyer->stamp_begin) ? '22:00' : $this->flyer->stamp_begin), array('id' => 'field-time', 'class' => 'input-small time'), __('At')) . ' ';
echo Form::submit('save', __('Save'), array('class' => 'btn btn-default'));
echo Form::csrf();
echo Form::close();
?>
<script>
head.ready('jquery-ui', function() {
$('#field-date').datepicker(<?php
echo json_encode($options);
?>
);
});
</script>
<?php
return ob_get_clean();
}
示例10: defined
defined('SYSPATH') or die('No direct access allowed.');
/**
* Edit gallery
*
* @package Galleries
* @author Antti Qvickström
* @copyright (c) 2011 Antti Qvickström
* @license http://www.opensource.org/licenses/mit-license.php MIT license
*/
echo Form::open(null, array('onsubmit' => 'return false'));
?>
<fieldset>
<ul>
<?php
echo Form::input_wrap('name', $event, null, __('Event name'), $errors, __('Enter at least 3 characters'));
?>
</ul>
</fieldset>
<?php
echo Form::close();
// Name autocomplete
echo HTML::script_source('
head.ready("anqh", function() {
$("#field-name").autocompleteEvent({
"action": function(event, ui) {
window.location = "' . URL::site(Route::get('galleries')->uri(array('action' => 'upload'))) . '?from=" + ui.item.id;
},
});
return;
示例11: __
?>
<fieldset>
<legend><?php
echo __('Almost there!');
?>
</legend>
<ul>
<?php
echo Form::input_wrap('username', $user, array('placeholder' => __('JohnDoe')), __('Username'), $errors, __('Choose a unique username with at least <var>:length</var> characters. No special characters, thank you.', array(':length' => Kohana::$config->load('visitor.username.length_min'))));
?>
<?php
echo Form::password_wrap('password', null, null, __('Password'), $errors);
?>
<?php
echo Form::password_wrap('password_confirm', null, null, __('Confirm'), $errors, __('Try to use letters, numbers and special characters for a stronger password, with at least <var>8</var> characters.'));
?>
<?php
echo Form::input_wrap('email', $user, array('disabled' => 'disabled', 'placeholder' => __('john.doe@domain.tld')), __('Email'), $errors, __('Please remember: sign up is available only with a valid, invited email.'));
?>
</ul>
</fieldset>
<fieldset>
<?php
echo Form::submit_wrap('register', __('Sign up!'), null, Request::back('/', true), null, array('code' => $code));
?>
</fieldset>
<?php
echo Form::close();
示例12: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
$facebook = $this->consumer ? $this->load_facebook() : false;
$tabs = array('basic' => '<i class="hidden-sm fa fa-fw fa-user"></i> ' . __('Profile'), 'auth' => '<i class="hidden-sm fa fa-fw fa-key"></i> ' . __('Username & Email'), 'facebook' => '<i class="hidden-sm fa fa-fw fa-facebook"></i> ' . 'Facebook', 'forum' => '<i class="hidden-sm fa fa-fw fa-comments"></i> ' . __('Forum'));
echo Form::open();
?>
<?php
if ($this->errors) {
?>
<div class="alert alert-danger">
<strong><?php
echo __('Error happens!');
?>
</strong>
<ul>
<?php
foreach ((array) $this->errors as $error) {
?>
<li><?php
echo $error;
?>
</li>
<?php
}
?>
</ul>
</div>
<?php
}
?>
<ul class="nav nav-pills nav-stacked col-sm-2">
<?php
foreach ($tabs as $tab => $title) {
?>
<li<?php
echo $tab == $this->tab ? ' class="active"' : '';
?>
>
<a href="#settings-<?php
echo $tab;
?>
" data-toggle="tab"><?php
echo $title;
?>
</a>
</li>
<?php
}
?>
</ul>
<div class="tab-content col-md-10">
<div id="settings-basic" class="tab-pane<?php
echo $this->tab == 'basic' ? ' active' : '';
?>
">
<fieldset id="fields-basic" class="col-sm-6">
<div class="row">
<div class="col-sm-10">
<?php
echo Form::input_wrap('avatar', $this->user->avatar_url, null, __('Avatar'), Arr::get($this->errors, 'avatar'));
?>
</div>
<div class="col-sm-2">
<?php
echo HTML::avatar($this->user->avatar_url, null, null, false);
?>
</div>
</div>
<?php
echo Form::input_wrap('name', $this->user->name, null, __('Name'), Arr::get($this->errors, 'name'));
?>
<?php
echo Form::radios_wrap('name_visibility', array(Model_User::NAME_VISIBLE => __('Visible'), Model_User::NAME_HIDDEN => __('Hidden')), $this->user->setting('user.name'), null, null, null, null, true);
?>
<?php
echo Form::input_wrap('homepage', $this->user->homepage, null, __('Homepage'), Arr::get($this->errors, 'homepage'));
?>
<?php
echo Form::radios_wrap('gender', array('f' => '<i class="fa fa-female female"></i> ' . __('Female'), 'm' => '<i class="fa fa-male male"></i> ' . __('Male'), 'o' => __('Other')), $this->user->gender, null, __('Gender'), Arr::get($this->errors, 'gender'), null, true);
?>
<?php
echo Form::input_wrap('dob', $this->user->dob ? Date::format('DMYYYY', $this->user->dob) : null, array('class' => 'date', 'maxlength' => 10, 'size' => 7, 'placeholder' => 'd.m.yyyy'), __('Date of Birth'), Arr::get($this->errors, 'dob'));
?>
//.........这里部分代码省略.........
示例13: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
?>
<div class="image">
<figure>
<?php
if ($this->url) {
echo HTML::anchor($this->url, HTML::image($this->image->get_url(null, $this->gallery->dir)), array('title' => __('Next image'), 'class' => 'image'));
} else {
echo HTML::anchor(Route::model($this->gallery), HTML::image($this->image->get_url(null, $this->gallery->dir)), array('title' => __('Back to gallery'), 'class' => 'image'));
}
?>
<?php
if ($exif = $this->exif()) {
?>
<div class="exif">
<i class="fa fa-camera-retro toggle"></i>
<dl class="dl-horizontal">
<?php
foreach ($exif as $term => $definition) {
if (!is_null($definition)) {
?>
<dt><?php
echo $term;
?>
</dt><dd><?php
echo $definition;
?>
</dd>
<?php
}
}
?>
</dl>
</div>
<?php
}
?>
<?php
if ($this->can_note) {
?>
<?php
echo Form::open(Route::url('gallery_image', array('gallery_id' => Route::model_id($this->gallery), 'id' => $this->image->id, 'action' => 'note')), array('id' => 'form-note', 'class' => 'panel panel-default'));
?>
<fieldset class="panel-body">
<?php
echo Form::input_wrap('name');
?>
<?php
echo Form::submit('save', __('Save'), array('class' => 'btn btn-success'));
?>
<a class="cancel" href="#cancel"><?php
echo __('Cancel');
?>
</a>
<?php
echo Form::hidden('x');
?>
<?php
echo Form::hidden('y');
?>
<?php
echo Form::hidden('width');
?>
<?php
echo Form::hidden('height');
?>
<?php
echo Form::hidden('user_id');
?>
</fieldset>
<?php
echo Form::close();
?>
<?php
}
?>
</figure>
<?php
echo $this->notes();
//.........这里部分代码省略.........
示例14: content
/**
* Render content.
*
* @return string
*/
public function content()
{
ob_start();
echo Form::open(null, array('id' => 'form-music', 'class' => 'row'));
?>
<div class="col-md-8">
<fieldset>
<?php
echo Form::input_wrap('name', $this->track->name, array('class' => 'input-lg'), __('Name'), Arr::get($this->errors, 'name'));
?>
<?php
echo Form::input_wrap('url', $this->track->url, array('placeholder' => 'http://'), __('URL'), Arr::get($this->errors, 'url'));
?>
<?php
echo Form::textarea_wrap('description', $this->track->description, null, true, __('Description'), Arr::get($this->errors, 'description'));
?>
<?php
if ($this->track->type == Model_Music_Track::TYPE_MIX) {
echo Form::textarea_wrap('tracklist', $this->track->tracklist, null, true, __('Tracklist'), Arr::get($this->errors, 'tracklist'));
}
?>
</fieldset>
<fieldset class="form-actions">
<?php
echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large'));
?>
<?php
echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : '';
?>
<?php
echo Form::csrf();
?>
</fieldset>
</div>
<div class="col-md-4">
<fieldset>
<?php
echo Form::input_wrap('cover', $this->track->cover, array('placeholder' => 'http://'), __('Cover'), Arr::get($this->errors, 'cover'));
?>
<?php
echo Form::input_wrap('size_time', $this->track->size_time, array('maxlength' => $this->track->type == Model_Music_Track::TYPE_MIX ? 8 : 6, 'placeholder' => $this->track->type == Model_Music_Track::TYPE_MIX ? __('hh:mm:ss') : __('mm:ss')), __('Length'), Arr::get($this->event_errors, 'size_time'), null, 'min');
?>
</fieldset>
<fieldset id="fields-music">
<?php
echo Form::checkboxes_wrap('tag', $this->tags(), $this->track->tags(), array('class' => 'block-grid three-up'), __('Music'), $this->errors);
?>
</fieldset>
</div>
<?php
echo Form::close();
return ob_get_clean();
}
示例15: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo $this->message;
?>
<div class="row">
<div class="col-sm-6">
<?php
echo Form::open();
?>
<fieldset>
<legend><?php
echo __('Not yet invited?');
?>
</legend>
<?php
echo Form::input_wrap('email', $this->invitation->email, array('class' => 'input-lg', 'type' => 'email', 'placeholder' => 'john.doe@domain.tld', 'required'), __('Send an invitation to'), Arr::get($this->errors, 'email'), __('Please remember: Valid, invited email is required to join. You can invite yourself too!'));
?>
</fieldset>
<fieldset>
<?php
echo Form::button('invite', '<i class="fa fa-envelope"></i> ' . __('Send invitation'), array('type' => 'submit', 'class' => 'btn btn-primary btn-large'));
?>
<?php
echo HTML::anchor(Request::back('/', true), __('Cancel'), array('class' => 'cancel'));
?>
</fieldset>
<?php
echo Form::close();
?>
<br>
<?php
echo Form::open();
?>
<fieldset>
<legend><?php
echo __('Got my invitation!');
?>
</legend>
<?php
echo Form::input_wrap('code', null, array('class' => 'input-lg', 'placeholder' => __('M0573XC3LL3N751R'), 'maxlength' => 16, 'required'), __('Invitation code'), Arr::get($this->errors, 'code'), __('Your invitation code is included in the mail you received, 16 characters.'));
?>
</fieldset>
<fieldset>
<?php
echo Form::hidden('signup', true);
?>
<?php
echo Form::button('invited', __('Final step!') . ' <i class="fa fa-arrow-right"></i>', array('type' => 'submit', 'class' => 'btn btn-primary btn-large'));
?>
<?php
echo HTML::anchor(Request::back('/', true), __('Cancel'), array('class' => 'cancel'));
?>
</fieldset>
<?php
echo Form::close();
?>
</div>
<div class="col-md-1 hidden-xs text-center lead">
<?php
echo __('or');
?>
</div>
<div class="col-sm-5">
<?php
echo HTML::anchor(Route::url('oauth', array('action' => 'login', 'provider' => 'facebook')), ' <i class="fa fa-facebook"></i> ' . __('Connect with Facebook') . ' ', array('class' => 'btn btn-lg btn-facebook', 'title' => __('Sign in with your Facebook account')));
?>
</div>
</div>
<?php
return ob_get_clean();
//.........这里部分代码省略.........