edit.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <include file="public@header" />
  2. </head>
  3. <body>
  4. <div class="wrap">
  5. <ul class="nav nav-tabs">
  6. <li><a href="{:url('Menu/index')}">后台菜单</a></li>
  7. <li><a href="{:url('Menu/add')}">添加菜单</a></li>
  8. <li><a href="{:url('Menu/lists')}">所有菜单</a></li>
  9. <li class="active"><a>编辑菜单</a></li>
  10. </ul>
  11. <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('menu/editPost')}">
  12. <div class="form-group">
  13. <label for="input-parent_id" class="col-sm-2 control-label"><span class="form-required">*</span>上级</label>
  14. <div class="col-md-6 col-sm-10">
  15. <select class="form-control" name="parent_id" id="input-parent_id">
  16. <option value="0">作为一级菜单</option>{$select_category}
  17. </select>
  18. </div>
  19. </div>
  20. <div class="form-group">
  21. <label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>名称</label>
  22. <div class="col-md-6 col-sm-10">
  23. <input type="text" class="form-control" id="input-name" name="name" value="{$data.name}">
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label for="input-app" class="col-sm-2 control-label"><span class="form-required">*</span>应用</label>
  28. <div class="col-md-6 col-sm-10">
  29. <input type="text" class="form-control" id="input-app" name="app" value="{$data.app}">
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. <label for="input-controller" class="col-sm-2 control-label"><span class="form-required">*</span>控制器</label>
  34. <div class="col-md-6 col-sm-10">
  35. <input type="text" class="form-control" id="input-controller" name="controller" value="{$data.controller}">
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label for="input-action" class="col-sm-2 control-label"><span class="form-required">*</span>方法</label>
  40. <div class="col-md-6 col-sm-10">
  41. <input type="text" class="form-control" id="input-action" name="action" value="{$data.action}">
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label for="input-param" class="col-sm-2 control-label">参数</label>
  46. <div class="col-md-6 col-sm-10">
  47. <input type="text" class="form-control" id="input-param" name="param" value="{$data.param}">
  48. <p class="help-block">例:id=3&amp;p=3</p>
  49. </div>
  50. </div>
  51. <div class="form-group">
  52. <label for="input-icon" class="col-sm-2 control-label">图标</label>
  53. <div class="col-md-6 col-sm-10">
  54. <input type="text" class="form-control" id="input-icon" name="icon" value="{$data.icon}">
  55. <p class="help-block">
  56. <a href="http://www.thinkcmf.com/font/font_awesome/icons.html" target="_blank">选择图标</a> 不带前缀fa-,如fa-user => user
  57. </p>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label for="input-remark" class="col-sm-2 control-label">备注</label>
  62. <div class="col-md-6 col-sm-10">
  63. <textarea class="form-control" id="input-remark" name="remark">{$data.remark}</textarea>
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. <label for="input-status" class="col-sm-2 control-label">状态</label>
  68. <div class="col-md-6 col-sm-10" id="input-status">
  69. <select class="form-control" name="status">
  70. <option value="1">在左侧菜单显示</option>
  71. <php>$status_selected=empty($data['status'])?"selected":"";</php>
  72. <option value="0" {$status_selected}>在左侧菜单隐藏</option>
  73. </select>
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label for="input-type" class="col-sm-2 control-label">类型</label>
  78. <div class="col-md-6 col-sm-10">
  79. <select class="form-control" name="type" id="input-type">
  80. <option value="1">有界面可访问菜单</option>
  81. <php>$type2_selected=$data['type']==2?"selected":"";</php>
  82. <option value="2" {$type2_selected}>无界面可访问菜单</option>
  83. <php>$type_selected=$data['type']==0?"selected":"";</php>
  84. <option value="0" {$type_selected}>只作为菜单</option>
  85. </select>
  86. </div>
  87. </div>
  88. <div class="form-group">
  89. <div class="col-sm-offset-2 col-sm-10">
  90. <input type="hidden" name="id" value="{$data.id}" />
  91. <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
  92. <a class="btn btn-default" href="{:url('menu/index')}">{:lang('BACK')}</a>
  93. </div>
  94. </div>
  95. </form>
  96. </div>
  97. <script src="__STATIC__/js/admin.js"></script>
  98. </body>
  99. </html>