group_manage_classedit.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php defined('InShopNC') or exit('Access Invalid!');?>
  2. <div class="eject_con">
  3. <div id="warning"></div>
  4. <form id="addclass_form" action="<?php echo CIRCLE_SITE_URL;?>/index.php?act=manage&op=class_edit&c_id=<?php echo $output['c_id'];?>" method="post" class="base-form-style">
  5. <input type="hidden" value="ok" name="form_submit">
  6. <input type="hidden" name="thc_id" value="<?php echo $output['thclass_info']['thclass_id'];?>" />
  7. <dl>
  8. <dt><?php echo $lang['circle_tclass_name'].$lang['nc_colon'];?></dt>
  9. <dd>
  10. <input type="text" name="name" class="w200 text" value="<?php echo $output['thclass_info']['thclass_name'];?>" />
  11. </dd>
  12. </dl>
  13. <dl>
  14. <dt><?php echo $lang['circle_tclass_sort'].$lang['nc_colon'];?></dt>
  15. <dd>
  16. <input type="text" name="sort" class="w50 text" value="<?php echo $output['thclass_info']['thclass_sort'];?>" />
  17. </dd>
  18. </dl>
  19. <dl>
  20. <dt><?php echo $lang['circle_tclass_status'].$lang['nc_colon'];?></dt>
  21. <dd>
  22. <input type="radio" name="status" value="1" <?php if($output['thclass_info']['thclass_status'] == 1){?>checked="checked"<?php }?> />
  23. <?php echo $lang['nc_yes'];?>&nbsp;
  24. <input type="radio" name="status" value="0" <?php if($output['thclass_info']['thclass_status'] == 0){?>checked="checked"<?php }?> />
  25. <?php echo $lang['nc_no'];?> </dd>
  26. </dl>
  27. <dl class="bottom">
  28. <dt>&nbsp;</dt>
  29. <dd><a class="submit-btn" nctype="submit-btn" href="Javascript: void(0)"><?php echo $lang['nc_submit'];?></a></dd>
  30. </dl>
  31. </form>
  32. </div>
  33. <script type="text/javascript">
  34. $(function(){
  35. $('a[nctype="submit-btn"]').click(function(){
  36. $('#addclass_form').submit();
  37. });
  38. $('#addclass_form').validate({
  39. errorLabelContainer: $('#warning'),
  40. invalidHandler: function(form, validator) {
  41. $('#warning').show();
  42. },
  43. submitHandler:function(form){
  44. ajaxpost('addclass_form', '<?php echo CIRCLE_SITE_URL;?>/index.php?act=manage&op=class_edit&c_id=<?php echo $output['c_id'];?>', '', 'onerror');
  45. },
  46. rules : {
  47. name : {
  48. required : true,
  49. maxlength : 4
  50. },
  51. sort : {
  52. required : true,
  53. digits : true,
  54. max : 255
  55. }
  56. },
  57. messages : {
  58. name : {
  59. required : '<?php echo $lang['circle_tclass_name_not_null'];?>',
  60. maxlength : '<?php echo $lang['circle_tclass_man_maxlength'];?>'
  61. },
  62. sort : {
  63. required : '<?php echo $lang['circle_tclass_sort_not_null'];?>',
  64. digits : '<?php echo $lang['circle_tclass_sort_is_digits'];?>',
  65. max : '<?php echo $lang['circle_tclass_sort_max'];?>'
  66. }
  67. }
  68. });
  69. });
  70. </script>