Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

second_verify_add.htm 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width: auto;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="min-width: auto;box-shadow:none;">
  6. <!-- 操作说明 -->
  7. <div id="explanation" class="explanation">
  8. <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
  9. <h4 title="提示相关设置操作时应注意的要点">提示</h4>
  10. <span title="收起提示" id="explanationZoom" style="display: block;"></span>
  11. </div>
  12. <ul>
  13. <li>安全验证:请设置并记住安全问题/答案,部分功能将进行答案验证。</li>
  14. </ul>
  15. </div>
  16. <form class="form-horizontal" id="post_form" method="post" onsubmit="return false;">
  17. <div class="ncap-form-default">
  18. <dl class="row">
  19. <dt class="tit">
  20. <label for="ask"><em>*</em>安全问题列表</label>
  21. </dt>
  22. <dd class="opt" style="width: auto;">
  23. <select name="ask" id="ask" class="w210">
  24. <option value="-1">请选择…</option>
  25. {volist name='$security_askanswer_list' id='vo'}
  26. <option value="{$key}">{$vo}</option>
  27. {/volist}
  28. </select>
  29. <span class="err"></span>
  30. <p class="notic"></p>
  31. </dd>
  32. </dl>
  33. <dl class="row">
  34. <dt class="tit">
  35. <label for="answer"><em>*</em>设置答案内容</label>
  36. </dt>
  37. <dd class="opt" style="width: auto;">
  38. <input type="text" name="answer" value="" id="answer" class="w200" autocomplete="off">
  39. <span class="err"></span>
  40. <p class="notic"></p>
  41. </dd>
  42. </dl>
  43. <div class="bot" style="padding-bottom:0px;">
  44. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  45. </div>
  46. </div>
  47. </form>
  48. </div>
  49. <script type="text/javascript">
  50. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  51. $("body").bind('keydown', function(event){
  52. if(event.keyCode ==13){
  53. checkForm();
  54. }
  55. });
  56. var security_ask = '';
  57. $(function(){
  58. $('#ask').change(function(){
  59. $('input[name=answer]').focus();
  60. security_ask = $(this).find("option:selected").text();
  61. });
  62. });
  63. function checkForm()
  64. {
  65. if($('select[name=ask]').val() < 0){
  66. showErrorMsg('请选择安全问题…');
  67. $('select[name=ask]').focus();
  68. return false;
  69. }
  70. if($('input[name=answer]').val() == ''){
  71. showErrorMsg('答案内容不能为空!');
  72. $('input[name=answer]').focus();
  73. return false;
  74. }
  75. layer_loading('正在处理');
  76. $.ajax({
  77. url: "{:url('Security/second_verify_add', ['_ajax'=>1])}",
  78. type: 'POST',
  79. dataType: 'JSON',
  80. data: $('#post_form').serialize(),
  81. success: function(res) {
  82. layer.closeAll();
  83. if (res.code == 1) {
  84. var _parent = parent;
  85. var documentOjb = window.parent.document;
  86. _parent.layer.close(parentObj);
  87. _parent.layer.msg(res.msg, {shade: 0.1, time: 1000}, function(){
  88. $("#second_verify_add", documentOjb).hide();
  89. $("#second_verify_edit", documentOjb).show();
  90. $("#is_ask_add_edit", documentOjb).val('edit');
  91. $("#security_ask_content", documentOjb).val(security_ask);
  92. });
  93. } else {
  94. showErrorMsg(res.msg);
  95. }
  96. },
  97. error: function(e){
  98. layer.closeAll();
  99. showErrorAlert(e.responseText);
  100. }
  101. });
  102. }
  103. </script>
  104. {include file="public/footer" /}