fix change catagory
This commit is contained in:
parent
3c36680779
commit
cbb211401b
|
@ -164,9 +164,9 @@ $(document).ready(function(){
|
||||||
var submit_flag = false;
|
var submit_flag = false;
|
||||||
$(".ask-question-form").each(function(i, form){
|
$(".ask-question-form").each(function(i, form){
|
||||||
var $form = $(form);
|
var $form = $(form);
|
||||||
var email_field = $form.find('#ask_question_mail');
|
if($form.length != 0 && $form.find('#ask_question_mail').length != 0){
|
||||||
if($form.length != 0 && email_field.length != 0){
|
|
||||||
$form.submit(function(){
|
$form.submit(function(){
|
||||||
|
var email_field = $(this).find('#ask_question_mail');
|
||||||
if(!submit_flag){
|
if(!submit_flag){
|
||||||
submit_flag = true;
|
submit_flag = true;
|
||||||
if(email_regex.test(email_field.val())){
|
if(email_regex.test(email_field.val())){
|
||||||
|
@ -188,4 +188,4 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue