textField() public static method

Generates a text field input.
See also: self::textInputField
public static textField ( string $name, string $value = '', array $htmlOptions = [] ) : string
$name string the input name.
$value string the input value.
$htmlOptions array additional HTML attributes.
return string the generated input field.
Ejemplo n.º 1
0
 /**
  * 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});");
     }
 }
Ejemplo n.º 2
0
 /**
  * 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);
     }
 }
Ejemplo n.º 3
0
 /**
  * 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();
     }
 }
Ejemplo n.º 4
0
 /**
  * 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');
     }
 }
Ejemplo n.º 5
0
 /**
  * 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');
     }
 }
Ejemplo n.º 6
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) {
Ejemplo n.º 7
0
 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');
 }
Ejemplo n.º 8
0
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',
Ejemplo n.º 9
0
    <?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);
    
   
 ?>
Ejemplo n.º 10
0
<?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');
Ejemplo n.º 11
0
    <h3>Invalid inputs</h3>

    <div class="bs-docs-example form-inline">
        <?php 
echo TbHtml::textField('text', '', array('placeholder' => '*****@*****.**', 'required' => true));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::textField('text', '', array('placeholder' => '*****@*****.**', '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 
Ejemplo n.º 12
0
<?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');
Ejemplo n.º 13
0
Archivo: _zona.php Proyecto: cicb/tpc
?>
		</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 
Ejemplo n.º 14
0
//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'));
?>
        
Ejemplo n.º 15
0
<?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">
Ejemplo n.º 16
0
 public function testTextField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::textField('text', 'text', array('class' => 'input'));
     $input = $I->createNode($html, 'input[type=text].form-control');
     $I->seeNodeAttributes($input, array('class' => 'input form-control', 'id' => 'text', 'name' => 'text', 'value' => 'text'));
     $html = TbHtml::textField('text', 'text', array('prepend' => 'Prepend text'));
     $div = $I->createNode($html, 'div.input-group');
     $I->seeNodeCssClass($div, 'input-group');
     $I->seeNodeChildren($div, array('span', 'input'));
     $span = $div->filter('span.input-group-addon');
     $I->seeNodeText($span, 'Prepend text');
     $html = TbHtml::textField('text', 'text', array('append' => 'Append text'));
     $div = $I->createNode($html, 'div.input-group');
     $I->seeNodeCssClass($div, 'input-group');
     $I->seeNodeChildren($div, array('input', 'span'));
     $span = $div->filter('span.input-group-addon');
     $I->seeNodeText($span, 'Append text');
     $html = TbHtml::textField('text', 'text', array('prepend' => 'Prepend text', 'append' => 'Append text'));
     $div = $I->createNode($html, 'div.input-group');
     $I->seeNodeCssClass($div, 'input-group');
     $I->seeNodeChildren($div, array('span', 'input', 'span'));
     //        $span = $div->filter('span.input-group-addon');
     //        $I->seeNodeText($span, array('Prepend text', 'Append text'));
     // @todo Deprecated in BS3?
     $html = TbHtml::textField('text', 'text', array('block' => true));
     $input = $I->createNode($html, 'input');
     $I->seeNodeCssClass($input, 'input-block-level');
     $html = TbHtml::textField('text', 'text', array('span' => 6));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'col-md-6');
     $I->seeNodeChildren($div, array('input'));
     $html = TbHtml::textField('text', 'text', array('xs' => 6, 'md' => 6));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'col-xs-6');
     $I->seeNodeCssClass($div, 'col-md-6');
     $I->seeNodeChildren($div, array('input'));
     $html = TbHtml::textField('text', 'text', array('class' => 'col-md-4'));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'col-md-4');
     $I->seeNodeChildren($div, array('input'));
 }
Ejemplo n.º 17
0
<?php

$status = $model->ConfiPVFuncionSta == 'ALTA';
$fid = $model->FuncionesId;
$eid = $model->EventoId;
$pid = $model->PuntosventaId;
$padre = $model->puntoventa->tipoid == 0;
$nombre = $model->puntoventa->PuntosventaNom;
echo CHtml::openTag('li', array('id' => "{$fid}-{$pid}", 'class' => 'nodo ', 'style' => 'border-top:1px dashed #888;'));
//LI NODO
if (isset($padre) and $padre) {
    # Si tiene hijos muestra el boton de +
    echo TbHtml::link(' ', array('funciones/verRama', 'EventoId' => $eid, 'FuncionesId' => $fid, 'PuntosventaId' => $pid), array('class' => 'nodo-toggle fa fa-plus-square', 'id' => "link-{$fid}-" . $pid, 'data-estado' => 'inicial', 'style' => 'margin:5px'));
}
echo TbHtml::checkBox("chk-{$fid}-{$pid}", $status, array('class' => 'CPVFSta', 'data-fid' => $fid, 'data-pid' => $pid));
echo TbHtml::label($nombre, "chk-{$fid}-{$pid}", array('style' => 'display:inline;width:100%'));
echo CHtml::openTag('div', array('
				class' => 'fechas-cpf text-right', 'style' => 'width:100%;'));
echo TbHtml::textField("CPF_FecIni-{$fid}-{$pid}", $model->ConfiPVFuncionFecIni, array('data-fid' => $fid, 'data-pid' => $pid, 'class' => 'picker box1  CPVFFecIni', 'style' => 'font-size:10px;width:105px'));
echo TbHtml::link(' ', '#', array('class' => 'fa fa-calendar text-info ', 'title' => 'Fecha de inicio', 'onclick' => "\$('#CPF_FecIni-{$fid}-{$pid}').datetimepicker('show');return false;\n\t\t\t\t"));
echo " / ";
echo TbHtml::textField("CPF_FecFin-{$fid}-{$pid}", $model->ConfiPVFuncionFecFin, array('data-fid' => $fid, 'data-pid' => $pid, 'class' => 'picker box1  CPVFFecFin', 'style' => 'font-size:10px;width:105px'));
echo TbHtml::link(' ', '#', array('class' => 'fa fa-calendar  text-warning', 'title' => 'Fecha Fin', 'onclick' => "\$('#CPF_FecFin-{$fid}-{$pid}').datetimepicker('show');return false;\n\t\t\t\t"));
echo CHtml::closeTag('div');
echo CHtml::closeTag('li');
Ejemplo n.º 18
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>
Ejemplo n.º 19
0
$thumbUrl = UrlHelper::getImageUrl($model->filename, 'thumb_project', $model->thumb_filename);
$photoUrl = UrlHelper::getImageUrl($model->filename);
$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', 'photo description'), 'title' => $sDescMaxLength, 'alt' => $sDescMaxLength));
echo TbHtml::textField('FileForm[' . $uniqueId . '][photos][' . $idx . '][sort_order]', $model->sort_order, array('class' => 'fl-l ' . $radiobuttonClass, 'span' => 1, 'style' => 'margin-left: 10px', 'placeholder' => Yii::t('main', 'order num')));
if ($this->portfolioType == 1) {
    echo '<div class="fl-l ml-10 mr-10 ' . $radiobuttonClass . '" style="margin-left: 10px; margin-right: 10px;">';
    $istopID = 'FileForm_' . $uniqueId . '_' . $idx . '_is_top';
    echo TbHtml::label(Yii::t('main', 'Main photo') . '&nbsp;', $istopID, array('class' => 'checkbox'));
    echo CHtml::radioButton('FileForm[' . $uniqueId . '][is_top]', $model->is_top, array('id' => $istopID, 'value' => $idx, 'class' => "ml-10 mr-10 "));
    echo '</div>';
}
?>
        
        <button class="delete-uploaded btn ml-10 mr-10" type="button">
            <i class="icon-trash"></i>
            <span><?php 
echo Yii::t('main', 'Delete');
?>
</span>
Ejemplo n.º 20
0
Archivo: _form.php Proyecto: cicb/tpc
		<strong style="margin-left: 75px;">Tipo de Descuento</strong>
		<select id="tipo">
			<option value="cupon">Cup&oacute;n</option>
			<option value="descuento">Descuento</option>
		</select>
	</div>
		<a id="boton_ayuda"  class="btn btn-info fa fa-question-circle" style="margin-right: 37px;">&nbsp;Ayuda</a>

</div>


<br /><br />
<div class='row-fluid'>
		<div class='span5'>
		<?php 
echo TbHtml::textField('CuponesCod', '', array('data-placement' => 'left', 'data-id' => -1, 'data-tipo' => 'cupon', 'id' => 'codigo', 'append' => TbHtml::button('Generar cupón', array('id' => 'generar_cupon')), 'span' => 7, 'placeholder' => 'Código del cupón'));
?>
	<label><strong>Eventos</strong></label>
	<label>Seleciona por lo menos un evento</label>
	<select id="lista_eventos" multiple="" size="11">
	</select>
	<table width="50%" style="margin:auto">
		<tr>
			<td>
			<a id="eliminar_lista_evento" class="btn btn-danger"><i class="icon-remove icon-white"></i>&nbsp;Eliminar</a>
			</td>
			<td>
			<a data-toggle="modal" data-target="#myModal_eventos" id="boton_eventos" class="btn btn-success"><i class="icon-plus icon-white"></i>&nbsp;Agregar</a>
			</td>
		</tr>
	</table>
Ejemplo n.º 21
0
// Specific columns at start
$aColumns = array(array('id' => 'id', 'class' => 'CCheckBoxColumn', 'selectableRows' => '100'), array('header' => '', 'name' => 'actions', 'id' => 'action', 'value' => '$data->buttons', 'type' => 'raw', 'htmlOptions' => array('class' => 'text-left'), 'filter' => false), array('header' => 'id', 'name' => 'id'));
/*
array(
    'header' => 'seed',
    'name' => 'seed'
));
*/
$aColumns[] = array('header' => 'lastpage', 'name' => 'lastpage', 'type' => 'number', 'filter' => TbHtml::textField('SurveyDynamic[lastpage]', $model->lastpage));
$aColumns[] = array('header' => gT("completed"), 'name' => 'completed_filter', 'value' => '$data->completed', 'type' => 'raw', 'filter' => TbHtml::dropDownList('SurveyDynamic[completed_filter]', $model->completed_filter, array('' => gT('All'), 'Y' => gT('Yes'), 'N' => gT('No'))));
//add token to top of list if survey is not private
if ($bHaveToken) {
    $aColumns[] = array('header' => 'token', 'name' => 'token', 'type' => 'raw', 'value' => '$data->tokenForGrid');
    $aColumns[] = array('header' => gT("First name"), 'name' => 'tokens.firstname', 'id' => 'firstname', 'type' => 'raw', 'value' => '$data->firstNameForGrid', 'filter' => TbHtml::textField('SurveyDynamic[firstname_filter]', $model->firstname_filter));
    $aColumns[] = array('header' => gT("Last name"), 'name' => 'tokens.lastname', 'type' => 'raw', 'id' => 'lastname', 'value' => '$data->lastNameForGrid', 'filter' => TbHtml::textField('SurveyDynamic[lastname_filter]', $model->lastname_filter));
    $aColumns[] = array('header' => gT("Email"), 'name' => 'tokens.email', 'id' => 'email', 'filter' => TbHtml::textField('SurveyDynamic[email_filter]', $model->email_filter));
}
$aColumns[] = array('header' => 'startlanguage', 'name' => 'startlanguage');
// The column model must be built dynamically, since the columns will differ from survey to survey, depending on the questions.
// All other columns are based on the questions.
// An array to control unicity of $code (EM code)
foreach ($model->metaData->columns as $column) {
    if (!in_array($column->name, $aDefaultColumns)) {
        $colName = viewHelper::getFieldCode($fieldmap[$column->name], array('LEMcompat' => true));
        // This must be unique ......
        $base64jsonFieldMap = base64_encode(json_encode($fieldmap[$column->name]));
        $aColumns[] = array('header' => '<span data-toggle="tooltip" data-placement="bottom" title="' . quoteText(strip_tags($fieldmap[$column->name]['question'])) . '">' . $colName . ' <br/> ' . ellipsize($fieldmap[$column->name]['question'], $model->ellipsize_header_value) . '</span>', 'headerHtmlOptions' => array('style' => 'min-width: 350px;'), 'name' => $column->name, 'type' => 'raw', 'value' => '$data->getExtendedData("' . $column->name . '", "' . $language . '", "' . $base64jsonFieldMap . '")');
    }
}
$this->widget('bootstrap.widgets.TbGridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => $aColumns, 'itemsCssClass' => 'table-striped', 'id' => 'responses-grid', 'ajaxUpdate' => true, 'ajaxType' => 'POST', 'afterAjaxUpdate' => 'bindScrollWrapper', 'template' => "{items}\n<div id='ListPager'><div class=\"col-sm-4\" id=\"massive-action-container\">{$massiveAction}</div><div class=\"col-sm-4 pager-container \">{pager}</div><div class=\"col-sm-4 summary-container\">{summary}</div></div>", 'summaryText' => gT('Displaying {start}-{end} of {count} result(s).') . ' ' . sprintf(gT('%s rows per page'), CHtml::dropDownList('pageSize', $pageSize, Yii::app()->params['pageSizeOptions'], array('class' => 'changePageSize form-control', 'style' => 'display: inline; width: auto')))));
?>
Ejemplo n.º 22
0
        ?>
<span class="required"> *</span></p>
            <?php 
        echo $form->textField($affiliate, 'lastnames', array('placeholder' => 'Apellidos', 'size' => 60, 'maxlength' => 64));
        ?>
        </div>                
    </div>    

    <div class="row-fluid">
        <div class="span4">
            <p><?php 
        echo Yii::t('traveller', 'Birthdate');
        ?>
</p>
            <?php 
        echo TbHtml::textField('text', $affiliate->birthdate, array('disabled' => true));
        ?>
        
        </div>              
        <div class="span4">
            <p><?php 
        echo Yii::t('traveller', 'Phone Hab');
        ?>
<span class="required"> *</span></p>
            <?php 
        $form->widget('yiiwheels.widgets.maskinput.WhMaskInput', array('model' => $affiliate, 'attribute' => 'phone_hab', 'value' => $affiliate->phone_hab, 'mask' => '+99 (999) 999-9999', 'htmlOptions' => array('placeholder' => '+99 (999) 999-9999')));
        ?>
                 
            <?php 
        //echo $form->textFieldControlGroup($model, 'phone_hab', array('size' => 45, 'maxlength' => 45, 'hint'=>Yii::t('traveller','Hint Phone Hab')));
        ?>
Ejemplo n.º 23
0
 public function actionVerFila($EventoId, $FuncionesId, $ZonasId, $FilasId)
 {
     // Muestra los controles de las una fila por subzona de una zona dada
     $models = Filas::model()->findAllByAttributes(compact('EventoId', 'FuncionesId', 'ZonasId', 'FilasId'));
     if (sizeof($models) > 0) {
         // Si existen tales filas
         echo TbHtml::openTag('tr', array('id' => "fila-{$FilasId}"));
         echo TbHtml::tag('td', array(), $FilasId);
         echo TbHtml::tag('td', array(), TbHtml::link(' ', array('eliminarFila', 'EventoId' => $EventoId, 'FuncionesId' => $FuncionesId, 'ZonasId' => $ZonasId, 'FilasId' => $FilasId), array('data-fid' => $FilasId, 'title' => 'Eliminar fila', 'class' => 'btn btn-mini btn-danger fa fa-times btn-eliminar-fila')));
         echo TbHtml::tag('td', array(), TbHtml::textField('FilasAli', $models[0]['FilasAli'], array('class' => 'FilasAli input-mini vivo', 'data-fid' => $FilasId, 'data-sid' => $models[0]['SubzonaId'], 'data-zid' => $ZonasId)));
         foreach ($models as $model) {
             // Por cada fila de las subzonas, renderiza sus campos
             $this->renderPartial('_fila', array('model' => $model));
         }
         echo TbHtml::tag('td', array(), CHtml::textField('Subtotal', 0, array('class' => 'Subtotal pull-right text-right input-mini', 'id' => 'Subtotal-' . $FilasId, 'data-fid' => $FilasId, 'readonly' => true)));
         echo TbHtml::closeTag('tr');
     }
 }
Ejemplo n.º 24
0
Archivo: _fila.php Proyecto: cicb/tpc
<?php

$fid = $model->FilasId;
$sid = $model->SubzonaId;
$zid = $model->ZonasId;
echo TbHtml::tag('td', array(), TbHtml::textField('LugaresIni', $model->LugaresIni, array('class' => 'input-mini text-center pull-right LugaresIni limite ', 'data-fid' => $fid, 'data-sid' => $sid, 'data-zid' => $zid, 'id' => "LugaresIni-{$sid}-{$fid}")));
echo TbHtml::tag('td', array(), TbHtml::textField('LugaresFin', $model->LugaresFin, array('class' => 'input-mini text-center pull-left LugaresFin limite ', 'data-fid' => $fid, 'data-sid' => $sid, 'data-zid' => $zid, 'id' => "LugaresFin-{$sid}-{$fid}")));
echo TbHtml::tag('td', array(), TbHtml::textField('FilasCanLug', $model->FilasCanLug, array('class' => 'input-mini text-center pull-left FilasCanLug ', 'data-fid' => $fid, 'data-sid' => $sid, 'data-zid' => $zid, 'id' => "FilasCanLug-{$sid}-{$fid}", 'readonly' => true, 'disabled' => true)));
Ejemplo n.º 25
0
 /**
  * Renders field
  */
 public function renderField()
 {
     list($name, $id) = $this->resolveNameID();
     $this->htmlOptions = TbHtml::defaultOption('id', $id, $this->htmlOptions);
     $this->htmlOptions = TbHtml::defaultOption('name', $name, $this->htmlOptions);
     // by using TbHtml we support all bootstrap options
     if ($this->hasModel()) {
         echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
     } else {
         echo TbHtml::textField($name, $this->value, $this->htmlOptions);
     }
 }
Ejemplo n.º 26
0
<?php

Yii::app()->clientScript->registerCoreScript('jquery.ui');
$baseUrl = Yii::app()->baseUrl;
$js = Yii::app()->getClientScript();
$js->registerScriptFile($baseUrl . '/js/jquery.treeview.js');
//$js->registerScriptFile($baseUrl.'/js/jquery-ui-timepicker-addon.js');
$this->widget('ext.EChosen.EChosen', array('target' => '.chosen'));
?>

<!-- INICIO DE CONTROL-->
<div class="box5">
	
<div class="span3">
<?php 
echo TbHtml::textField('CuponesCod', $CuponActual[0]->CuponesCod, array('data-placement' => 'left', 'data-id' => -1, 'data-tipo' => 'cupon', 'id' => 'codigo', 'span' => 2, 'class' => empty($_GET['cupon']) ? 'hidden' : '', 'placeholder' => 'Código del cupón', 'readonly' => 'readonly'));
?>

    <label><strong>Eventos</strong></label>
    <label>Seleciona por lo menos un evento</label>
    <select id="lista_eventos" multiple="" size="11">
        <?php 
foreach ($model as $key => $evento) {
    ?>
        <option data-db="1" data-db-id="<?php 
    echo $evento->DescuentosId;
    ?>
" id="<?php 
    echo $evento->EventoId;
    ?>
" <?php