navigation_form.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_main"}
  3. <div class="dssc-form-default">
  4. <form method="post" action="{:url('Sellernavigation/navigation_save')}" target="_parent" name="store_navigation_form" id="store_navigation_form" enctype="multipart/form-data">
  5. <input type="hidden" name="storenav_id" value="{$sn_info.storenav_id}"/>
  6. <dl>
  7. <dt><i class="required">*</i>{$Think.lang.store_navigation_name}{$Think.lang.ds_colon}</dt>
  8. <dd>
  9. <input type="text" class="w150 text" name="storenav_title" value="{$sn_info.storenav_title}" /><span></span>
  10. </dd>
  11. </dl>
  12. <dl>
  13. <dt>{$Think.lang.store_goods_class_sort}{$Think.lang.ds_colon}</dt>
  14. <dd>
  15. <input type="text" class="w50 text" name="storenav_sort" value="{if $sn_info.storenav_sort neq ''}{$sn_info.storenav_sort}{else}255{/if}"/>
  16. </dd>
  17. </dl>
  18. <dl>
  19. <dt>{$Think.lang.store_navigation_content}{$Think.lang.ds_colon}</dt>
  20. <dd>
  21. {$build_editor|raw}
  22. <textarea id="storenav_content" name="storenav_content"></textarea>
  23. </dd>
  24. </dl>
  25. <dl>
  26. <dt>{$Think.lang.store_navigation_url}{$Think.lang.ds_colon}</dt>
  27. <dd>
  28. <p>
  29. <input type="text" class="w300 text" name="storenav_url" value="{$sn_info.storenav_url}" />
  30. </p>
  31. <p class="hint">{$Think.lang.store_navigation_url_tip}</p>
  32. </dd>
  33. </dl>
  34. <div class="bottom">
  35. <input type="submit" class="submit" value="{$Think.lang.store_goods_class_submit}" />
  36. </div>
  37. </form>
  38. </div>
  39. <script type="text/javascript">
  40. $(document).ready(function () {
  41. //页面输入内容验证
  42. $('#store_navigation_form').validate({
  43. errorPlacement: function (error, element) {
  44. var error_td = element.parent('dd').children('span');
  45. error_td.append(error);
  46. },
  47. submitHandler:function(form){
  48. ds_ajaxpost('store_navigation_form','url','{:url('Sellernavigation/index')}')
  49. },
  50. rules: {
  51. storenav_title: {
  52. required: true,
  53. maxlength: 10
  54. }
  55. },
  56. messages: {
  57. storenav_title: {
  58. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_navigation_name_null}',
  59. maxlength: '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_navigation_name_max}'
  60. }
  61. }
  62. });
  63. });
  64. </script>
  65. {/block}