From cbb211401bbdb4715c6e56ae16d93e4aa82abb40 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Tue, 30 May 2023 21:19:43 +0800 Subject: [PATCH] fix change catagory --- app/views/asks/index.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/asks/index.html.erb b/app/views/asks/index.html.erb index dbded2f..9ba067b 100644 --- a/app/views/asks/index.html.erb +++ b/app/views/asks/index.html.erb @@ -164,9 +164,9 @@ $(document).ready(function(){ var submit_flag = false; $(".ask-question-form").each(function(i, form){ var $form = $(form); - var email_field = $form.find('#ask_question_mail'); - if($form.length != 0 && email_field.length != 0){ + if($form.length != 0 && $form.find('#ask_question_mail').length != 0){ $form.submit(function(){ + var email_field = $(this).find('#ask_question_mail'); if(!submit_flag){ submit_flag = true; if(email_regex.test(email_field.val())){ @@ -188,4 +188,4 @@ $(document).ready(function(){ } }) -<% end %> \ No newline at end of file +<% end %>