daddress_add.html 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <div class="eject_con">
  2. <div id="warning" class="alert alert-error"></div>
  3. <form method="post" action="{:url('Sellerdeliverset/daddress_add',['address_id'=>$address_info.daddress_id])}" id="address_form" target="_parent">
  4. <input type="hidden" value="{$address_info.city_id}" name="city_id" id="_area_2">
  5. <input type="hidden" value="{$address_info.area_id}" name="area_id" id="_area">
  6. <input type="hidden" name="address_id" value="{$address_info.daddress_id}" />
  7. <dl>
  8. <dt><i class="required">*</i>{$Think.lang.store_daddress_receiver_name} {$Think.lang.ds_colon}</dt>
  9. <dd>
  10. <input type="text" class="text" name="seller_name" value="{$address_info.seller_name}"/>
  11. </dd>
  12. </dl>
  13. <dl>
  14. <dt><i class="required">*</i>{$Think.lang.store_daddress_location}{$Think.lang.ds_colon}</dt>
  15. <dd>
  16. <div>
  17. <input type="hidden" name="region" id="region" value="{$address_info.area_info}"/>
  18. </div>
  19. </dd>
  20. </dl>
  21. <dl>
  22. <dt><i class="required">*</i>{$Think.lang.store_daddress_address}{$Think.lang.ds_colon}</dt>
  23. <dd>
  24. <input class="text w300" type="text" name="address" value="{$address_info.daddress_detail}"/>
  25. <p class="hint">{$Think.lang.store_daddress_not_repeat}</p>
  26. </dd>
  27. </dl>
  28. <dl>
  29. <dt><i class="required">*</i>{$Think.lang.store_daddress_phone_num}{$Think.lang.ds_colon}</dt>
  30. <dd>
  31. <input type="text" class="text" name="telphone" value="{$address_info.daddress_telphone}"/>
  32. </dd>
  33. </dl>
  34. <dl>
  35. <dt class="required">{$Think.lang.store_daddress_company}{$Think.lang.ds_colon}</dt>
  36. <dd>
  37. <input type="text" class="text" name="company" value="{$address_info.daddress_company}"/>
  38. </dd>
  39. </dl>
  40. <div class="bottom">
  41. <input type="submit" class="submit" value="{$Think.lang.ds_common_button_save}" />
  42. </div>
  43. </form>
  44. </div>
  45. <script>
  46. $(document).ready(function () {
  47. $("#region").ds_region();
  48. $('#address_form').validate({
  49. errorLabelContainer: $('#warning'),
  50. invalidHandler: function (form, validator) {
  51. var errors = validator.numberOfInvalids();
  52. if (errors)
  53. {
  54. $('#warning').show();
  55. } else
  56. {
  57. $('#warning').hide();
  58. }
  59. },
  60. submitHandler: function (form) {
  61. ds_ajaxpost('address_form');
  62. },
  63. rules: {
  64. seller_name: {
  65. required: true
  66. },
  67. region: {
  68. checklast: true
  69. },
  70. address: {
  71. required: true
  72. },
  73. telphone: {
  74. required: true,
  75. minlength: 6
  76. }
  77. },
  78. messages: {
  79. seller_name: {
  80. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_daddress_input_receiver}'
  81. },
  82. region: {
  83. checklast: '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_select_complete_area}'
  84. },
  85. address: {
  86. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_daddress_input_address}'
  87. },
  88. telphone: {
  89. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_daddress_phone_rule}',
  90. minlength: '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_daddress_phone_rule}'
  91. }
  92. }
  93. });
  94. });
  95. </script>