Пример #1
0
 function end($options = null)
 {
     if ($this->_fieldsetOpen === true) {
         return "</fieldset>\n" . parent::end($options);
     }
     return parent::end($options);
 }
Пример #2
0
 public function end($string = 'Salvar', $options = array())
 {
     $optionsDefault = array('class' => 'btn btn-primary', 'div' => 'form-group');
     $options = array_merge_recursive($optionsDefault, $options);
     $retorno = parent::submit($string, $options);
     $retorno .= parent::end();
     return $retorno;
 }
Пример #3
0
 public function end($options = null, $secureAttributes = array())
 {
     return parent::end($options, $secureAttributes) . '</div>';
 }
Пример #4
0
 /**
  * end
  * フック用にラッピング
  *
  * @param	array	$options
  * @return	string
  * @access	public
  */
 function end($options = null)
 {
     $options = $this->executeHook('beforeFormEnd', $options);
     $out = parent::end($options);
     return $this->executeHook('afterFormEnd', $out);
 }
Пример #5
0
 public function end($options = null)
 {
     $out = $this->hidden('_Fuzzy.detectstr', array('value' => '文字', 'id' => 'Fuzzy' . mt_rand()));
     return $out . parent::end($options);
 }
 /**
  * End a form, Twitter Bootstrap like.
  * 
  * @param string|array $options Label for the submit button as string ou array with label key and other options.
  * @param array $secureAttributes To add secure attributes.
  *
  * Extra options:
  * 	- ga_type       : string Button type GA_PRIMARY|GA_INFO|GA_SUCCESS|GA_WARNING|GA_DANGER|GA_INVERSE|GA_LINK
  * 	- ga_size       : string Button size GA_MINI|GA_SMALL|GA_LARGE
  */
 public function end($options = null, $secureAttributes = [])
 {
     if ($options === null) {
         return parent::end($options, $secureAttributes);
     }
     if (is_string($options)) {
         $options = ['label' => $options];
     }
     if (!in_array($this->formType, [GA_INLINE, GA_SEARCH, GA_HORIZONTAL])) {
         if (!array_key_exists('div', $options)) {
             $options['div'] = [];
         }
         $options['div']['class'] = GA_FORM_ACTIONS;
     }
     if ($this->formType === GA_HORIZONTAL) {
         if (!array_key_exists('div', $options)) {
             $options['div'] = [];
         }
         $options['div']['class'] = GA_CONTROL_GROUP;
         $before = $this->Html->tag('div', null, ['class' => GA_CONTROLS]);
         if (!empty($options['before'])) {
             $before = $options['before'] . $before;
         }
         $options['before'] = $before;
         $after = $this->Html->tag('/div');
         if (!empty($options['after'])) {
             $after = $after . $options['after'];
         }
         $options['after'] = $after;
     }
     return parent::end($options, $secureAttributes);
 }
Пример #7
0
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <button type="button" onclick="App.Pedido.AdicionaProduto()" class='btn btn-primary btn-sm'><span class='glyphicon glyphicon-plus'></span> Adicionar produto</button>
        </div>
    </div>
    <div class="row" style="padding:30px 0">
        <div class="col-md-12">
            <div class="col-md-3">
                <legend>Valor</legend>
                <input type="text" id="saldo"  class="valor alert-success" value="0.00" readonly/>
            </div>
            <div class="col-md-3">
                <legend>Desconto (%)</legend>
                <input type="text" id="desconto" class="valor alert-danger" placeholder="0%"  onkeyup="App.Pedido.Descontar(this.value)"/>
            </div>
            <div class="col-md-3">
                <legend>Soma</legend>
                <input type="text" id="montante" class="valor alert-info" value="0.00" readonly/>
            </div>
        </div>
    </div>
    <?php 
FormHelper::end(false);
?>
<script type="text/javascript">
    App.Pedido.AdicionaProduto();
</script>
 /**
  * Unsets Parsley processor.
  *
  * @param array $options
  * @return string
  */
 public function end($options = null, $secureAttributes = array())
 {
     $end = parent::end($options);
     unset($this->_processor);
     return $end;
 }
 /**
  *
  * End a form, Twitter Bootstrap like.
  *
  * New options:
  *  - bootstrap-type: Twitter bootstrap button type (primary, danger, info, etc.)
  *  - bootstrap-size: Twitter bootstrap button size (mini, small, large)
  *
  **/
 public function end($options = null, $secureAttributes = array())
 {
     if ($options == null) {
         return parent::end($options, $secureAttributes);
     }
     if (is_string($options)) {
         $options = array('label' => $options);
     }
     if (!$this->inline) {
         if (!array_key_exists('div', $options)) {
             $options['div'] = array();
         }
         if (!isset($options['div']['class'])) {
             $options['div']['class'] = '';
         }
         $options['div']['class'] .= ' form-actions';
     }
     return parent::end($options, $secureAttributes);
 }
