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


PHP Form::hidden方法代码示例

本文整理汇总了PHP中Form::hidden方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::hidden方法的具体用法?PHP Form::hidden怎么用?PHP Form::hidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Form的用法示例。


在下文中一共展示了Form::hidden方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: displayForm

 public static function displayForm($value, &$settings, $model)
 {
     $settings = static::settings($settings);
     if (!is_array($value)) {
         $value = array();
     }
     // Search input or
     $searchInput = \Form::input($settings['mapping']['fieldName'] . '[search]', null, array('class' => 'input input-xxlarge search-input', 'placeholder' => \Lang::get('admin.common.map_search_placeholder')));
     $searchButton = \Form::button('mapsearch', \Lang::get('admin.verbs.search'), array('class' => 'btn btn-primary'));
     $searchInput = html_tag('div', array('class' => 'form form-inline search-form'), $searchInput . $searchButton);
     // Hidden inputs
     $latInput = \Form::hidden($settings['mapping']['fieldName'] . '[lat]', \Arr::get($value, 'lat'), array('class' => 'lat'));
     $lngInput = \Form::hidden($settings['mapping']['fieldName'] . '[lng]', \Arr::get($value, 'lng'), array('class' => 'lng'));
     $zoomInput = \Form::hidden($settings['mapping']['fieldName'] . '[zoom]', \Arr::get($value, 'zoom'), array('class' => 'zoom'));
     // Other elements
     $required = isset($settings['required']) ? $settings['required'] : false;
     $label_text = $settings['title'] . ($required ? ' *' : '');
     $label = \Form::label($label_text);
     $mapDiv = html_tag('div', array('class' => 'map', 'id' => \Inflector::friendly_title($settings['mapping']['fieldName'], '-', true) . '-bing-map'), ' ');
     // Check that we have an API key
     if (empty($settings['api_key'])) {
         $content = $label . '<div class="well"><p>' . \Lang::get('admin.bing.api_key_not_set') . '</p></div>';
     } else {
         $content = $label . $searchInput . $latInput . $lngInput . $zoomInput . $mapDiv;
     }
     $content = html_tag('div', array('class' => 'controls control-group field-type-bing-map', 'data-field-name' => $settings['mapping']['fieldName']), $content);
     return array('content' => $content, 'js_data' => $settings);
 }
开发者ID:soundintheory,项目名称:fuel-cmf,代码行数:28,代码来源:BingMap.php

示例2: do_private_post

function do_private_post($content, $results)
{
    global $config, $speak;
    $results = Mecha::O($results);
    $results = $config->is->post ? Get::postHeader($results->path, POST . DS . $config->page_type, '/', $config->page_type . ':') : false;
    if ($results === false) {
        return $speak->plugin_private_post->description;
    }
    $s = isset($results->fields->pass) ? $results->fields->pass : "";
    if (strpos($s, ':') !== false) {
        $s = explode(':', $s, 2);
        if (isset($s[1])) {
            $speak->plugin_private_post->hint = ltrim($s[1]);
        }
        // override password hint
        $s = $s[0];
    }
    $hash = md5($s . PRIVATE_POST_SALT);
    $html = Notify::read(false) . '<div class="overlay--' . File::B(__DIR__) . '"></div><form class="form--' . File::B(__DIR__) . '" action="' . $config->url . '/' . File::B(__DIR__) . '/do:access" method="post">' . NL;
    $html .= TAB . Form::hidden('token', Guardian::token()) . NL;
    $html .= TAB . Form::hidden('_', $hash) . NL;
    $html .= TAB . Form::hidden('kick', $config->url_current) . NL;
    $html .= TAB . '<p>' . $speak->plugin_private_post->hint . '</p>' . NL;
    $html .= TAB . '<p>' . Form::text('access', "", $speak->password . '&hellip;', array('autocomplete' => 'off')) . ' ' . Form::button($speak->submit, null, 'submit') . '</p>' . NL;
    $html .= '</form>' . O_END;
    if ($results && isset($results->fields->pass) && trim($results->fields->pass) !== "") {
        if (!Guardian::happy() && Session::get('is_allow_post_access') !== $hash) {
            return $html;
        }
    }
    return $content;
}
开发者ID:tovic,项目名称:private-post-plugin-for-mecha-cms,代码行数:32,代码来源:launch.php

