edit.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <h1>
  5. 编辑角色
  6. <small>
  7. <i class="icon-double-angle-right"></i>
  8. {$crumbs}
  9. </small>
  10. </h1>
  11. </div>
  12. <div class="row">
  13. <div class="col-xs-12">
  14. <form class="form-horizontal" id="validation-form" method="post" action='{:U("Roles/update")}'>
  15. <div class="form-group required">
  16. <label class="col-sm-2 control-label">角色名称:</label>
  17. <div class="col-sm-10">
  18. <input name="role[name]" type="text" class="input" size="30" value="{$role['name']}" />
  19. </div>
  20. </div>
  21. <div class="form-group required">
  22. <label class="col-sm-2 control-label">父角色:</label>
  23. <div class="col-sm-10">
  24. <select name="role[pid]">
  25. <option value="0" <if condition="$iteam['id'] eq 0">selected</if>>无</option>
  26. <volist name="roles" id="item">
  27. <option value="{$item['id']}" <if condition="$role['pid'] eq $item['id']">selected</if> <if condition="$role['id'] == $item['id'] || in_array($item['id'], $sids)">disabled="true"</if>>{$item['fullname']}</option>
  28. </volist>
  29. </select>
  30. </div>
  31. </div>
  32. <div class="form-group required">
  33. <label class="col-sm-2 control-label">状态:</label>
  34. <div class="col-sm-10">
  35. <select name="role[status]">
  36. <option value="1" <if condition="$role['status'] eq 1" >selected</if>>启用</option>
  37. <option value="0" <if condition="$role['status'] eq 0" >selected</if>>禁用</option>
  38. </select>
  39. </div>
  40. </div>
  41. <div class="form-group required">
  42. <label class="col-sm-2 control-label">角色描述:</label>
  43. <div class="col-sm-10">
  44. <input class="form-control" type="text" placeholder="角色描述" name="role[description]" value="{$role['description']}" />
  45. </div>
  46. </div>
  47. <div class="form-group">
  48. <label class="col-sm-1 control-label no-padding-left"> </label>
  49. <div class="col-sm-11">
  50. <input type="hidden" name="role[id]" value="{$role['id']}" />
  51. <input name="send" type="submit" value="提交" class="btn btn-primary" />
  52. </div>
  53. </div>
  54. </form>
  55. </div>
  56. </div>
  57. </block>