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


PHP TbHtml::textField方法代码示例

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


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

示例1: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     $id = $this->resolveId($id);
     if ($this->hasModel()) {
         echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
     } else {
         echo TbHtml::textField($name, $this->value, $this->htmlOptions);
     }
     if ($this->assetPath !== false) {
         $this->publishAssets($this->assetPath);
         $this->registerCssFile('/css/bootstrap-datetimepicker.css');
         if ($this->registerJs) {
             $this->registerScriptFile('/js/' . $this->resolveScriptVersion('bootstrap-datetimepicker.js'), CClientScript::POS_END);
             if (isset($this->locale)) {
                 $this->locale = str_replace('_', '-', $this->locale);
                 $this->registerScriptFile("/js/locales/bootstrap-datetimepicker.{$this->locale}.js", CClientScript::POS_END);
             }
         }
     }
     if ($this->bindPlugin) {
         $options = !empty($this->pluginOptions) ? CJavaScript::encode($this->pluginOptions) : '';
         $this->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').datetimepicker({$options});");
     }
 }
开发者ID:juanprua,项目名称:yiistrap-widgets,代码行数:28,代码来源:TbDateTimePicker.php

示例2: renderField

 /**
  * Renders field
  */
 public function renderField()
 {
     list($name, $id) = $this->resolveNameID();
     TbArray::defaultValue('id', $id, $this->htmlOptions);
     TbArray::defaultValue('name', $name, $this->htmlOptions);
     if ($this->hasModel()) {
         echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
     } else {
         echo TbHtml::textField($name, $this->value, $this->htmlOptions);
     }
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:14,代码来源:WhDatePicker.php

示例3: renderField

 /**
  * Renders the field if no selector has been provided
  */
 public function renderField()
 {
     if (null === $this->selector) {
         list($name, $id) = $this->resolveNameID();
         if ($this->hasModel()) {
             echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo TbHtml::textField($name, $this->value, $this->htmlOptions);
         }
         $this->setLocaleSettings();
     }
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:15,代码来源:WhDateRangePicker.php

示例4: renderField

 /**
  * Renders the field if no selector has been provided
  */
 public function renderField()
 {
     if (null === $this->selector) {
         $options = array();
         list($name, $id) = $this->resolveNameID();
         $options['id'] = $id . '_datetimepicker';
         TbHtml::addCssClass('input-group date form_datetime', $options);
         echo TbHtml::openTag('div', $options);
         if ($this->hasModel()) {
             echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo TbHtml::textField($name, $this->value, $this->htmlOptions);
         }
         echo TbHtml::openTag('span', array('class' => 'input-group-addon'));
         echo '<i class="glyphicon glyphicon-th"' . '></i>';
         echo TbHtml::closeTag('span');
         echo TbHtml::closeTag('div');
     }
 }
开发者ID:reedboat,项目名称:yiiwheels,代码行数:22,代码来源:WhDateTimePicker.php

示例5: renderField

 /**
  * Renders the field if no selector has been provided
  */
 public function renderField()
 {
     if (null === $this->selector) {
         $options = array();
         list($name, $id) = $this->resolveNameID();
         $options['id'] = $id . '_datetimepicker';
         TbHtml::addCssClass('input-append', $options);
         echo TbHtml::openTag('div', $options);
         if ($this->hasModel()) {
             echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo TbHtml::textField($name, $this->value, $this->htmlOptions);
         }
         echo TbHtml::openTag('span', array('class' => 'add-on'));
         echo '<i data-time-icon="' . $this->iconTime . '" data-date-icon="' . $this->iconDate . '"></i>';
         echo TbHtml::closeTag('span');
         echo TbHtml::closeTag('div');
     }
 }
开发者ID:2amigos,项目名称:yiiwheels,代码行数:22,代码来源:WhDateTimePicker.php

示例6: if

<?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) {
开发者ID:nicovicz,项目名称:reward-point,代码行数:31,代码来源:index.php

示例7: testTextField

 public function testTextField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::textField('text', 'text', array('class' => 'input'));
     $input = $I->createNode($html, 'input[type=text]');
     $I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'text', 'name' => 'text', 'value' => 'text'));
     $html = TbHtml::textField('text', 'text', array('prepend' => 'Prepend text'));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'input-prepend');
     $I->seeNodeChildren($div, array('span', 'input'));
     $span = $div->filter('span.add-on');
     $I->seeNodeText($span, 'Prepend text');
     $html = TbHtml::textField('text', 'text', array('append' => 'Append text'));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'input-append');
     $I->seeNodeChildren($div, array('input', 'span'));
     $span = $div->filter('span.add-on');
     $I->seeNodeText($span, 'Append text');
     $html = TbHtml::textField('text', 'text', array('prepend' => 'Prepend text', 'append' => 'Append text'));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'input-prepend input-append');
     $I->seeNodeChildren($div, array('span', 'input', 'span'));
     $html = TbHtml::textField('text', 'text', array('block' => true));
     $input = $I->createNode($html, 'input');
     $I->seeNodeCssClass($input, 'input-block-level');
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:26,代码来源:TbHtmlTest.php

