editrole.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/7
  6. * Time: 上午8:56
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/role.js");
  10. ?>
  11. <style>
  12. .layui_w_box {width:80%;margin:0 auto;}
  13. </style>
  14. <form class="layui-form" action="" style="margin-top: 50px" >
  15. <div class="layui_w_box">
  16. <div class="layui-form-item">
  17. <label class="layui-form-label">角色名称</label>
  18. <div class="layui-input-block" style="width: 250px;">
  19. <input type="text" name="name" value="<?php echo $model['name']?>" autocomplete="off" class="layui-input">
  20. </div>
  21. </div>
  22. <div class="layui-form-item">
  23. <label class="layui-form-label">描述</label>
  24. <div class="layui-input-block" style="width: 250px;">
  25. <input type="text" name="describe" value="<?php echo $model['describe']?>" autocomplete="off" class="layui-input">
  26. </div>
  27. </div>
  28. <div class="layui-form-item">
  29. <label class="layui-form-label">状态</label>
  30. <div class="layui-input-block">
  31. <input type="radio" name="state" value="1" title="正常" <?php if($model['state'] == '1') echo 'checked'?>>
  32. <input type="radio" name="state" value="2" title="禁用" <?php if($model['state'] == '2') echo 'checked'?>>
  33. </div>
  34. </div>
  35. <div class="layui-form-item">
  36. <div class="layui-input-block">
  37. <input type="hidden" name="id" value="<?php echo $model['id']?>" >
  38. <button class="layui-btn" lay-submit="" lay-filter="editsubmit" >立即提交</button>
  39. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  40. </div>
  41. </div>
  42. </div>
  43. </form>