人人商城

area.html 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {template '_header'}
  2. <div class="page-heading"> <h2>地址库设置</h2> </div>
  3. <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >
  4. <div class="form-group">
  5. <label class="col-sm-2 control-label">地址库选择</label>
  6. <div class="col-sm-9 col-xs-12">
  7. {ifp 'sysset.area.edit'}
  8. <label class="radio-inline">
  9. <input type="radio" name="data[new_area]" class="new_area" value="0" {if empty($data['new_area'])}checked{else}disabled{/if} /> 旧版
  10. </label>
  11. <label class="radio-inline">
  12. <input type="radio" name="data[new_area]" class="new_area" value="1" {if $data['new_area']==1}checked disabled{/if} /> 新版(数据更新并含街道信息)
  13. </label>
  14. <span class='help-block'>新版与旧版数据不兼容,开启后,用户地址库将被清空,并且不能再切换回旧版,请谨慎选择!</span>
  15. {else}
  16. <input type="hidden" name="data[new_area]" value="{$data['new_area']}" />
  17. <div class='form-control-static'>{if empty($data['new_area'])}旧版{else}新版{/if}</div>
  18. {/if}
  19. </div>
  20. </div>
  21. <div class="form-group street-group" {if empty($data['new_area'])}style="display:none;"{/if}>
  22. <label class="col-sm-2 control-label">收货地址库是否开启街道</label>
  23. <div class="col-sm-9 col-xs-12">
  24. {ifp 'sysset.area.edit'}
  25. <label class="radio-inline">
  26. <input type="radio" name="data[address_street]" value="0" {if empty($data['address_street'])}checked{/if} /> 关闭
  27. </label>
  28. <label class="radio-inline">
  29. <input type="radio" name="data[address_street]" value="1" {if $data['address_street']==1}checked{/if} /> 开启
  30. </label>
  31. {else}
  32. <input type="hidden" name="data[address_street]" value="{$data['address_street']}" />
  33. <div class='form-control-static'>{if empty($data['address_street'])}关闭{else}开启{/if}</div>
  34. {/if}
  35. </div>
  36. </div>
  37. <div class="form-group"></div>
  38. <div class="form-group">
  39. <label class="col-sm-2 control-label"></label>
  40. <div class="col-sm-9 col-xs-12">
  41. {ifp 'sysset.area.edit'}
  42. <input type="submit" value="提交" class="btn btn-primary" />
  43. {/if}
  44. </div>
  45. </div>
  46. </form>
  47. <script language="javascript">
  48. $(function () {
  49. $('.new_area').click(function () {
  50. var type = $(".new_area:checked").val();
  51. if (type == '1') {
  52. $('.street-group').show();
  53. } else {
  54. $('.street-group').hide();
  55. }
  56. });
  57. })
  58. </script>
  59. {template '_footer'}