Example #1
0
?>

    <?php 
// $form->field($model, 'codigo_completo')->textInput()
?>

    <?php 
//echo $form->field($model, 'id_tipo_localidad')->textInput()
?>
    
    <?php 
$tipoLocalidad = BienesTipoLocalidadBien::find()->all();
?>
    
    <?php 
echo $form->field($model, 'id_tipo_localidad')->dropDownList(Arrayhelper::map($tipoLocalidad, 'id_tipo_localidad', 'descripcion'), ['prompt' => 'Seleccione']);
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Crear' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
    
    
    <?php 
Example #2
0
 /**
  * get list of roles for dropdown
  */
 public static function getRoleList()
 {
     $droptions = Role::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'role_value', 'role_name');
 }
Example #3
0
                            <div class="panel panel-primary">
                                <div class="panel-heading">DATOS DE USUARIO</div>
                                    <div class="panel-body">
                                    <?php 
$form = ActiveForm::begin(['id' => 'form_usuario']);
?>
                                        
                                        <?php 
echo $form->field($model, 'cedula')->textInput(['placeholder' => 'introduzca cedula', 'maxlength' => '8']);
?>
 
                                        <input type="hidden" name="cedulausuario" id="cedulausuario" >
                                        <div id="div_validacedula"style="font-size:16px;color:red;display:none" ></div> <!--mensaje validar cedula usuario--><br>
                                        
                                        <?php 
echo $form->field($model, 'id_direccion')->dropdownList(Arrayhelper::map(Direccion::find()->orderBy('nombre')->all(), 'iddireccion', 'nombre'), ['prompt' => 'unidad'])->label('Unidad Administrativa');
?>

                                        <?php 
echo $form->field($model, 'login')->textInput(['maxlength' => true, 'placeholder' => 'Introduzca usuario']);
?>
                                        
                                        <?php 
echo $form->field($model, 'password')->passwordInput(['maxlength' => true, 'placeholder' => 'introduzca password']);
?>

                                        <label for="confirmar">Confirmar</label>
                                        <input type="password" name="confirmar" id="confirmar" class="form-control" placeholder="confirmar">
                                        <div id="confirmar_pass"style="font-size:16px;color:red;display:none" ></div> <!--confirmar pass--><br><br>
                                        <input type="hidden" id="ocultoiddireccion">
                                        
Example #4
0
 /**
  * Renders the input.
  *
  * @param string $name name of the input
  * @param array $options the input options
  * @return string
  */
 public function renderInput($name, $options)
 {
     $options = Arrayhelper::merge($this->options, $options);
     $method = 'render' . Inflector::camelize($this->type);
     $value = $this->prepareValue();
     if (isset($options['items'])) {
         $options['items'] = $this->prepareItems($options['items']);
     }
     if (method_exists($this, $method)) {
         $input = call_user_func_array([$this, $method], [$name, $value, $options]);
     } else {
         $input = $this->renderDefault($name, $value, $options);
     }
     return $input;
 }
Example #5
0
 /**
  * get list of genders for dropdown
  */
 public static function getGenderList()
 {
     $droptions = Gender::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'id', 'gender_name');
 }
Example #6
0
   
                    </div>
          <div class="col-md-2 column">
  <?php 
echo $form->field($model, 'componentes')->radioList(array('S' => 'Si', 'N' => 'No', 'X' => 'Desconoce'));
?>

                </div>
             <div class="col-md-2 column">
       <?php 
echo $form->field($model, 'asegurado')->radioList(array('S' => 'Si', 'N' => 'No', 'X' => 'Desconoce'));
?>
                   </div>
                  <div class="col-md-8 column">
    <?php 
echo $form->field($model, 'codigo_seguro')->widget(Select2::classname(), ['model' => $BienesSeguros, 'attribute' => 'denominacion', 'data' => Arrayhelper::map($BienesSeguros::find()->all(), 'id_seguro', 'denominacion'), 'options' => ['placeholder' => 'Seleccione un Seguro ...'], 'pluginOptions' => ['allowClear' => true]])->label('Registro de Seguro');
?>
                          </div>  </div>
        
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'id' => 'crear']);
?>

    </div>


    <?php 
ActiveForm::end();
?>
Example #7
0
 public static function getCityList()
 {
     $droptions = City::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'id', 'name');
 }
Example #8
0
        echo Html::encode($model->visit->embargo);
        ?>
</td>
				</tr>
			<?php 
    }
    ?>
		<?php 
}
?>
	</table>
    <?php 
