consult_reply.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <div class="eject_con">
  2. <div id="warning" class="alert alert-error"></div>
  3. <form id="message" target="_parent" method="post" action="{:url('Sellerconsult/reply_save',['consult_id'=>$consult.consult_id])}">
  4. <input type="hidden" name="type" value="{$consult.consult_reply == '' ?'reply':'edit'}"/>
  5. <dl>
  6. <dt>{$Think.lang.store_consult_list_consult_content}{$Think.lang.ds_colon}</dt>
  7. <dd><p style="line-height: 18px;">{:nl2br($consult.consult_content)}</p></dd>
  8. </dl>
  9. <dl>
  10. <dt><i class="required">*</i>{$Think.lang.store_consult_list_reply_consult}{$Think.lang.ds_colon}</dt>
  11. <dd>
  12. <input type="hidden" id="consult_id" name="consult_id" value="{$consult.consult_id}"/>
  13. <textarea name="content" rows="3" class="w300" maxlength="150">{:nl2br($consult.consult_reply)}</textarea>
  14. </dd>
  15. </dl>
  16. <div class="bottom">
  17. <input type="submit" class="submit" value="{$Think.lang.ds_ok}" />
  18. </div>
  19. </form>
  20. </div>
  21. <script>
  22. $(function(){
  23. $('#message').validate({
  24. errorLabelContainer: $('#warning'),
  25. submitHandler:function(form){
  26. ds_ajaxpost('message');
  27. },
  28. invalidHandler: function(form, validator) {
  29. var errors = validator.numberOfInvalids();
  30. if(errors)
  31. {
  32. $('#warning').show();
  33. }
  34. else
  35. {
  36. $('#warning').hide();
  37. }
  38. },
  39. rules : {
  40. content : {
  41. required : true,
  42. maxlength: 200
  43. }
  44. },
  45. messages : {
  46. content : {
  47. required : '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_consult_reply_input_content}',
  48. maxlength: '<i class="iconfont">&#xe64c;</i>{$Think.lang.store_consult_reply_input_content_tip}'
  49. }
  50. }
  51. });
  52. });
  53. </script>