示例3: process

 public function process($only_fields = FALSE)
 {
     if (empty($this->_fields_required['pos_id']) && empty($this->_fields_required['pos_auth_key'])) {
         $this->_set_active_pos();
     }
     foreach ($this->_fields_required as $field) {
         if (empty($field)) {
             return FALSE;
         }
     }
     $this->_fields['ts'] = time();
     $fields = array_merge($this->_fields_required, $this->_fields);
     $data = array('pos_id' => $fields['pos_id'], 'pay_type' => $fields['pay_type'], 'session_id' => $fields['session_id'], 'pos_auth_key' => $fields['pos_auth_key'], 'amount' => $fields['amount'], 'desc' => $fields['desc'], 'desc2' => $fields['desc2'], 'order_id' => $fields['order_id'], 'first_name' => $fields['first_name'], 'last_name' => $fields['last_name'], 'payback_login' => $fields['payback_login'], 'street' => $fields['street'], 'street_hn' => $fields['street_hn'], 'street_an' => $fields['street_an'], 'city' => $fields['city'], 'post_code' => $fields['post_code'], 'country' => $fields['country'], 'email' => $fields['email'], 'phone' => $fields['phone'], 'language' => $fields['language'], 'client_ip' => $fields['client_ip'], 'ts' => $fields['ts'], 'key' => $this->_pos_data['key']);
     $fields['sig'] = $this->_get_sig($data);
     unset($fields['key']);
     if (!$only_fields) {
         $form = Form::open(self::PAYMENT_URL . $this->_codepage . '/' . self::PAYMENT_NEW, array('method' => 'post', 'name' => 'platnoscipl'));
     }
     foreach ($fields as $key => $value) {
         if (!empty($value)) {
             $form .= Form::hidden($key, $value);
         }
     }
     if (!$only_fields) {
         $form .= Form::button('platnosci', __("Przejdź do Płatności.pl"), array('type' => 'submit'));
         $form .= Form::close();
         $form .= '<script type="text/javascript">document.platnoscipl.submit();</script>';
     }
     return $form;
 }
开发者ID:bluetechy,项目名称:kohana-payment,代码行数:30,代码来源:platnoscipl.php

示例4: testHidden

 /**
  * @covers Form::hidden
  */
 public function testHidden()
 {
     $hidden = $this->myForm->hidden('find out');
     $this->assertInstanceOf('Hidden', $hidden);
     $this->assertEquals('find out', $hidden->getName());
     $this->assertSame($this->myForm, $hidden->getForm());
 }
开发者ID:fruition-sciences,项目名称:phpfw,代码行数:10,代码来源:FormTest.php

示例5: createForm

 /**
  * Create simple HTML form using paypal documentation
  * @return string
  */
 public function createForm()
 {
     // Form to submit to PayPal
     // https://www.x.com/developers/paypal/documentation-tools/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables
     $form = '<form action="' . $this->paymentConnfigData['url'] . '" method="post" id="payment_form" target="_parent">';
     // Technical HTML Variables
     //		$form .= \Form::hidden('cmd', '_cart');
     $form .= \Form::hidden('cmd', '_xclick');
     $form .= \Form::hidden('notify_url', $this->paymentConnfigData['notify_url']);
     // HTML Variables for Payment Transactions
     $form .= \Form::hidden('invoice', $this->order->id);
     $form .= \Form::hidden('currency_code', 'AUD');
     // HTML Variables for Shopping Carts
     $form .= \Form::hidden('business', $this->paymentConnfigData['business']);
     //$form .= \Form::hidden('upload', '1');
     //		foreach ($this->order->products as $key => $product)
     //		{
     //			$form .= \Form::hidden('item_name_' . ($key+1), $product->product_name);
     //			//$form .= \Form::hidden('item_number_' . $key, $product->id);
     //			$form .= \Form::hidden('amount_' . ($key+1),    $product->price);
     //			$form .= \Form::hidden('quantity_' . ($key+1),  $product->qty);
     //
     //        }
     $form .= \Form::hidden('amount', $this->order->total_price + $this->order->shipping_price);
     //$form .= \Form::hidden('handling_cart', );
     $form .= \Form::hidden('first_name', $this->order->billing_first_name);
     $form .= \Form::hidden('last_name', $this->order->billing_last_name);
     // HTML Variables for Displaying PayPal Checkout Pages
     $form .= \Form::hidden('lc', 'AU');
     $form .= \Form::hidden('return', $this->paymentConnfigData['return']);
     $form .= \Form::hidden('rm', 2);
     $form .= '</form>';
     return $form;
 }
