Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <?php
  2.  
  3. use yii\helpers\Html;
  4. use yii\widgets\ActiveForm;
  5. use common\models\Cultusers;
  6. use dosamigos\datepicker\DatePicker;
  7.  
  8. /* @var $this yii\web\View */
  9. /* @var $model common\models\Cultusers */
  10. /* @var $form yii\widgets\ActiveForm */
  11. ?>
  12.  
  13. <div class="cult">
  14.  
  15. <?php $form = ActiveForm::begin(['id' => 'create',
  16. 'method' => 'POST', 'options' => ['enctype'=>'multipart/form-data']]); ?>
  17.  
  18. <?= $form->field($model, 'username') ?>
  19.  
  20. <?= $form->field($model, 'email') ?>
  21.  
  22. <?= $form->field($model, 'password')->passwordInput() ?>
  23.  
  24. <?= $form->field($model, 'birthdate')->widget(
  25. DatePicker::className(), [
  26. // inline too, not bad
  27. 'inline' => true,
  28. // modify template for custom rendering
  29. 'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>',
  30. 'clientOptions' => [
  31. 'autoclose' => true,
  32. 'format' => 'dd-M-yyyy'
  33. ]
  34. ]);?>
  35.  
  36. <?= $form->field($model, 'city') ?>
  37. <?= $form->field($model, 'schools') ?>
  38.  
  39. <?=$form->field($model, 'sex')->radioList(['mas' => 'mas', 'fem' => 'fem'], ['itemOptions' => ['class' =>'radio-inline']])?>
  40.  
  41. <?= $form->field($model, 'file')->fileInput() ?>
  42.  
  43. <?= $form->field($model, 'about')->textArea(['rows' => 6]) ?>
  44.  
  45.  
  46.  
  47. <div class="form-group">
  48. <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  49. </div>
  50.  
  51. <?php ActiveForm::end(); ?>
  52.  
  53. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement