_form.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2016-03-21 14:35
  7. */
  8. /**
  9. * @var $this yii\web\View
  10. * @var $model common\models\FriendlyLink
  11. */
  12. use backend\widgets\ActiveForm;
  13. use common\libs\Constants;
  14. $this->title = "Friendly Links";
  15. ?>
  16. <div class="row">
  17. <div class="col-sm-12">
  18. <div class="ibox">
  19. <?= $this->render('/widgets/_ibox-title') ?>
  20. <div class="ibox-content">
  21. <?php $form = ActiveForm::begin([
  22. 'options' => [
  23. 'enctype' => 'multipart/form-data',
  24. 'class' => 'form-horizontal'
  25. ]
  26. ]); ?>
  27. <div class="hr-line-dashed"></div>
  28. <?= $form->field($model, 'name')->textInput(['maxlength' => 64]) ?>
  29. <div class="hr-line-dashed"></div>
  30. <?= $form->field($model, 'image')->imgInput(['style' => "max-width:200px;max-height:200px"]) ?>
  31. <div class="hr-line-dashed"></div>
  32. <?= $form->field($model, 'url')->textInput(['maxlength' => 512]) ?>
  33. <div class="hr-line-dashed"></div>
  34. <?= $form->field($model, 'sort')->textInput(['maxlength' => 64]) ?>
  35. <div class="hr-line-dashed"></div>
  36. <?= $form->field($model, 'target')->radioList(Constants::getTargetOpenMethod()) ?>
  37. <div class="hr-line-dashed"></div>
  38. <?= $form->field($model, 'status')->radioList(Constants::getYesNoItems()) ?>
  39. <?= $form->defaultButtons() ?>
  40. <?php ActiveForm::end(); ?>
  41. </div>
  42. </div>
  43. </div>
  44. </div>