$form = ActiveForm::begin(['enableClientValidation' => false, 'options' => ['enctype' => 'multipart/form-data']]);
?>
    	<?php 
echo $form->field($model, 'box_id')->dropDownList(Arrayhelper::map($boxes, 'id', 'code'));
?>
    	<?php 
echo $form->field($model, 'observation_type')->dropDownList(Observations::getObservationTypes(), ['data-observation-type' => 1]);
?>
    	<div class="observation-form-details">
			<?php 
echo $form->field($model, 'taxon_id')->dropDownList(Species::getTaxonomies(true), ['data-taxon-identifier' => 1]);
?>
			<?php 
echo $form->field($model, 'species_id')->dropDownList(ArrayHelper::map($species, 'id', 'dutch'), ['data-species-identifier' => 1]);
?>
			<div class="sight-container hidden-js">
				<?php 
echo $form->field($model, 'age')->dropDownList(Observations::getAgeOptions());
?>
Example #9
0
 /**
  * get list of statuses for dropdown
  */
 public static function getStatusList()
 {
     $droptions = Status::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'status_value', 'status_name');
 }
 public static function getListCalendarUi()
 {
     $droptions = ListCalendarUiHelper::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'value', 'name');
 }
Example #11
0
 public static function getStreamFilter()
 {
     $droptions = Stream::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'st_name', 'st_name');
 }
Example #12
0
    <?php 
$form = ActiveForm::begin(['id' => 'bienes-sede-form', 'enableAjaxValidation' => true, 'enableClientScript' => true, 'enableClientValidation' => true]);
?>


    <?php 
echo $form->field($model, 'id_sede')->textInput();
?>

    <?php 
echo $form->field($model, 'nombre')->textInput();
?>

    <?php 
echo $form->field($model, 'id_localidad')->widget(Select2::classname(), ['model' => $BienesLocalidad, 'attribute' => 'descripcion', 'data' => Arrayhelper::map($BienesLocalidad::find()->all(), 'id_localidad', 'nombre'), 'options' => ['placeholder' => 'Seleccione una sede ...'], 'pluginOptions' => ['allowClear' => true]])->label('Seleccione una localidad');
?>

     <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Crear' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
    
    <?php 
ActiveForm::end();
?>
    <?php 
$this->registerJs('
        // obtener la id del formulario y establecer el manejador de eventos
            $("form#bienes-sede-form").on("beforeSubmit", function(e) {
Example #13
0
 public static function getAuthorFilter()
 {
     $droptions = BranchType::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'firstname' . ' ' . 'lastname', 'firstname' . ' ' . 'lastname');
 }
Example #14
0
?>

    <?php 
echo $form->field($model, 'denominacion')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'depedencia')->textInput();
?>

    <?php 
echo $form->field($model, 'id_organizacion')->widget(Select2::classname(), ['model' => $Orgnizacion, 'attribute' => 'nombre', 'data' => Arrayhelper::map($Orgnizacion::find()->all(), 'id_organizacion', 'nombre'), 'options' => ['placeholder' => 'Seleccione una Organización ...'], 'pluginOptions' => ['allowClear' => true]])->label('id_organizacion');
?>

    <?php 
echo $form->field($model, 'id_categoria')->widget(Select2::classname(), ['model' => $Categoria, 'attribute' => 'denominacion', 'data' => Arrayhelper::map($Categoria::find()->all(), 'id_categoria_adm', 'denominacion'), 'options' => ['placeholder' => 'Seleccione una Categoria ...'], 'pluginOptions' => ['allowClear' => true]])->label('id_categoria');
?>



    <!-- <?php 
echo $form->field($model, 'id_categoria')->textInput();
?>
 -->

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
            <input type="text" class="form-control" name="disponibilidad" id="disponibilidad" readonly="true">.<br>
            <button type="button" class="btn btn-default" data-dismiss="modal">Salir</button>
            <button id="salvarip" type="button" class="btn btn-primary "  data-dismiss="modal" >Salvar</button>
            <button type="reset" class="btn btn-danger" value="reset"> Reset</button>
        </div>

        <div class ="col-md-4 column">

            <?php 
echo $form->field($puc, 'descripcion')->textinput(['id' => 'pucd', 'readonly' => 'readonly'])->label('Descripcion de cuenta');
?>
            <?php 
echo $form->field($model, 'monto')->textinput(['id' => 'montoip', 'onkeypress' => 'return acceptNum(event)', 'onblur' => 'formateadora();'])->label('monto');
?>
            <?php 
echo $form->field($cp, 'auxiliar')->dropDownlist(Arrayhelper::map(Cuentapresupuestaria::find()->all(), 'auxiliar', 'auxiliar'), ['prompt' => 'ord']);
?>

        </div>
    </div>
</div>
<?php 
ActiveForm::end();
Modal::end();
?>


	<!-- modal Agregar Detalle-->

<?php 
Modal::begin(['header' => '<h3 align="center">Agregar Detalle</h3>', 'id' => 'modal_agregar_detalles']);
Example #16
0
     }); //detalles
                 });//ocument

