Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use yii\helpers\Html;
- use yii\widgets\ActiveForm;
- /* @var $this yii\web\View */
- /* @var $model app\models\User */
- /* @var $form yii\widgets\ActiveForm */
- ?>
- <div class="user-form">
- <?php $form = ActiveForm::begin(); ?>
- <?= $form->field($model, 'username')->textInput(['maxlength' => true]) ?>
- <?php //$form->field($model, 'email')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'nama_lengkap')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'alamat')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'no_hp')->textInput(['maxlength' => true]) ?>
- <?php if ($model->isNewRecord): ?>
- <?= $form->field($model, 'item_name')->dropDownList($listRole, ['prompt' => 'Pilih']) ?>
- <?php else: ?>
- <?= $form->field($model, 'item_name')->dropDownList($listRole, ['options' => [$authAssignments[0] => ['selected'=>'selected']]]) ?>
- <?= $form->field($model, 'status')->dropDownList($model->status_list, ['prompt' => 'Pilih']) ?>
- <?php endif ?>
- <?= $form->field($model, $model->isNewRecord ? 'password_hash' : 'new_password')
- ->passwordInput([
- 'maxlength' => true,
- 'placeholder' => $model->isNewRecord ? '' : 'Isi jika ingin merubah password pengguna'
- ])
- ?>
- <div class="form-kendaraan">
- </div>
- <?php //$form->field($model, 'auth_key')->textInput(['maxlength' => true]) ?>
- <?php //$form->field($model, 'password_reset_token')->textInput(['maxlength' => true]) ?>
- <?php //$form->field($model, 'account_activation_token')->textInput(['maxlength' => true]) ?>
- <?php //$form->field($model, 'status')->textInput() ?>
- <?php //$form->field($model, 'created_at')->textInput() ?>
- <?php //$form->field($model, 'updated_at')->textInput() ?>
- <div class="form-group">
- <?= Html::submitButton($model->isNewRecord ? 'Simpan' : 'Perbarui', ['class' => 'btn btn-success']) ?>
- <?= Html::a('Kembali',$model->isNewRecord ? ['index'] : ['view', 'username' => $model->username], ['class' => 'btn btn-danger']); ?>
- <?= Html::button('Detail Kendaraan', ['class' => 'btn btn-info', 'id' => 'kendaraan']); ?>
- </div>
- <?php ActiveForm::end(); ?>
- </div>
- <?php
- $formEmail = $form->field($model, 'email')->textInput(['maxlength' => true]);
- $this->registerJs('
- $("document").ready(function(){
- var userForm = $(".form-kendaraan");
- var add_button = $("#kendaraan");
- var form = "'.$formEmail.'";
- $(add_button).click(function(e){
- e.preventDefault();
- $(userForm).append(form);
- });
- });
- ');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement