本文整理汇总了PHP中Form::close方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::close方法的具体用法?PHP Form::close怎么用?PHP Form::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form::close方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: search
/**
* Process datatables ajax request.
*
* @return \Illuminate\Http\JsonResponse
*/
public function search()
{
$auth_account = $this->auth_user->account;
//return all accounts when we are in the system account
//in a normal account only show the current linked one
if ($auth_account->isSystemAccount()) {
$accounts = Account::all();
} else {
// retrieve the account as a collection
$accounts = Account::where('id', '=', $auth_account->id)->get();
}
return Datatables::of($accounts)->addColumn('actions', function ($account) {
$actions = \Form::open(['route' => ['admin.accounts.destroy', $account->id], 'method' => 'DELETE', 'class' => 'form-inline']);
$actions .= ' <a href="accounts/' . $account->id . '" class="btn btn-xs btn-primary"><span class="glyphicon glyphicon-eye-open"></span> ' . trans('misc.button.show') . '</a> ';
$actions .= ' <a href="accounts/' . $account->id . '/edit" class="btn btn-xs btn-primary"><span class="glyphicon glyphicon-edit"></span> ' . trans('misc.button.edit') . '</a> ';
if ($account->disabled) {
$actions .= ' <a href="accounts/' . $account->id . '/enable' . '" class="btn btn-xs btn-success"><span class="glyphicon glyphicon-ok-circle"></span> ' . trans('misc.button.enable') . '</a> ';
} else {
$actions .= ' <a href="accounts/' . $account->id . '/disable' . '" class="btn btn-xs btn-warning"><span class="glyphicon glyphicon-ban-circle"></span> ' . trans('misc.button.disable') . '</a> ';
}
$actions .= \Form::button('<i class="glyphicon glyphicon-remove"></i> ' . trans('misc.button.delete'), ['type' => 'submit', 'class' => 'btn btn-danger btn-xs']);
$actions .= \Form::close();
return $actions;
})->make(true);
}
示例2: 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();
}
示例3: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
if (self::$_request_type == Controller::REQUEST_AJAX) {
$cancel_attributes = array('class' => 'ajaxify');
} else {
$cancel_attributes = null;
}
echo Form::open($this->action, array('enctype' => 'multipart/form-data'));
?>
<fieldset>
<?php
echo Form::file('file');
?>
</fieldset>
<fieldset>
<?php
echo Form::csrf();
?>
<?php
echo Form::button('save', '<i class="icon-upload icon-white"></i> ' . __('Upload'), array('type' => 'submit', 'class' => 'btn btn-primary btn-small'));
?>
<?php
echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), $cancel_attributes) : '';
?>
</fieldset>
<?php
echo Form::close();
return ob_get_clean();
}
示例4: get_ops
/**
* Returns resource operations for the datatables or nested sets
*
* @param $resource
* @param $id
* @param $class
* @return string
*/
function get_ops($resource, $id, $class = "btn")
{
if ($class == "btn") {
$show_class = "btn btn-xs bg-navy";
$edit_class = "btn btn-xs bg-olive";
$delete_class = "btn btn-xs btn-danger destroy";
} else {
$show_class = "inline-show";
$edit_class = "inline-edit";
$delete_class = "inline-delete";
}
$show_path = route('admin.' . $resource . '.show', ['id' => $id]);
$edit_path = route('admin.' . $resource . '.edit', ['id' => $id]);
$delete_path = route('admin.' . $resource . '.destroy', ['id' => $id]);
$ops = '<ul class="list-inline no-margin-bottom">';
$ops .= '<li>';
$ops .= '<a class="' . $show_class . '" href="' . $show_path . '"><i class="fa fa-search"></i> ' . trans('admin.ops.show') . '</a>';
$ops .= '</li>';
$ops .= '<li>';
$ops .= '<a class="' . $edit_class . '" href="' . $edit_path . '"><i class="fa fa-pencil-square-o"></i> ' . trans('admin.ops.edit') . '</a>';
$ops .= '</li>';
$ops .= '<li>';
$ops .= Form::open(['method' => 'DELETE', 'url' => $delete_path]);
$ops .= Form::submit(' ' . trans('admin.ops.delete'), ['onclick' => "return confirm('" . trans('admin.ops.confirmation') . "');", 'class' => $delete_class]);
$ops .= Form::close();
$ops .= '</li>';
$ops .= '</ul>';
return $ops;
}
示例5: anyData
public function anyData()
{
$hotel = Hoteluri::with('HoteluriOferte');
return Datatables::of($hotel)->addColumn('action', function ($hotel) {
return '<a href="' . url('auth/hoteluri', [$hotel->id, 'edit']) . '"><button type="submit" class="btn btn-primary btn-xs">Modifica</button></a> ' . \Form::open(['method' => 'DELETE', 'url' => ['auth/hoteluri', $hotel->id], "style" => "display:inline"]) . '<button type="submit" class="btn btn-danger btn-xs" onclick="if(confirm(\'Sigur doriti sa stergeti?\')) return true; else return false; ">Sterge</button>' . \Form::close();
})->make(true);
}
示例6: smarty_block_form
/**
* @param array $params
* @param string $content
* @param Smarty_Internal_Template $smarty
* @param boolean $repeat
*
* @return string
*
* @author Kovács Vince
*/
function smarty_block_form($params, $content, Smarty_Internal_Template &$smarty, &$repeat)
{
if (is_null($content)) {
return '';
}
return Form::open($params) . $content . Form::close();
}
示例7: delete_form
function delete_form($routeParams, $label = 'Delete')
{
$form = Form::open(['method' => 'DELETE', 'action' => $routeParams]);
//dd($form);
$form .= Form::submit($label, ['class' => 'btn btn-danger']);
return $form .= Form::close();
}
示例8: delete_to_route
function delete_to_route($routeName, $id)
{
$form = Form::open(['route' => [$routeName, $id], 'method' => 'delete']);
$form .= Form::submit(Message::DELETE_BUTTON, ['class' => 'btn btn-danger', 'onclick' => 'return confirm("' . Message::DELETE_CONFIRM . '");']);
$form .= Form::close();
return $form;
}
示例9: delete_form
function delete_form($url, $label = '<i class="fa fa-close"></i>')
{
$form = Form::open(['method' => 'DELETE', 'url' => $url, 'class' => 'destroy-form']);
$form .= '<button type="submit" class="btn btn-link">' . $label . '</button>';
$form .= Form::close();
return $form;
}
示例10: buttonDestroy
/**
* Button generator for buttons used for @destroy actions
*
* @return string
*/
public function buttonDestroy($route, $extra)
{
$button = $this->open('destroy', $route, $extra);
$button .= \Form::submit('Delete');
$button .= \Form::close();
return $button;
}
示例11: deleteForm
/**
* Delete form
* @param $params
* @param string $label
* @return string
*/
function deleteForm($params, $label = 'Delete')
{
$html = Form::open(['method' => 'DELETE', 'route' => $params, 'class' => 'delete-form']);
$html .= Form::submit($label, ['class' => 'btn btn-danger btn-delete']);
$html .= Form::close();
return $html;
}
示例12: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo Form::open();
?>
<fieldset>
<?php
echo Form::control_group(Form::input('name', $this->blog_entry->name, array('class' => 'input-xxlarge')), array('name' => __('Title')), Arr::get($this->errors, 'name'));
?>
<?php
echo Form::control_group(Form::textarea_editor('content', $this->blog_entry->content, array('class' => 'input-xxlarge'), true), array('content' => __('Content')), Arr::get($this->errors, 'content'));
?>
</fieldset>
<fieldset class="form-actions">
<?php
echo Form::csrf();
?>
<?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')) : '';
?>
</fieldset>
<?php
echo Form::close();
return ob_get_clean();
}
示例13: delete_form
function delete_form($request, $routeParams, $id, $modal, $url, $label = "Delete", $class = "btn btn-danger")
{
$form = Form::model($request, ['method' => 'DELETE', 'id' => 'formDelete', 'action' => [$routeParams, $id]]);
$form .= Form::button('<i class="fa fa-trash fa-lg"></i> بلی', ['type' => 'submit', 'data-target' => "#{$modal}", 'data-url' => "{$url}", 'class' => "{$class} delete ", 'id' => 'btnDelete', 'data-id' => $id]);
$form .= Form::close();
return $form;
}
示例14: process
public function process($only_fields = FALSE)
{
$this->_fields_required['id'] = $this->_pos_data['id'];
if (empty($this->_fields['URL'])) {
$this->_fields['URL'] = url::site($this->action_return());
}
foreach ($this->_fields_required as $field) {
if (empty($field)) {
return FALSE;
}
}
$fields = array_merge($this->_fields_required, $this->_fields);
$form = '';
if (!$only_fields) {
$form .= Form::open(self::PAYMENT_URL, array('method' => 'post', 'name' => 'dotpay'));
}
foreach ($fields as $key => $value) {
if (!empty($value)) {
$form .= Form::hidden($key, $value);
}
}
if (!$only_fields) {
$form .= Form::button('platnosci', __("Przejdź do Dotpay.pl"), array('type' => 'submit'));
$form .= Form::close();
$form .= '<script type="text/javascript">document.dotpay.submit();</script>';
}
return $form;
}
示例15: content
/**
* Render view.
*
* @return string
*/
public function content()
{
ob_start();
echo Form::open();
?>
<fieldset>
<?php
echo Form::control_group(Form::input('name', $this->tag->name, array('class' => 'input-xxlarge', 'maxlength' => 32)), array('name' => __('Name')), Arr::get($this->errors, 'name'));
?>
<?php
echo Form::control_group(Form::input('description', $this->tag->description, array('class' => 'input-xxlarge')), array('description' => __('Short description')), Arr::get($this->errors, 'description'));
?>
</fieldset>
<fieldset class="form-actions">
<?php
echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large'));
?>
<?php
echo HTML::anchor(Request::back(Route::url('tags'), true), __('Cancel'), array('class' => 'cancel'));
?>
</fieldset>
<?php
echo Form::close();
return ob_get_clean();
}