edit.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/6
  6. * Time: 下午10:12
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/menu.js')
  10. ?>
  11. <form class="layui-form" action="" style="margin-top: 50px" >
  12. <div class="layui-form-item">
  13. <label class="layui-form-label">菜单名称</label>
  14. <div class="layui-input-block" style="width: 200px;">
  15. <input type="text" name="name" value="<?php echo $model['name']?>" required lay-verify="required" autocomplete="off" class="layui-input">
  16. </div>
  17. </div>
  18. <div class="layui-form-item">
  19. <label class="layui-form-label">url</label>
  20. <div class="layui-input-block" style="width: 200px;">
  21. <input type="text" name="url" value="<?php echo $model['url']?>" autocomplete="off" class="layui-input">
  22. </div>
  23. </div>
  24. <div class="layui-form-item">
  25. <label class="layui-form-label">图标</label>
  26. <div class="layui-input-block" style="width: 200px;">
  27. <input type="text" name="icon" value="<?php echo $model['icon']?>" autocomplete="off" class="layui-input">
  28. </div>
  29. </div>
  30. <div class="layui-form-item">
  31. <label class="layui-form-label">排序</label>
  32. <div class="layui-input-block" style="width: 200px;">
  33. <input type="text" name="sort" value="<?php echo $model['sort']?>" autocomplete="off" class="layui-input">
  34. </div>
  35. </div>
  36. <div class="layui-form-item">
  37. <label class="layui-form-label">状态</label>
  38. <div class="layui-input-block">
  39. <input type="radio" name="status" value="1" title="正常" <?php if($model['status'] == '1') echo 'checked'?>>
  40. <input type="radio" name="status" value="2" title="禁用" <?php if($model['status'] == '2') echo 'checked'?>>
  41. </div>
  42. </div>
  43. <div class="layui-form-item">
  44. <div class="layui-input-block">
  45. <input type="hidden" name="id" value="<?= $model['id']?>">
  46. <button class="layui-btn" lay-submit="" lay-filter="editMenu" >立即提交</button>
  47. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  48. </div>
  49. </div>
  50. </form>