requestUpdate.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <style>
  2. .right-content{
  3. padding-top:54px!important; padding-left:0!important; width:970px!important;
  4. }
  5. </style>
  6. <div class="content">
  7. <% include ../leftBar.html %>
  8. <!-- right content start -->
  9. <div class="right-content myProfile" style="min-height: 700px;">
  10. <div class="pageInfo">My Profile</div>
  11. <div id="tabs-container" style="display: block;">
  12. <% include topBar.html %>
  13. <div class="clear"></div>
  14. <div id="numberOne" class="updateProfile">
  15. <div class="title">What do you want to change?</div>
  16. <div class="updateProfileRadio">
  17. <label><input class="updateProfileType" name="type" type="radio" checked="checked" value="3" />Change nickname</label><br><br>
  18. <label><input class="updateProfileType" name="type" type="radio" value="4" />Change profile information <span style="color: #BCBCBC;">(Except nickname)</span></label>
  19. <div class="updateProfileContinue numberOneContinue cursor">Continue</div>
  20. </div>
  21. </div>
  22. <div id="numberTwo" class="updateProfile" style="height: 350px; display: none;">
  23. <div class="title">Nickname change request</div>
  24. <div class="numberTwoBlock">
  25. <span class="numberTwoBlockTitle" style="">Your current nickname</span><br><br>
  26. <span class="numberTwoBlockNick_name"><%=anchorInfo.nick_name%></span><br><br>
  27. <span class="numberTwoBlockTitle" style="">New nickname</span><br>
  28. <input class="numberTwoBlockNicknameInput" type="text" name="nickname"><br><br>
  29. <span class="numberTwoBlockTitle" style="">Describe your reason</span><br>
  30. <textarea class="numberTwoBlockDescription" name="description"></textarea>
  31. <div class="updateProfileContinue numberTwoContinue cursor" style="margin-top: 10px;">Submit</div>
  32. </div>
  33. </div>
  34. <div id="numberThree" class="updateProfile" style="height: 250px; display: none;">
  35. <div class="title">Profile information change request</div>
  36. <div class="numberTwoBlock">
  37. <span class="numberTwoBlockTitle" style="">Description what do you want to change here</span><br><br>
  38. <textarea class="numberTwoBlockDescription" name="descriptionThree"></textarea>
  39. <div class="updateProfileContinue numberThreeContinue cursor" style="margin-top: 10px;">Submit</div>
  40. </div>
  41. </div>
  42. <div class="clear"></div>
  43. </div>
  44. <div class="agency">
  45. Note: If you have any questions, please consult your agency.<br>
  46. Your agency: <%=agency.name%>
  47. </div>
  48. </div>
  49. <!-- right content end -->
  50. </div>
  51. <script>
  52. $(function(){
  53. $('.numberOneContinue').click(function(){
  54. var checked = $('input[name="type"]:checked').val();
  55. if(checked == 3){
  56. $('#numberTwo').show();
  57. $('#numberOne').hide();
  58. }else if(checked == 4){
  59. $('#numberThree').show();
  60. $('#numberOne').hide();
  61. }else {
  62. return false;
  63. }
  64. })
  65. $('.numberTwoContinue').click(function(){
  66. var nickname = $('input[name="nickname"]').val();
  67. var nicknameLength = nickname.length;
  68. var description = $('textarea[name="description"]').val();
  69. if(!nickname){
  70. myParentAlert('Please add a new nickname');
  71. return false;
  72. }
  73. if(!description){
  74. myParentAlert('Please describe your reasons of this change.');
  75. return false;
  76. }
  77. if(nicknameLength < 4 || nicknameLength > 24){
  78. myParentAlert('Nickname must be 4 - 24 characters.');
  79. return false;
  80. }
  81. $.post('/broadcast/profileLayer/editName',{nickName:nickname,description:description},function(data){
  82. if(data.errno == 0){
  83. window.location.href = '/broadcast/updateProfile/requestUpdateList';
  84. }else{
  85. myParentAlert(data.data);
  86. }
  87. })
  88. })
  89. $('.numberThreeContinue').click(function(){
  90. var description = $('textarea[name="descriptionThree"]').val();
  91. if(!description){
  92. myParentAlert('Description what do you want to change here');
  93. return false;
  94. }
  95. $.post('/broadcast/profileLayer/description',{description:description},function(data){
  96. if(data.errno == 0){
  97. window.location.href = '/broadcast/updateProfile/requestUpdateList';
  98. }else{
  99. myParentAlert(data.data);
  100. }
  101. })
  102. })
  103. })
  104. </script>