开发者ID:EdgeCommerce,项目名称:edgecommerce,代码行数:38,代码来源:paymentFormPaypal.php

示例6: 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

示例7: view

 public function view()
 {
     // Group's inputs.
     $name_group_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('name', $this->requested_aircraft->name, ['class' => 'form-control', 'type' => 'text']), 'label' => 'A/C Name'], false)];
     $general_group_1_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('basic_empty_weight', $this->requested_aircraft->basic_empty_weight, ['class' => 'form-control', 'type' => 'number']) . "kg", 'label' => 'Basic Empty Weight'], false), View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('cg_position', $this->requested_aircraft->cg_position, ['class' => 'form-control', 'type' => 'number']) . "aft of datum", 'label' => 'C of G Position'], false)];
     $description_group_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-12', 'input_coltype' => 'col-xs-12', 'input' => Form::textarea('description', $this->requested_aircraft->description, ['class' => 'form-control']), 'label' => 'Description', 'label_left' => true], false)];
     $weight_limits_group_1_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('max_ramp_weight', $this->requested_aircraft->max_ramp_weight, ['class' => 'form-control', 'type' => 'text']), 'label' => 'Max Ramp Weight'], false), View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('mctow', $this->requested_aircraft->mctow, ['class' => 'form-control', 'type' => 'text']), 'label' => 'MCTOW'], false)];
     $weight_limits_group_2_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('mlw', $this->requested_aircraft->mlw, ['class' => 'form-control', 'type' => 'text']), 'label' => 'MLW'], false), View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('mzfw', $this->requested_aircraft->mzfw, ['class' => 'form-control', 'type' => 'text']), 'label' => 'MZFW'], false)];
     $arms_table_template = View::forge('widgets/tablewithactions/template', ['duplicate_action' => false, 'cells' => [View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_name', '', ['class' => 'form-control'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_position', '', ['class' => 'form-control'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_value', '', ['class' => 'form-control']) . Form::hidden('_type', 'arm')], false)]]);
     $arms_table = View::forge('widgets/tablewithactions', ['template_row' => $arms_table_template, 'name' => '_arms', 'coltype' => 'col-xs-12 col-md-6', 'headings' => ['<th>Label</th>', '<th>Arm (aft of datum)</th>', '<th>Max Weight</th>'], 'rows' => $this->arms_table_rows], false);
     $cglimits_table_template = View::forge('widgets/tablewithactions/template', ['duplicate_action' => false, 'cells' => [View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_position', '', ['class' => 'form-control'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_value', '', ['class' => 'form-control']) . Form::hidden('_type', 'maxweight') . Form::hidden('_name', 'limit')], false)]]);
     $cglimits_table = View::forge('widgets/tablewithactions', ['template_row' => $cglimits_table_template, 'name' => '_arms', 'coltype' => 'col-xs-6', 'headings' => ['<th>Arm (aft of datum)</th>', '<th>Weight Limit</th>'], 'rows' => $this->cglimits_table_rows], false);
     $button_group_1_inputs = [Asset::js('tablewithactions.js', false), View::forge('form/button', ['coltype' => 'col-xs-offset-5 col-xs-2', 'link' => 'submit/aircraft/' . $this->id, 'response_target' => './aircraft_form', 'class' => 'form-control btn-success', 'label' => 'Save Changes'], false)];
     // Headings
     $general_heading = View::forge('form/heading', ['text' => 'General', 'size' => 4], false);
     $weight_limits_heading = View::forge('form/heading', ['text' => 'Weight Limits', 'size' => 4], false);
     $arms_heading = View::forge('form/heading', ['text' => 'Arms', 'size' => 4], false);
     $cg_limits_heading = View::forge('form/heading', ['text' => 'C of G Limits', 'size' => 4], false);
     // Groups
     $name_group = View::forge('form/group', ['inputs' => $name_group_inputs], false);
     $general_group_1 = View::forge('form/group', ['inputs' => $general_group_1_inputs], false);
     $description_group = View::forge('form/group', ['inputs' => $description_group_inputs], false);
     $weight_limits_group_1 = View::forge('form/group', ['inputs' => $weight_limits_group_1_inputs]);
     $weight_limits_group_2 = View::forge('form/group', ['inputs' => $weight_limits_group_2_inputs]);
     $buttons_group = View::forge('form/group', ['inputs' => $button_group_1_inputs], false);
     $cg_limits_group = View::forge('form/group', ['inputs' => ['<div class="col-xs-6">' . $cglimits_table . '</div>' . '<div class="col-xs-6">' . 'Graph here' . '</div>']], false);
     $weightandbalance_section_data = ['heading' => 'Weight and Balance Data', 'unique_id' => Str::random('uuid'), 'groups' => [$general_heading, $name_group, $general_group_1, $description_group, $weight_limits_heading, $weight_limits_group_1, $weight_limits_group_2, $arms_heading, $arms_table, $cg_limits_heading, $cg_limits_group, $buttons_group]];
     $weightandbalance_section = View::forge('form/section', $weightandbalance_section_data, false);
     $this->aircraft_form = $weightandbalance_section;
 }
