add.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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('add')}" class="form-horizontal">
  8. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  9. <input type="hidden" name="plan_id" value="{$pid|default='0'}">
  10. <div class="form-group">
  11. <label class="col-sm-2 control-label">位置名称<span class="text-danger">*</span></label>
  12. <div class="col-sm-6">
  13. {:widget('common/select',['name'=>'addr_id','lists'=>$address,'value'=>isset($info)?$info.addr_id:''])}
  14. </div>
  15. </div>
  16. <div class="form-group">
  17. <label class="col-sm-2 control-label">排序<span class="text-danger">*</span></label>
  18. <div class="col-sm-6">
  19. <input type="text" class="form-control" name="sort" value="{$info.sort||default=''}">
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label class="col-sm-2 control-label">备注</label>
  24. <div class="col-sm-6">
  25. <input type="text" class="form-control" name="remark" value="{$info.remark||default=''}">
  26. </div>
  27. </div>
  28. <div class="hr-line-dashed"></div>
  29. <div class="form-group">
  30. <div class="col-sm-6 col-sm-offset-2">
  31. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  32. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  33. </div>
  34. </div>
  35. </form>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. {/block}
  41. {block name="script"}
  42. <script>
  43. $(document).ready(function(){
  44. formSetValue("enable", {$info.enable|default=1});
  45. });
  46. </script>
  47. {/block}