当前位置: 首页>>代码示例>>PHP>>正文


PHP Form::close方法代码示例

本文整理汇总了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);
 }
开发者ID:ihatehandles,项目名称:AbuseIO,代码行数:30,代码来源:AccountsController.php

示例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();
    }
开发者ID:anqh,项目名称:anqh,代码行数:37,代码来源:edit.php

示例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();
    }
开发者ID:anqh,项目名称:core,代码行数:38,代码来源:upload.php

示例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('&#xf1f8; ' . trans('admin.ops.delete'), ['onclick' => "return confirm('" . trans('admin.ops.confirmation') . "');", 'class' => $delete_class]);
     $ops .= Form::close();
     $ops .= '</li>';
     $ops .= '</ul>';
     return $ops;
 }
开发者ID:binhbeer,项目名称:laravel-5-simple-cms,代码行数:37,代码来源:AdminHelper.php

示例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);
 }
开发者ID:prodixx,项目名称:cataloghotelier,代码行数:7,代码来源:HoteluriController.php

示例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();
}
开发者ID:vi-kon,项目名称:laravel-smarty-view,代码行数:17,代码来源:block.form.php

示例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();
}
开发者ID:CCRRAABB,项目名称:laravel_try1,代码行数:7,代码来源:functions.php

示例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;
 }
开发者ID:Ravend6,项目名称:laravel_learn,代码行数:7,代码来源:functions.php

示例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;
}
开发者ID:grozwalker,项目名称:rutorika-laravel-html,代码行数:7,代码来源:helpers.php

示例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;
 }
开发者ID:sorora,项目名称:empower,代码行数:12,代码来源:Empower.php

示例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;
}
开发者ID:namoosshah,项目名称:basketball,代码行数:13,代码来源:helpers.php

示例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();
    }
开发者ID:anqh,项目名称:blog,代码行数:37,代码来源:edit.php

示例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;
}
开发者ID:majid-n,项目名称:laravel,代码行数:7,代码来源:help.php

示例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;
 }
开发者ID:bluetechy,项目名称:kohana-payment,代码行数:28,代码来源:dotpay.php

示例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();
    }
开发者ID:anqh,项目名称:core,代码行数:36,代码来源:tag.php


注:本文中的Form::close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。