group_apply.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php defined('InShopNC') or exit('Access Invalid!');?>
  2. <div class="eject_con group_apply">
  3. <div id="apply_warning"></div>
  4. <form id="apply_form" action="<?php echo CIRCLE_SITE_URL;?>/index.php?act=group&op=apply&c_id=<?php echo $output['c_id'];?>" method="post">
  5. <input type="hidden" name="form_submit" value="ok" />
  6. <dl>
  7. <dt><?php echo $lang['circle_apply_to_join'].$lang['nc_quote1'].$output['circle_info']['circle_name'].$lang['nc_quote1'].$lang['circle_of_reason'];?></dt>
  8. <dd>
  9. <h4><i class="a"></i><?php echo $lang['circle_join_tips_h4'];?></h4>
  10. <h5><?php echo $lang['circle_join_tips_h5'];?></h5>
  11. <textarea name="apply_content" class="textarea"></textarea>
  12. </dd>
  13. </dl>
  14. <dl>
  15. <dt><?php echo $lang['circle_newbie_introduction'];?></dt>
  16. <dd>
  17. <h4><i class="b"></i><?php echo $lang['circle_introduction_desc'];?></h4>
  18. <h5><?php echo $lang['circle_introduction_example'];?></h5>
  19. <textarea name="intro" class="textarea"></textarea>
  20. </dd>
  21. </dl>
  22. <div class="bottom"> <a class="submit-btn" nctype="apply_submit" href="Javascript: void(0)"><?php echo $lang['circle_submit_applications'];?></a><a class="cancel-btn" nctype="apply_cancel" href="Javascript: void(0)"><?php echo $lang['nc_cancel'];?></a>
  23. </div>
  24. </form>
  25. </div>
  26. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.validation.min.js"></script>
  27. <script type="text/javascript">
  28. $(function(){
  29. $('a[nctype="apply_submit"]').click(function(){
  30. if($("#apply_form").valid()){
  31. $("#apply_form").submit();
  32. }
  33. });
  34. $('a[nctype="apply_cancel"]').click(function(){
  35. DialogManager.close('apply_join');
  36. });
  37. $('#apply_form').validate({
  38. errorLabelContainer: $('#apply_warning'),
  39. invalidHandler: function(form, validator) {
  40. $('#apply_warning').show();
  41. },
  42. submitHandler:function(form){
  43. ajaxpost('apply_form', '<?php echo CIRCLE_SITE_URL;?>/index.php?act=group&op=apply&c_id=<?php echo $output['c_id'];?>', '', 'onerror');
  44. },
  45. rules : {
  46. apply_content : {
  47. required : true,
  48. maxlength : 140
  49. },
  50. intro : {
  51. required : true,
  52. maxlength : 140
  53. }
  54. },
  55. messages : {
  56. apply_content : {
  57. required : '<?php echo $lang['circle_apply_content_null'];?>',
  58. maxlength : '<?php echo $lang['circle_apply_content_maxlength'];?>'
  59. },
  60. intro : {
  61. required : '<?php echo $lang['circle_introduction_not_null'];?>',
  62. maxlength : '<?php echo $lang['circle_introduction_maxlength'];?>'
  63. }
  64. }
  65. });
  66. });
  67. </script>