Пример #1
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model frontend\models\Tiposdoc */
$this->title = 'Detalle de tipo de documento';
$this->params['breadcrumbs'][] = ['label' => 'Tipos de documento', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="tiposdoc-view">

    <h3><?php 
echo Html::encode($this->title);
?>
</h3>

    <p>
        <?php 
echo Html::a('Modificar', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>

    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'desc_tipo_doc', 'desc_tipo_doc_abr', ['attribute' => 'persona_fisica', 'value' => frontend\models\Tiposdoc::getSiNo($model->persona_fisica)]]]);
?>

</div>
Пример #2
0
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'id')->textInput(['autofocus' => $model->isNewRecord, 'readonly' => !$model->isNewRecord]);
?>

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

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

    <?php 
echo $form->field($model, 'persona_fisica')->dropDownList(frontend\models\Tiposdoc::getSiNo());
?>

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

    <?php 
ActiveForm::end();
?>

</div>