beginFormTb() public static method

Generates an open form tag.
public static beginFormTb ( string $layout = self::FORM_LAYOUT_VERTICAL, string $action = '', string $method = 'post', array $htmlOptions = [] ) : string
$layout string the form layout.
$action string the form action URL.
$method string form method (e.g. post, get).
$htmlOptions array additional HTML attributes.
return string the generated tag.
Exemplo n.º 1
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     $this->attachBehavior('TbWidget', new TbWidget());
     $this->copyId();
     if ($this->stateful) {
         echo TbHtml::statefulFormTb($this->layout, $this->action, $this->method, $this->htmlOptions);
     } else {
         echo TbHtml::beginFormTb($this->layout, $this->action, $this->method, $this->htmlOptions);
     }
 }
Exemplo n.º 2
0
    } else {
        if (Yii::app()->user->hasFlash('remove')) {
            echo TbHtml::alert(TbHtml::ALERT_COLOR_SUCCESS, Yii::app()->user->getFlash('remove'));
        }
    }
}
$data = Profile::model()->crearArrayStudentsEssay($model->id_essays);
if (empty($data)) {
    echo TbHtml::muted('No hay Estudiantes disponibles para asignar,' . TbHtml::b(' ya todos los Estudiantes activos se encuentran asignados al Essay.'));
    echo "<br />";
} else {
    ?>

        <!-- Form agregar Students a Essay -->
            <?php 
    echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_INLINE);
    ?>
        <fieldset>

            <?php 
    /* $this->widget('CAutoComplete',
       array(
       'name'=>'studentsEssay',
       'url'=>CHtml::normalizeUrl(array('/essays/essays/buscarStudents')),
       'extraParams'=>array('id'=>$model->id_essays),
       'htmlOptions'=>array(
       'size'=>50,
       'maxlength'=>50,
       'span'=>5,
       ),
       'methodChain'=>'.result(function(event,item){
Exemplo n.º 3
0
<fieldset>
    <legend>Reset Password</legend>
<?php echo TbHtml::beginFormTb()?>
      <?php echo TbHtml::label('<b>Email</b>','email');?>
      <?php echo TbHtml::textField('email','',array('placeholder'=>'Enter your email here...','span'=>5)); ?>
      <div class="form-actions">
        <?php echo TbHtml::submitButton('Submit',array(
		    'color'=>TbHtml::BUTTON_COLOR_SUCCESS,
		    'size'=>TbHtml::BUTTON_SIZE_DEFAULT,
		)); ?>
      </div>
 

<?php echo TbHtml::endForm();?>
</fieldset>
Exemplo n.º 4
0
    <h3>Disabled inputs</h3>

    <div class="bs-docs-example form-inline">
        <?php 
echo TbHtml::textField('text', '', array('placeholder' => 'Disabled input here...', 'disabled' => true));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::textField('text', '', array('placeholder' => 'Disabled input here...', 'disabled' => true)); ?></pre>

    <h3>Validation states</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_HORIZONTAL);
?>
            <?php 
echo TbHtml::textFieldControlGroup('text', '', array('label' => 'Input with warning', 'help' => 'Something may have gone wrong', 'color' => TbHtml::INPUT_COLOR_WARNING));
?>
            <?php 
echo TbHtml::textFieldControlGroup('text', '', array('label' => 'Input with error', 'help' => 'Please correct the error', 'color' => TbHtml::INPUT_COLOR_ERROR));
?>
            <?php 
echo TbHtml::textFieldControlGroup('text', '', array('label' => 'Input with info', 'help' => 'Username is taken', 'color' => TbHtml::INPUT_COLOR_INFO));
?>
            <?php 
echo TbHtml::textFieldControlGroup('text', '', array('label' => 'Input with success', 'help' => 'Woohoo!', 'color' => TbHtml::INPUT_COLOR_SUCCESS));
?>
        <?php 
TbHtml::endForm();
Exemplo n.º 5
0
<?php

/* @var $this ViewMemberPointController */
// Javascipt untuk fungsi pencarian ditable gridview
// @parameter1 ID Script
// @paramerer2 Javascript snippet
Yii::app()->clientScript->registerScript('search', "\n\n\$('.search-form form').submit(function(e){\n   e.preventDefault();\n   var strcategory = '';\n  var nilai = \$('#member').val();\n\nif (\$('#id_member').is(':checked')) {\n\n  strcategory = 'id_member';\n\n}else if (\$('#member_name').is(':checked')) {\n\n  strcategory = 'member_name';\n\n}else{\n\n  errorMsgBox('Please select criteria');\n  return false;\n}\n\n\$('#member-grid').yiiGridView('update', {\n\t\t  data: {keyword:nilai,category:strcategory,ajax:'member-grid'},\n\t});\n\n});\n");
?>

<div class="search-form">
<legend>Search Data Member</legend>
<?php 
echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_SEARCH, Yii::app()->createUrl($this->route), 'get', array('autocomplete' => 'off'));
echo TbHtml::textField('member', '', array('style' => 'width:50%', 'class' => 'search-query'));
echo "&nbsp;&nbsp;&nbsp;";
echo TbHtml::submitButton('<i class="icon-fa-search icon-fa-large" style="margin-top:5px;"></i> Search', array('color' => TbHtml::BUTTON_COLOR_INVERSE));
echo "<br/><br/>";
echo TbHtml::radioButton('criteria', '', array('label' => 'By ID Member', 'id' => 'id_member'));
echo "&nbsp;&nbsp;&nbsp;";
echo TbHtml::radioButton('criteria', '', array('label' => 'By Name', 'id' => 'member_name'));
echo TbHtml::endForm();
?>
</div>
<hr/>

<script>

function cetakStruk(paramurl){
  var xurl = paramurl;
  
  bootbox.confirm('<h4 style=\'text-align:center\'>Are you sure want to print ?</h4>', function(result) {
Exemplo n.º 6
0
 public function testBeginForm()
 {
     $I = $this->codeGuy;
     $html = TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_VERTICAL, '#');
     $form = $I->createNode($html, 'form');
     $I->seeNodeCssClass($form, 'form-vertical');
 }
Exemplo n.º 7
0
<?php

echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_SEARCH);
?>
    <?php 
echo TbHtml::searchQueryField('keyword', '', array('placeholder' => '请输入产品名称或编号', 'span' => 5));
?>
    <?php 
echo TbHtml::submitButton('搜索');
echo TbHtml::endForm();