</script>
    
                                                <!--modal imputacion_servicios-->                  
            <?php 
Modal::begin(['header' => '<h3><center>IMPUTACIÓN PRESUPUESTARIA</center></h3>', 'id' => 'modalImputacion_s', "class" => "modal fade bs-example-modal-lg"]);
$form = ActiveForm::begin(['id' => 'form_imputacion_s']);
?>

            <div class="container">
                <div class="main row">
                    <div class="col-md-5 column">
                        <?php 
echo $form->field($coordinacion, 'nombre')->dropDownlist(Arrayhelper::map(Coordinacion::find()->where(['iddireccion' => $direction, 'esdireccion' => 'false'])->all(), 'idcoordinacion', 'nombre'), ['prompt' => '--Seleccione--', 'id' => 'ueip_s', 'onchange' => "\$.ajax({\n                                                                type: 'POST',\n                                                                cache: false,\n                                                                url: '" . yii\helpers\Url::to(['requisicion/get-unidadservicios']) . "',\n                                                                data:{idcoordinacion: \$('#ueip_s').val(),\n                                                                      idtipopago:\$('#tppuc').val()\n                                                                },\n                                                                success: function(response){\n                                                                \$( '#categoria_servicios' ).html(response);\n                                                                }\n                    });"])->label('Unidad Ejecutora_servicios');
?>
 
                        
                        
                <?php 
echo $form->field($model, 'auxiliar')->dropDownList(array(), ['id' => 'categoria_servicios', 'onchange' => "\$.ajax({\n                                                     type: 'POST',\n                                                     url: '" . yii\helpers\Url::to(['requisicion/xxx']) . "',\n                                                     data:{ idcategoriaprogramatica: \$('#categoria_servicios').val()},\n                                                     success: function (response) {\n                                                     response =JSON.parse(response);\n                                                     \$('#ocultocategoria_servicios').val(response.categoria);\n                                                     var puc_servicios = \$('#puc_s').val();\n                                                     \$('#cuentaip_s').val(response.categoria+puc_servicios);\n                                                  \n                                                     }  \n                                                    });"])->label('Categoria_servicios');
?>
 
                        
                        <input type="hidden"  id="ocultocategoria_servicios"  name="ocultocategoria_servicios"> 
                        <input type="hidden"  id="ocultotipopago_puc" name="ocultotipopago_puc"><!--le asigno puc atravez de idtipopago-->
                      <!-- <input type="hidden"  id="ocultocategoria_s"  name="ocultocategoria_s">-->
                        <label class="label-control">CUENTA</label>
                        <input type="text" class="form-control" name="cuenta" id="cuentaip_s" readonly="true">
                        <label class="label-control">DISPONIBLE</label>
 public static function getListSystemLang()
 {
     $droptions = ListSystemLangHelper::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'code', 'name');
 }
Example #18
0
 * User: napster
 * Date: 10/11/2015
 * Time: 4:25 PM
 */
use frontend\models\Watches;
use kartik\select2\Select2;
use yii\helpers\ArrayHelper;
?>
    <td><?php 
$i = $count + 1;
echo $i;
?>
    </td>
    <td>
        <?php 
