0
0

add.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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-title">-->
  7. <!--<h5>{$title}</h5>-->
  8. <!--<div class="ibox-tools">-->
  9. <!--<a class="toback" href="{:url('index')}">-->
  10. <!--返回上一页-->
  11. <!--</a>-->
  12. <!--</div>-->
  13. <!--</div>-->
  14. <div class="ibox-content">
  15. <form method="post" action="{:url('add')}" class="form-horizontal">
  16. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  17. <div class="form-group">
  18. <label class="col-sm-2 control-label">名称<span class="text-danger">*</span></label>
  19. <div class="col-sm-6">
  20. <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <label class="col-sm-2 control-label">考勤范围(米)<span class="text-danger">*</span></label>
  25. <div class="col-sm-6">
  26. <select name="distance" class="form-control">
  27. <option value="100">100</option>
  28. <option value="200">200</option>
  29. <option value="300">300</option>
  30. <option value="500">500</option>
  31. <option value="800">800</option>
  32. <option value="1000">1000</option>
  33. <option value="1500">1500</option>
  34. <option value="2000">2000</option>
  35. <option value="2500">2500</option>
  36. <option value="3000">3000</option>
  37. </select>
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label class="col-sm-2 control-label">地图标注</label>
  42. <div class="col-sm-6">
  43. {:widget_view('common/gdmap',['name'=>'latlng', 'val' => isset($info['latlng'])&&!empty($info['latlng'])?$info['latlng']:''])}
  44. </div>
  45. </div>
  46. <div class="hr-line-dashed"></div>
  47. <div class="form-group">
  48. <div class="col-sm-6 col-sm-offset-2">
  49. <button class="btn btn-primary ajax-post" data-layer_c="1" target-form="form-horizontal" type="submit">确 定</button>
  50. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  51. </div>
  52. </div>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. {/block}
  59. {block name="script"}
  60. <script>
  61. $(document).ready(function(){
  62. formSetValue("enable", {$info.enable|default=1});
  63. });
  64. $(document).ready(function(){
  65. formSetValue("distance", {$info.distance|default='100'});
  66. });
  67. var val=$('#value').attr('value');
  68. document.getElementById("value").value=val;
  69. </script>
  70. {/block}