album_edit.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <div class="eject_con">
  2. <div id="warning"></div>
  3. <form id="category_form" method="post" target="_parent" action="{:url('Selleralbum/album_edit_save',['id'=>$class_info.aclass_id])}">
  4. <dl>
  5. <dt><i class="required">*</i>{$Think.lang.album_class_add_name}{$Think.lang.ds_colon}</dt>
  6. <dd>
  7. <input class="w300 text" type="text" name="name" id="name" value="{$class_info.aclass_name}" />
  8. </dd>
  9. </dl>
  10. <dl>
  11. <dt>{$Think.lang.album_class_add_des}{$Think.lang.ds_colon}</dt>
  12. <dd>
  13. <textarea rows="3" class="textarea w300" name="description" id="description">{$class_info.aclass_des}</textarea>
  14. </dd>
  15. </dl>
  16. <dl>
  17. <dt>{$Think.lang.album_class_add_sort}{$Think.lang.ds_colon}</dt>
  18. <dd>
  19. <input type="text" class="text w50" name="sort" id="sort" value="{$class_info.aclass_sort}" />
  20. </dd>
  21. </dl>
  22. <div class="bottom">
  23. <input type="submit" class="submit" value="{$Think.lang.album_class_add_submit}" />
  24. </div>
  25. </form>
  26. </div>
  27. <script type="text/javascript">
  28. $(function() {
  29. $('#category_form').validate({
  30. errorLabelContainer: $('#warning'),
  31. invalidHandler: function(form, validator) {
  32. $('#warning').show();
  33. },
  34. submitHandler: function(form) {
  35. ds_ajaxpost('category_form')
  36. },
  37. rules: {
  38. name: {
  39. required: true,
  40. maxlength: 20
  41. },
  42. description: {
  43. maxlength: 100
  44. },
  45. sort: {
  46. digits: true
  47. }
  48. },
  49. messages: {
  50. name: {
  51. required: '{$Think.lang.album_class_add_name_null}',
  52. maxlength: '{$Think.lang.album_class_add_name_max}'
  53. },
  54. description: {
  55. maxlength: '{$Think.lang.album_class_add_des_max}'
  56. },
  57. sort: {
  58. digits: '{$Think.lang.album_class_add_sort_digits}'
  59. }
  60. }
  61. });
  62. });
  63. </script>