Fix bug.
Add ticket status setting. Display all items in email. Fix order bug, Add required setting.
This commit is contained in:
1 parent
164357aedf
commit
92285feef3
24 files changed
+1055
-285
No files matched your search
@@ -75,20 +75,29 @@
|
||||
}
|
||||
})
|
||||
$(document).ready(function(){
|
||||
function scrollIntoView(selector, offset = 0) {
|
||||
window.scroll(0, document.querySelector(selector).offsetTop - offset);
|
||||
}
|
||||
var email_regex = "{{email_regex}}";
|
||||
if(email_regex.length != 0){
|
||||
email_regex = new RegExp(email_regex);
|
||||
var submit_flag = false;
|
||||
$(".ask-question-form").each(function(i, form){
|
||||
var $form = $(form);
|
||||
if($form.length != 0 && $form.find('#ask_question_mail').length != 0){
|
||||
var email_field = $form.find('#ask_question_mail');
|
||||
if($form.length != 0 && email_field.length != 0){
|
||||
$form.submit(function(){
|
||||
if(!submit_flag){
|
||||
submit_flag = true;
|
||||
if(email_regex.test($form.find('#ask_question_mail').val())){
|
||||
if(email_regex.test(email_field.val())){
|
||||
submit_flag = false;
|
||||
}else{
|
||||
email_field.css("border", "2px solid red");
|
||||
scrollIntoView('#ask_question_mail');
|
||||
alert("<%=t('ask.please_check_email_format')%>");
|
||||
email_field.one("input",function(){
|
||||
email_field.css("border", "");
|
||||
})
|
||||
submit_flag = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user