开发者ID:stabernz,项目名称:wnb,代码行数:30,代码来源:aircraft.php

示例8: event

    /**
     * Event select form.
     *
     * @return  string
     */
    public function event()
    {
        ob_start();
        // Event search date range
        if ($this->flyer->stamp_begin) {
            $year = Arr::get(getdate($this->flyer->stamp_begin), 'year');
            $event_options = array('filter' => 'date:' . mktime(0, 0, 0, 1, 1, $year) . '-' . mktime(0, 0, 0, 1, 1, $year + 1));
        } else {
            $event_options = null;
        }
        // Form
        echo Form::open(null, array('id' => 'form-flyer-edit-event'));
        echo Form::input_wrap('event', null, array('id' => 'field-known-event', 'title' => __('Existing event'), 'placeholder' => __('Add to an existing event')));
        echo Form::submit('save', __('Save'), array('class' => 'btn btn-default'));
        echo Form::hidden('event_id', $this->flyer->event_id);
        echo Form::csrf();
        echo Form::close();
        ?>

<script>
head.ready('anqh', function() {
	$('#field-known-event').autocompleteEvent(<?php 
        echo json_encode($event_options);
        ?>
);
});
</script>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:36,代码来源:edit.php

示例9: formComponent

 /**
  * Form Component
  */
 public static function formComponent()
 {
     $_templates = Themes::getTemplates();
     foreach ($_templates as $template) {
         $templates[basename($template, '.template.php')] = basename($template, '.template.php');
     }
     echo '<div class="col-xs-3">' . Form::open() . Form::hidden('csrf', Security::token()) . Form::label('sandbox_form_template', __('Sandbox template', 'sandbox')) . Form::select('sandbox_form_template', $templates, Option::get('sandbox_template'), array('class' => 'form-control')) . Html::br() . Form::submit('sandbox_component_save', __('Save', 'sandbox'), array('class' => 'btn btn-default')) . Form::close() . '</div>';
 }
开发者ID:rowena-altastratus,项目名称:altastratus,代码行数:11,代码来源:sandbox.admin.php

示例10: setHiddenVars

 /**
  * @access private
  * @param array $array
  * @return array
  */
 protected function setHiddenVars(array $array)
 {
     $attributes = [];
     if (count($array)) {
         foreach ($array as $key => $value) {
             $attributes[] = \Form::hidden($key, $value);
         }
     }
     return implode("\n", $attributes);
 }
开发者ID:k-kurikuri,项目名称:Laravel.JpRecipe,代码行数:15,代码来源:BaseController.php

示例11: radio

 /**
  * Creates a radio form input.
  * @param string $name
  * @param null $value
  * @param bool $checked
  * @param array $attributes
  * @return string
  */
 public static function radio($name, $value = null, $checked = false, array $attributes = null)
 {
     if (isset($attributes['uncheck'])) {
         // Add a hidden field so that if the radio button is not selected, it still submits a value
         $hidden = Form::hidden($name, $attributes['uncheck']);
         unset($attributes['uncheck']);
     } else {
         $hidden = '';
     }
     return $hidden . parent::radio($name, $value, $checked, $attributes);
 }
开发者ID:eok8177,项目名称:shopCMS,代码行数:19,代码来源:Form.php

示例12: smarty_function_form_hidden

/**
 * @param array                    $params
 * @param Smarty_Internal_Template $smarty
 *
 * @throws SmartyException
 * @return string
 *
 * @author Kovács Vince
 */
function smarty_function_form_hidden($params, Smarty_Internal_Template &$smarty)
{
    if (!isset($params['_name'])) {
        throw new SmartyException('Missing _name attribute for form_hidden tag');
    }
    $name = $params['_name'];
    $value = isset($params['_value']) ? $params['_value'] : (isset($params['_populate']) && $params['_populate'] ? \Input::get($name) : null);
    unset($params['_name']);
    unset($params['_value']);
    return Form::hidden($name, $value, $params);
}
开发者ID:vi-kon,项目名称:laravel-smarty-view,代码行数:20,代码来源:function.form_hidden.php

示例13: input

 public function input($name, $attributes = NULL)
 {
     $input = Facebook_Stream::$input_prefix . $name . Facebook_Stream::$input_suffix;
     if ($name == 'attachment') {
         return $this->_attachment->inputs($attributes);
     }
     if ($this->_inputs[$name]['hidden']) {
         return Form::hidden($input, $this->_stream[$name], $attributes);
     }
     return Form::input($input, $this->_stream[$name], $attributes);
 }
开发者ID:jerfowler,项目名称:kohana-facebook,代码行数:11,代码来源:stream.php

示例14: buildHiddenFields

 protected function buildHiddenFields()
 {
     if (count($this->hiddenFields) < 1) {
         return '';
     }
     $hidden = [''];
     foreach ($this->hiddenFields as $fieldName => $fieldValue) {
         $hidden[] = \Form::hidden($fieldName, $this->replaceTokens($fieldValue));
     }
     return implode(PHP_EOL, $hidden);
 }
开发者ID:nsbucky,项目名称:resulttable,代码行数:11,代码来源:Submit.php

示例15: displayForm

 /**
  * Renders the field's form element for editing in the admin site
  * @see \Admin::getFieldSettings()
  * @param mixed $value The current value of the property, if there is one
  * @param array $settings Field settings, created through \Admin::getFieldSettings()
  * @param object $model The model, if it is being edited.
  * @return string The form control
  */
 public static function displayForm($value, &$settings, $model)
 {
     $class = get_called_class();
     $settings = static::settings($settings);
     $include_label = isset($settings['label']) ? $settings['label'] : true;
     $required = isset($settings['required']) ? $settings['required'] : false;
     $errors = $model->getErrorsForField($settings['mapping']['fieldName']);
     $has_errors = count($errors) > 0;
     $input_attributes = isset($settings['input_attributes']) ? $settings['input_attributes'] : array('class' => 'input-xxlarge');
     $input_attributes['class'] .= ' form_' . $settings['mapping']['fieldName'];
     $attributes = array('class' => 'controls control-group' . ($has_errors ? ' error' : '') . ' field-type-' . $class::type($settings));
     $label_text = $settings['title'] . ($required ? ' *' : '');
     // Translation?
     if (\CMF::$lang_enabled && !\CMF::langIsDefault() && isset($settings['mapping']['columnName']) && $model->isTranslatable($settings['mapping']['columnName'])) {
         // If there is no translation
         if (!$model->hasTranslation($settings['mapping']['columnName'])) {
             $attributes['class'] .= ' no-translation';
             $input_attributes['class'] .= ' no-translation';
             $label_text = '<img class="lang-flag" src="' . \Uri::create('/admin/assets/img/lang/' . \CMF::defaultLang() . '.png') . '" />&nbsp; ' . $label_text;
         } else {
             $label_text = '<img class="lang-flag" src="' . \Uri::create('/admin/assets/img/lang/' . \CMF::lang() . '.png') . '" />&nbsp; ' . $label_text;
         }
     }
     // Description?
     $description = isset($settings['description']) ? '<span class="help-block">' . $settings['description'] . '</span>' : '';
     // Build the input
     $input = '<input type="text" name="' . $settings['mapping']['fieldName'] . '[place_name]" ' . array_to_attr($input_attributes) . ' value="' . \Security::htmlentities(strval($value['place_name']), ENT_QUOTES) . '" />';
     $input .= '<input type="hidden" data-ref="place-id" name="' . $settings['mapping']['fieldName'] . '[place_id]" ' . array_to_attr($input_attributes) . ' value="' . \Security::htmlentities(strval($value['place_id']), ENT_QUOTES) . '" />';
     $input .= '<input type="hidden" data-ref="address_components" name="' . $settings['mapping']['fieldName'] . '[address_components]" ' . array_to_attr($input_attributes) . ' value="' . \Security::htmlentities(strval($value['address_components']), ENT_QUOTES) . '" />';
     // Build the label
     $label = !$include_label ? '' : html_tag('label', array('class' => 'item-label', 'for' => $settings['mapping']['fieldName']), $label_text . ($has_errors ? ' - ' . $errors[0] : ''));
     // Prepend or append things...
     if (isset($settings['prepend'])) {
         $input = html_tag('div', array('class' => 'input-prepend'), html_tag('span', array('class' => 'add-on'), $settings['prepend']) . $input);
     }
     if (isset($settings['append'])) {
         $input = html_tag('div', array('class' => 'input-append'), $input . html_tag('span', array('class' => 'add-on'), $settings['append']));
     }
     // Don't wrap the input if wrap is set to false
     if (isset($settings['wrap']) && $settings['wrap'] === false) {
         return $label . $input;
     }
     // Add the 'keep updated' control if the field has a template
     if (isset($settings['template']) && !empty($settings['template'])) {
         $attributes['class'] .= ' field-with-controls field-with-template';
         $auto_update_setting = 'settings[' . $settings['mapping']['fieldName'] . '][auto_update]';
         $auto_update_content = \Form::hidden($auto_update_setting, '0', array()) . html_tag('label', array('class' => 'checkbox auto-update-label'), \Form::checkbox($auto_update_setting, '1', \Arr::get($settings, 'auto_update', true), array('class' => 'auto-update')) . strtolower(\Lang::get('admin.common.auto_update')));
         $auto_update = html_tag('div', array('class' => 'controls-top'), $auto_update_content);
         $label .= $auto_update;
         return array('content' => html_tag('div', $attributes, $label . $description . $input) . '<div class="clear"><!-- --></div>', 'widget' => false, 'assets' => array('js' => array('/admin/assets/js/twig.min.js', '/admin/assets/js/fields/template.js')), 'js_data' => $settings);
     }
     return html_tag('div', $attributes, $label . $description . $input);
 }
开发者ID:soundintheory,项目名称:fuel-cmf,代码行数:61,代码来源:GooglePlace.php


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