Пример #10
0
 /**
  * Add divs and classes necessary for bootstrap
  *
  */
 public function end($options = null)
 {
     if ($options !== null) {
         if (!is_array($options)) {
             $options = array('label' => $options);
         }
         $defaults = array('class' => 'btn btn-primary', 'div' => array('class' => 'form-actions'));
         $options = Set::merge($defaults, $options);
     }
     return parent::end($options);
 }
Пример #11
0
 /**
  * Closes an HTML form, cleans up values set by Bs3FormHelper::create(), and writes hidden
  * input fields where appropriate.
  *
  * @param string|array $options as a string will use $options as the value of button,
  * @return string a closing FORM tag optional submit button.
  */
 public function end($options = null, $secureAttributes = array())
 {
     $t = parent::end($options, $secureAttributes) . $this->tinyMceScript();
     if (!$this->_isAnAdminPanel()) {
         return $t;
     }
 }
Пример #12
0
 /**
  * See FormHelper::end
  */
 function end()
 {
     return parent::end() . "\n";
 }
Пример #13
0
 /**
  * End
  *
  * @param string $submit
  * @param array $settings
  * @return string
  * @access public
  * @since 1.0
  */
 public function end($submit = null, $settings = array())
 {
     if (!$this->_hasComponent()) {
         return '';
     }
     return parent::end($submit, $settings);
 }
Пример #14
0
 function end($options = null)
 {
     $view = Sl::getInstance()->view;
     $options2 = is_array($options) ? $options : array();
     $options2 += array('validation' => true);
     if ($options2['validation'] && $view->model && isset($view->Validation)) {
         SlConfigure::write('Asset.js.jquery', 'head');
         SlConfigure::write('Asset.js.head.jqueryValidation', 'jquery.validation.min');
         $html = $view->Validation->bind($view->model);
     } else {
         $html = '';
     }
     return parent::end($options) . $html;
 }
 /**
  * Add divs and classes necessary for bootstrap to end form.
  *
  * @param array $options
  * @param array $secureAttributes
  * @return string
  */
 public function end($options = null, $secureAttributes = [])
 {
     if (!empty($options)) {
         if (!is_array($options)) {
             $options = ['label' => $options];
         }
         $defaults = ['class' => 'btn btn-success'];
         $options = array_merge($defaults, $options);
     }
     return parent::end($options, $secureAttributes);
 }
Пример #16
0
 /**
  * end
  * フック用にラッピング
  *
  * @param	array	$options
  * @return	string
  * @access	public
  */
 public function end($options = null, $secureAttributes = array())
 {
     // CUSTOMIZE ADD 2014/07/03 ryuring
     // >>>
     $id = $this->__id;
     $this->__id = null;
     /*** beforeEnd ***/
     $event = $this->dispatchEvent('beforeEnd', array('id' => $id, 'options' => $options), array('class' => 'Form', 'plugin' => ''));
     if ($event !== false) {
         $options = $event->result === null || $event->result === true ? $event->data['options'] : $event->result;
     }
     // <<<
     $out = parent::end($options);
     // CUSTOMIZE ADD 2014/07/03 ryuring
     // >>>
     /*** afterEnd ***/
     $event = $this->dispatchEvent('afterEnd', array('id' => $id, 'out' => $out), array('class' => 'Form', 'plugin' => ''));
     if ($event !== false) {
         $out = $event->result === null || $event->result === true ? $event->data['out'] : $event->result;
     }
     return $out;
     // <<<
 }
Пример #17
0
<?php

FormHelper::create('loginForm');
FormHelper::input('email', "E-mail", Request::post('email'), array('placeholder' => 'Digite o seu e-mail', 'style' => 'max-width:400px', 'validation' => array('regex' => FormHelper::EMAIL, 'message' => 'Digite um <strong>E-mail</strong> válido.')));
FormHelper::password('password', "Senha", Request::post('password'), array('placeholder' => 'Digite o sua senha', 'style' => 'max-width:400px;', 'validation' => array('regex' => FormHelper::NOT_EMPTY, 'message' => 'Digite uma <strong>Senha</strong> para logar.')));
?>
<br/><?php 
FormHelper::startGroup();
FormHelper::submitAjax("Enviar", "auth", array('class' => 'button'));
FormHelper::endGroup();
FormHelper::end();
 /**
  * @example of use
  * 		echo $appForm->end();
  * @example of output
  * 			</table>
  *		</form>
  *
  */
 function end($options = null)
 {
     $out = '</table>';
     $out .= parent::end($options);
     return $out;
 }