0
0

edit.html 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-content">
  7. <form method="post" action="{:url('edit')}" class="form-horizontal">
  8. <input type="hidden" name="id" value="{$info.id|default='0'}">
  9. <div class="form-group">
  10. <label class="col-sm-2 control-label">名称 <span class="text-danger">*</span></label>
  11. <div class="col-sm-6">
  12. <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
  13. </div>
  14. </div>
  15. {if $fpid > 1}
  16. <div class="form-group">
  17. <label class="col-sm-2 control-label">上级</label>
  18. <div class="col-sm-6">
  19. {:widget_view('common/select',['name'=>'fpid','lists'=>$flist,'value'=>isset($info['parent_id'])?$info['parent_id']:''])}
  20. </div>
  21. </div>
  22. {/if}
  23. <div class="form-group">
  24. <label class="col-sm-2 control-label">排序</label>
  25. <div class="col-sm-6">
  26. <input type="number" class="form-control" name="sort" value="{$info.sort|default='100'}">
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="col-sm-2 control-label">备注</label>
  31. <div class="col-sm-6">
  32. <textarea name="content" class="form-control" rows="3">{$info.content|default=''}</textarea>
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label class="col-sm-2 control-label">状态</label>
  37. <div class="col-sm-6">
  38. <label class="cr-inline">
  39. <input type="radio" value="1" name="enable">启用&nbsp;&nbsp;
  40. </label>
  41. <label class="cr-inline">
  42. <input type="radio" value="0" name="enable">禁用
  43. </label>
  44. </div>
  45. </div>
  46. <!-- {if isset($pid) && $pid == 1}-->
  47. <!-- <div class="form-group">-->
  48. <!-- <label class="col-sm-2 control-label">城市</label>-->
  49. <!-- <div class="col-sm-6">-->
  50. <!-- <select name="city_id" class="form-control">-->
  51. <!-- <option value="0">选择城市</option>-->
  52. <!-- {foreach $city as $k=>$v}-->
  53. <!-- <option value="{$v.id}">{$v.title}</option>-->
  54. <!-- {/foreach}-->
  55. <!-- </select>-->
  56. <!-- </div>-->
  57. <!-- </div>-->
  58. <!-- {/if}-->
  59. {if condition="$t == 2"}
  60. <div class="form-group">
  61. <label class="col-sm-2 control-label">地图标注</label>
  62. <div class="col-sm-6">
  63. {:widget_view('common/gdmap',['name'=>'location', 'val' => isset($info['location'])?$info['location']:''])}
  64. </div>
  65. </div>
  66. {/if}
  67. <div class="hr-line-dashed"></div>
  68. <div class="form-group">
  69. <div class="col-sm-6 col-sm-offset-2">
  70. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  71. </div>
  72. </div>
  73. </form>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. {/block}
  79. {block name="script"}
  80. <script>
  81. $(document).ready(function(){
  82. formSetValue("enable", {$info.enable|default=1});
  83. });
  84. $(document).ready(function(){
  85. formSetValue("city_id", {$info.city_id|default=0});
  86. });
  87. </script>
  88. {/block}