echo Select2::widget(['model' => $model, 'attribute' => 'watches_id[' . $count . ']', 'data' => Arrayhelper::map(Watches::find()->all(), 'id', 'modelno'), 'options' => ['placeholder' => '', 'onchange' => '
                                            $.post("/index.php/bills/bcontent?id=' . '"+$(this).val(),function(data){

                                                    $("#bills-description-' . $count . '").val(data["brand"]);
                                                    $("#bills-price-' . $count . '").val(data["price"]);
                                            },"json");
                                            '], 'pluginOptions' => ['allowClear' => true]]);
?>
    </td>
    <td>
        <div class="form-group field-bills-description-<?php 
echo $count;
?>
">
            <input type="text" id="bills-description-<?php 
echo $count;
Example #19
0
Pjax::begin();
?>
                            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'options' => ['class' => "col-md-120"], 'tableOptions' => ['class' => 'table table-striped table-hover table-bordered table-condensed'], 'summary' => "Mostrando <strong>{begin} - {end}</strong> de <strong>{totalCount}</strong> celulares.", 'rowOptions' => function ($model) {
    if (CellPhoneCosts::getOverPlan($model->plan, $model->real_cost_time)) {
        return ['class' => 'danger'];
    }
}, 'layout' => '
                                        <div class="pull-right">
                                            {summary}
                                        </div>
                                        {items}
                                        <div class="pull-right">
                                            {pager}
                                        </div>
                                        ', 'pager' => ['maxButtonCount' => 10, 'prevPageLabel' => 'Anterior', 'nextPageLabel' => 'Siguiente', 'prevPageCssClass' => 'prev hidden-xs', 'nextPageCssClass' => 'next hidden-xs'], 'columns' => [['attribute' => 'workstations_id', 'value' => 'workstations.full_name', 'headerOptions' => ['style' => 'text-align: center']], ['attribute' => 'cell_number', 'contentOptions' => ['width' => '80', 'style' => 'text-align: center'], 'headerOptions' => ['style' => 'text-align: center']], ['attribute' => 'profit_center_id', 'value' => 'profitCenter.name', 'filter' => Arrayhelper::map(ProfitCenter::find()->all(), 'number', 'name'), 'headerOptions' => ['style' => 'text-align: center']], ['attribute' => 'plan', 'value' => function ($data) {
    return CellPhoneCosts::getPlans($data->plan);
}, 'filter' => CellPhoneCosts::getPlans(), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '150']], ['attribute' => 'real_cost_time', 'value' => function ($data) {
    return round($data->real_cost_time) . ' minutos';
}, 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '80', 'style' => 'text-align: center']], ['attribute' => 'sms_cost', 'format' => 'currency', 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '115', 'style' => 'text-align: right']], ['attribute' => 'long_distance', 'format' => 'currency', 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '120', 'style' => 'text-align: right']], ['attribute' => 'month', 'value' => function ($data) {
    return CellPhoneCosts::getMonths($data->month);
}, 'filter' => CellPhoneCosts::getMonths(), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '60', 'style' => 'text-align: center']], ['attribute' => 'year', 'filter' => ArrayHelper::map(CellPhoneCosts::getYears(), 'year', 'year'), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '60', 'style' => 'text-align: center']], ['attribute' => 'cost', 'format' => 'currency', 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '60', 'style' => 'text-align: right']]]]);
?>
                        <?php 
Pjax::end();
?>



                    </div>
                </div>
Example #20
0
 /**
  *   get list of user type for drop down
  */
 public function getUserTypeList()
 {
     $droptions = UserType::find()->asArray()->all();
     return Arrayhelper::map($droptions, 'user_type_value', 'user_type_name');
 }
        </div>
    </div>
</div>
<?php 
ActiveForm::end();
Modal::end();
?>

                                           <!modal productos-->
<?php 
Modal::begin(['id' => 'modalAgregarProducto', 'header' => '<h3 align="center">AGREGAR PRODUCTOS</h3>']);
$form = ActiveForm::begin(['id' => 'form_agregar_producto']);
echo $form->field($reqDeta, 'cantidad')->textInput(['onkeypress' => 'return acceptNum(event)', 'title' => 'introdusca cantidad']);
echo $form->field($reqDeta, 'descripcion')->textInput(['maxlength' => 500, 'title' => 'introduzca descripcion del producto']);
echo $form->field($unidadmedida, 'descripcion')->dropdownList(Arrayhelper::map(Unidadmedida::find()->orderBy('descripcion')->all(), 'idunidadmedida', 'descripcion'), ['prompt' => 'unidades de medida'])->label('Unidades');
echo ' <button type="button" class="btn btn-default" data-dismiss="modal">Salir</button>
      <button id="btproductos" type="button" class="btn btn-primary "  data-dismiss="modal" > Guardar</button>
      <button type="reset" class="btn btn-danger" value="reset"> Reset</button>';
ActiveForm::end();
Modal::end();
?>

<!--<script>
    $(document).ready(function(){
        $("#form_agregar_producto").on("submit", function(event) {
            event.preventDefault();
            var cadena = $(this).serialize();
            alert(cadena);
            return false;
        });