示例8: array

echo "<div class='bordeada' style='margin-top:0px;' >";

echo "<div style='margin:5px;' >";
echo TbHtml::labelTb('Prácticas', array('color' => TbHtml::LABEL_COLOR_WARNING, 'style' => 'margin-bottom:0px;font-size:16px;padding:9px;'));

if ($accion=='carga'){
$data = CHtml::listData(Practica::model()->findAll(array('order' => 'nombre')), 'codigocarga', 'nombrecomp');

// listado oculto de los codigos de carga
$codigoscarga = CHtml::listData(Practica::model()->findAll(array('order' => 'codigocarga')), 'idpractica', 'codigocarga');
echo TbHtml::dropDownList('codigoscarga', 'codigoscarga', $codigoscarga, array('style' => 'display:none;'));

// campo de carga de codigos de practica (codigocarga) 

echo TbHtml::labelTb('Código', array('style' => 'margin-left:115px;padding:7px;'));
echo TbHtml::textField('codpractica', '', array('span' => 1));


// listado de practicas con select 2

echo TbHtml::labelTb('Nombre', array('style' => 'margin-left:106px;padding:7px;'));
$this->widget('yiiwheels.widgets.select2.WhSelect2', array(
    'asDropDownList' => true,
    'data' => $data,
    'name' => 'cargapractica',
    'htmlOptions' =>
    array(
        'style' => 'width:300px;',
        'prompt' => '',
        'allowClear' => true,
        'placeholder' => 'Buscar',
开发者ID:juankie,项目名称:gestcb9git,代码行数:31,代码来源:_grillapracticas.php

示例9: foreach

    <?php
echo TbHtml::blockAlert(TbHtml::ALERT_COLOR_WARNING, 'No completar los tipos de práctica que no se van a analizar.');
  $i=1; 
          
    foreach ($tiposdepractica as $tp){  

        $valor="";
        $cantidad="";
        
        echo "<div class='control-group'>";
        echo TbHtml::tag("span", array('class' => 'control-label'),$tp->nombre);
        echo "<div class='controls'>";  
        echo TbHtml::textField(get_class($model)."[$i][valor]",array('value'=>$valor),array( 'style' => 'width:50px','prepend' => '$')); 
       // echo TbHtml::labelTb('Cada', array('style' => 'display:inline;margin:0 0 0 10px;'));
        echo TbHtml::textField(get_class($model)."[$i][cadaxprac]",array('value'=>$cantidad),array( 'style' => 'width:50px;','prepend' => 'Cada','append' => 'prácticas', 'span' => 2));
        //echo TbHtml::labelTb('prácticas', array('style' => 'display:inline;'));
        echo "</div></div>"; 
        $i++;
    }

   // Envío el id del tipo de coseguro a descontar
   //echo TbHtml::hiddenField("Descuentocoseguro['iddescuentocoseguro']",$model->iddescuentocoseguro);
    
   
 ?>
开发者ID:juankie,项目名称:gestcb9git,代码行数:25,代码来源:_form_valores2.php

示例10: array

<?php

echo TbHtml::openTag('table', array('width' => 'auto', 'class' => 'table-bordered centrado box'));
foreach ($subzona->filas as $fila) {
    // Por filas
    //$this->renderPartial('_filaAsiento',array('asientos'=>$fila->asientos));
    echo TbHtml::openTag('tr');
    echo TbHtml::tag('th', array(), $fila->FilasAli);
    foreach ($fila->lugares as $asiento) {
        //Por cada Asiento
        $clase = "";
        if ($asiento->LugaresStatus == 'OFF') {
            $clase .= " off hidden";
        }
        $control = TbHtml::textField('asiento', $asiento->LugaresLug, array('class' => 'input-mini asiento' . $clase, 'data-fid' => $asiento->FilasId, 'data-id' => $asiento->LugaresId));
        echo TbHtml::tag('td', array('class' => ' '), $control);
    }
    echo TbHtml::tag('td', array(), TbHtml::buttonGroup(array(array('data-id' => $fila->FilasId, 'title' => 'Alinear todo a la izquierda', 'class' => 'fa fa-angle-double-left btn btn-info btn-alinear', 'url' => array_merge((array) 'alinearFila', $fila->getPrimaryKey(), array('direccion' => 'izquierda'))), array('data-id' => $fila->FilasId, 'title' => 'Recorrer a la izquierda', 'class' => 'fa fa-angle-left btn btn-info btn-alinear', 'url' => array_merge((array) 'moverFila', $fila->getPrimaryKey(), array('direccion' => 'izquierda'))), array('data-id' => $fila->FilasId, 'title' => 'Alinear todo al centro', 'class' => 'fa fa-angle-double-up btn-alinear btn btn-info', 'url' => array_merge((array) 'alinearFila', $fila->getPrimaryKey(), array('direccion' => 'centro'))), array('data-id' => $fila->FilasId, 'title' => 'Recorrer a la derecha', 'class' => 'fa fa-angle-right  btn-alinear btn btn-info', 'url' => array_merge((array) 'moverFila', $fila->getPrimaryKey(), array('direccion' => 'derecha'))), array('data-id' => $fila->FilasId, 'title' => 'Alinear todo a la derecha', 'class' => 'fa fa-angle-double-right  btn-alinear btn btn-info', 'url' => array_merge((array) 'alinearFila', $fila->getPrimaryKey(), array('direccion' => 'derecha'))))));
    echo TbHtml::tag('td', array(), TbHtml::button('', array('onclick' => 'activarOff(' . $fila->FilasId . ')', 'class' => 'btn fa fa-adjust')));
    echo TbHtml::tag('td', array(), TbHtml::textField('FilasCanLug-' . $fila->FilasId, $fila->ntrue, array('class' => 'input-mini', 'data-lugares' => $fila->ntrue, 'append' => 'Lugares', 'readonly' => true)));
    echo TbHtml::closeTag('tr');
}
echo TbHtml::closeTag('table');
开发者ID:cicb,项目名称:tpc,代码行数:23,代码来源:_subzona.php

示例11: array

    <h3>Invalid inputs</h3>

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

    <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 
开发者ID:crisu83,项目名称:yiistrap-docs,代码行数:30,代码来源:basics.php

示例12: array

<?php

$status = $model->ZonasBanVen;
$zid = $model->ZonasId;
$fid = $model->FuncionesId;
$eid = $model->EventoId;
$pid = $model->PuntosventaId;
$padre = $model->puntoventa->tipoid == 0;
$nombre = $model->puntoventa->PuntosventaNom;
echo CHtml::openTag('li', array('id' => "nodo-{$zid}-{$pid}", 'class' => 'nodo ', 'style' => 'border-top:1px dashed #888;'));
//LI NODO
$mas = "";
if (isset($padre) and $padre) {
    # Si tiene hijos muestra el boton de +
    $mas = TbHtml::link(' ', array('distribuciones/verRamaCargo', 'EventoId' => $eid, 'FuncionesId' => $fid, 'ZonasId' => $zid, 'PuntosventaId' => $pid), array('class' => 'nodo-toggle fa fa-plus-square', 'id' => "link-{$zid}-" . $pid, 'data-uid' => "{$zid}-{$pid}", 'data-estado' => 'inicial', 'style' => 'margin:5px'));
}
echo CHtml::openTag('div', array('
				class' => 'text-left', 'style' => 'width:100%;'));
echo TbHtml::textField("ZonasFacCarSer-{$zid}-{$pid}", $model->ZonasFacCarSer, array('class' => 'input-mini text-center ZonasFacCarSer', 'data-zid' => $zid, 'data-pid' => $pid, 'prepend' => $mas, 'append' => $nombre . ' '));
echo CHtml::closeTag('div');
echo TbHtml::tag('div', array('id' => "hijos-{$zid}-{$pid}", ''));
echo CHtml::closeTag('li');
开发者ID:cicb,项目名称:tpc,代码行数:22,代码来源:_nodoCargo.php

示例13: array

?>
		</td>
	    <td>
	    	<?php 
echo CHtml::textField('ZonasCantSubZon', $model->ZonasCantSubZon, array('class' => ' input-small text-center ZonasCantSubZon ', 'disabled' => !$editar or $model->ZonasTipo == 1, 'data-id' => $model->ZonasId, 'id' => 'ZonasCantSubZon-' . $model->ZonasId));
?>
    	</td>
	    <td>
	    <?php 
echo TbHtml::textField('ZonasCanLug', $model->ZonasCanLug, array('class' => 'input-small text-center ZonasCanLug', 'prepend' => '#', 'disabled' => !$editar, 'data-id' => $model->ZonasId, 'append' => CHtml::link(' Generar', array('generacionFilas', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId), array('class' => 'btn btn-generar-asientos fa fa-bolt', 'id' => 'btn-generar-asientos-' . $model->ZonasId, 'disabled' => !$editar, 'data-target' => '#dlg-asientos', 'data-id' => $model->ZonasId))));
?>
	    
	    </td>
	    <td>
	    	<?php 
echo TbHtml::textField('ZonasCosBol', $model->ZonasCosBol, array('class' => 'input-small text-center ZonasCosBol', 'data-id' => $model->ZonasId, 'prepend' => '$'));
?>
	    </td>
	    <td>
<?php 
if ($editar) {
    echo TbHtml::buttonGroup(array(array('label' => ' Filas', 'class' => 'fa fa-bars btn', 'title' => 'Configurar Filas', 'url' => array('editorSubzona', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId, 'SubzonaId' => 1), 'id' => 'btn-configurar-filas')), array('class' => $model->ZonasTipo == 1 ? 'hidden' : ''));
}
?>
	    </td>
		<td>
				<div class='arbol-cargos' id="arbol-<?php 
echo $model->ZonasId;
?>
">
				<?php 
开发者ID:cicb,项目名称:tpc,代码行数:31,代码来源:_zona.php

示例14: array

//show model errors (after saving attempt)
$thumbUrl = UrlHelper::getDefaultImageUrl();
$photoUrl = UrlHelper::getImageUrl($model->filename, 'files');
$img = CHtml::image($thumbUrl, $model->title, array('class' => 'fl-l', 'width' => 123, 'height' => 67, 'style' => 'cursor: pointer !important;'));
echo CHtml::link($img, $photoUrl, array('title' => $model->title, 'target' => '_blank'));
?>
    <div class="form-inline" style="margin-bottom: 20px;"> 
        <?php 
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][photo_id]', $model->photo_id);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][title]', $model->title);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][filename]', $model->filename);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][thumb_filename]', $model->thumb_filename);
echo CHtml::hiddenField('FileForm[' . $uniqueId . '][photos][' . $idx . '][mime_type]', $model->mime_type);
$sTitleMaxLength = 'Max length is ' . Yii::app()->params['lengthPhotoTitle'] . ' symbols';
$sDescMaxLength = 'Max length is ' . Yii::app()->params['lengthPhotoDescription'] . ' symbols';
echo TbHtml::textField('FileForm[' . $uniqueId . '][photos][' . $idx . '][description]', $model->description, array('class' => 'fl-l', 'span' => 6, 'style' => 'margin-left: 10px; margin-right: 10px;', 'placeholder' => Yii::t('main', 'description'), 'title' => $sDescMaxLength, 'alt' => $sDescMaxLength));
?>
        
        <button class="delete-uploaded btn ml-10 mr-10" type="button">
            <i class="icon-trash"></i>
            <span><?php 
echo Yii::t('main', 'Delete');
?>
</span>
        </button>
        
        <br>
        <?php 
echo CHtml::link(TbHtml::small($photoUrl, array('style' => 'margin-left: 10px; margin-right: 10px; cursor: pointer !important;')), $photoUrl, array('title' => $model->title, 'target' => '_blank'));
?>
        
开发者ID:andreyantonov78,项目名称:atmosphera,代码行数:30,代码来源:FileAnyItem.php

示例15: array

<?php

$EventoId = $model->EventoId;
$FuncionesId = $model->FuncionesId;
?>
<div id="respuesta" class='hidden'>
		<div class='centrado' id="mensaje" style="margin-top:120px">
				<i class="fa fa-spinner fa-spin fa-2x text-warning"></i>
				<h2 class="text-warning">Generando los asientos, por favor espere...</h2>
		</div>
</div>
<div class='controles'>
<legend>Configuración de la distribución de asientos</legend>
		<div class=''>
<?php 
echo TbHtml::textField('Requeridos', $model->ZonasCanLug, array('class' => 'input-small text-center  Requeridos', 'prepend' => 'Asientos requeridos:', 'readonly' => true, 'data-id' => $model->ZonasId));
?>
<br />
<?php 
echo TbHtml::numberField('FilasZonasCanLug', $model->ZonasCanLug, array('class' => 'input-small text-center  FilasZonasCanLug', 'prepend' => 'Asientos listos para generar:', 'readonly' => true, 'data-id' => $model->ZonasId, 'id' => 'FilasZonasCanLug'));
?>
		</div>
<?php 
echo TbHtml::link(' Regresar', array('editor', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'scenario' => 'editar', '#' => 'zona-' . $model->ZonasId), array('class' => 'btn fa fa-arrow-left', 'style' => 'margin:10px'));
echo TbHtml::buttonGroup(array(array('id' => 'btn-agregar-fila', 'label' => ' Agregar fila', 'class' => 'fa fa-plus btn btn-success', 'url' => array('agregarFila', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId), 'title' => 'Agregar una Fila'), array('label' => ' Generar asientos', 'class' => 'fa fa-delicious btn-primary', 'id' => 'btn-generar-numerados', 'url' => array('generarNumerados', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId), 'title' => 'Generar todos los Asientos')));
?>
<br />
<br />
</div>
<div class='row-fluid '>
<table border="0" class="table items table-bordered table-hover" id="tabla-filas">
开发者ID:cicb,项目名称:tpc,代码行数:31,代码来源:editorFilas.php


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