Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
smart_core_connect
/
core-connect
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1029c169
authored
Jun 04, 2018
by
Teeradone Darunnat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teeradone แก้ไข alert
parent
7666d4de
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
41 deletions
+59
-41
www/src/Locale/en_EN/default.mo
+0
-0
www/src/Locale/en_EN/default.po
+9
-0
www/src/Locale/th_TH/default.mo
+0
-0
www/src/Locale/th_TH/default.po
+9
-0
www/src/Template/Users/change_forgotpassword.ctp
+7
-7
www/src/Template/Users/change_password.ctp
+7
-7
www/src/Template/Users/forgot_password.ctp
+2
-2
www/src/Template/Users/signup.ctp
+25
-25
No files found.
www/src/Locale/en_EN/default.mo
View file @
1029c169
No preview for this file type
www/src/Locale/en_EN/default.po
View file @
1029c169
...
...
@@ -435,3 +435,11 @@ msgstr "Verify Completed."
#: View/Users:325
msgid "Pin Code Invalid"
msgstr "Pin Code Invalid"
#: View/Users/changge_password:94
msgid "Please enter a old password."
msgstr "Please enter a old password."
#: View/Users/changge_password:99
msgid "Please enter a old password at least 8 characters."
msgstr "Please enter a old password at least 8 characters."
\ No newline at end of file
www/src/Locale/th_TH/default.mo
View file @
1029c169
No preview for this file type
www/src/Locale/th_TH/default.po
View file @
1029c169
...
...
@@ -455,3 +455,11 @@ msgstr "สมัครสมาชิกสำเร็จ"
#: View/Users:325
msgid "Pin Code Invalid"
msgstr "Pin Code ผิด"
#: View/Users/changge_password:94
msgid "Please enter a old password."
msgstr "กรุณากรอก รหัสผ่านเก่า"
#: View/Users/changge_password:99
msgid "Please enter a old password at least 8 characters."
msgstr "กรุณาระบุรหัสผ่านเก่าอย่างน้อย 8 ตัวอักษร"
\ No newline at end of file
www/src/Template/Users/change_forgotpassword.ctp
View file @
1029c169
...
...
@@ -46,7 +46,7 @@
var elem = document.getElementById('password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert(
<?php echo __('Please enter only English letters and numbers.');?>
);
alert(
"<?php echo __('Please enter only English letters and numbers.');?>"
);
return false;
}
})
...
...
@@ -55,7 +55,7 @@
var elem = document.getElementById('confirm_password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert(
<?php echo __('Please enter only English letters and numbers.');?>
);
alert(
"<?php echo __('Please enter only English letters and numbers.');?>"
);
return false;
}
})
...
...
@@ -64,26 +64,26 @@
var password = document.forms["changePressword"]["password"].value;
if (password == null || password == "") {
alert(
<?php echo __('Please enter a new password.');?>
);
alert(
"<?php echo __('Please enter a new password.');?>"
);
return false;
}
if(document.forms["changePressword"]["password"].value.length < 8)
{
alert(
<?php echo __('Please enter a new password at least 8 characters.');?>
);
alert(
"<?php echo __('Please enter a new password at least 8 characters.');?>"
);
return false;
}
var confirm_password = document.forms["changePressword"][["confirm_password"]].value;
if (confirm_password == null || confirm_password == "") {
alert(
<?php echo __('Please enter your password.');?>
);
alert(
"<?php echo __('Please enter your password.');?>"
);
return false;
}
if(document.forms["changePressword"]["confirm_password"].value.length < 8)
{
alert(
<?php echo __('Please enter at least 8 characters.');?>
);
alert(
"<?php echo __('Please enter at least 8 characters.');?>"
);
return false;
}
if(document.forms["changePressword"]["password"].value != document.forms["changePressword"]["confirm_password"].value){
alert(
<?php echo __('Please provide the same password.');?>
);
alert(
"<?php echo __('Please provide the same password.');?>"
);
//document.createAccount.confirm_password.focus();
return false;
}
...
...
www/src/Template/Users/change_password.ctp
View file @
1029c169
...
...
@@ -81,36 +81,36 @@
var password = document.forms["changePressword"]["oldpassword"].value;
if (password == null || password == "") {
alert("
กรุณากรอก รหัสผ่านเก่า
");
alert("
<?php echo __('Please enter a old password.');?>
");
return false;
}
if(document.forms["changePressword"]["oldpassword"].value.length < 8)
{
alert(
'กรุณาระบุรหัสผ่านเก่าอย่างน้อย 8 ตัวอักษร'
);
alert(
"<?php echo __('Please enter a old password at least 8 characters.');?>"
);
return false;
}
var password = document.forms["changePressword"]["password"].value;
if (password == null || password == "") {
alert("
กรุณากรอก รหัสผ่านใหม่
");
alert("
<?php echo __('Please enter a new password.');?>
");
return false;
}
if(document.forms["changePressword"]["password"].value.length < 8)
{
alert(
'กรุณาระบุรหัสผ่านใหม่อย่างน้อย 8 ตัวอักษร'
);
alert(
"<?php echo __('Please enter a new password at least 8 characters.');?>"
);
return false;
}
var confirm_password = document.forms["changePressword"][["confirm_password"]].value;
if (confirm_password == null || confirm_password == "") {
alert("
กรุณากรอก ยืนยันรหัสผ่าน
");
alert("
<?php echo __('Please enter your password.');?>
");
return false;
}
if(document.forms["changePressword"]["confirm_password"].value.length < 8)
{
alert(
'กรุณาระบุยืนยันรหัสผ่านอย่างน้อย 8 ตัวอักษร'
);
alert(
"<?php echo __('Please enter at least 8 characters.');?>"
);
return false;
}
if(document.forms["changePressword"]["password"].value != document.forms["changePressword"]["confirm_password"].value){
alert(
'กรุณาระบุรหัสผ่านให้ตรงกัน'
);
alert(
"<?php echo __('Please provide the same password.');?>"
);
//document.createAccount.confirm_password.focus();
return false;
}
...
...
www/src/Template/Users/forgot_password.ctp
View file @
1029c169
...
...
@@ -31,13 +31,13 @@
function validateForm() {
var email = document.forms["forgotPressword"]["email"].value;
if (email == null || email == "") {
alert(
<?php echo __('Please enter your email.');?>
);
alert(
"<?php echo __('Please enter your email.');?>"
);
return false;
}
// Validate Email
var email = $("#fremail").val();
if ((/(.+)@(.+){2,}\.(.+){2,}/.test(email)) || email=="" || email==null) { } else {
alert(
<?php echo __('Email address format wrong Please enter the correct.');?>
);
alert(
"<?php echo __('Email address format wrong Please enter the correct.');?>"
);
return false;
}
}
...
...
www/src/Template/Users/signup.ctp
View file @
1029c169
...
...
@@ -172,7 +172,7 @@
var elem = document.getElementById('username').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert(
<?php echo __("Please enter only text in English or numbers.");?>
);
alert(
"<?php echo __('Please enter only text in English or numbers.');?>"
);
return false;
}
})
...
...
@@ -181,7 +181,7 @@
var elem = document.getElementById('firstname').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9ก-๙])+$/i)){
alert(
<?php echo __("Please enter text in English, Thai or only.");?>
);
alert(
"<?php echo __('Please enter text in English, Thai or only.');?>"
);
return false;
}
})
...
...
@@ -190,7 +190,7 @@
var elem = document.getElementById('lastname').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9ก-๙])+$/i)){
alert(
<?php echo __("Please enter text in English, Thai or only.");?>
);
alert(
"<?php echo __('Please enter text in English, Thai or only.');?>"
);
return false;
}
})
...
...
@@ -199,7 +199,7 @@
var elem = document.getElementById('password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert(
<?php echo __("Please enter only text in English or numbers.");?>
);
alert(
"<?php echo __('Please enter only text in English or numbers.');?>"
);
return false;
}
})
...
...
@@ -208,7 +208,7 @@
var elem = document.getElementById('confirm_password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert(
<?php echo __("Please enter only text in English or numbers.");?>
);
alert(
"<?php echo __('Please enter only text in English or numbers.');?>"
);
return false;
}
})
...
...
@@ -219,7 +219,7 @@
// console.log(data);
data = jQuery.parseJSON(data);
if(data['chk'] == 'false'){
alert(
<?php echo __("This email is already in the system.");?>
);
alert(
"<?php echo __('This email is already in the system.');?>"
);
return false;
}
});
...
...
@@ -231,14 +231,14 @@
// if (((e_k < 48) || (e_k > 57)) && e_k != 46 ) {
if (e_k = 10 && (e_k < 48) || (e_k > 59)) {
event.returnValue = false;
alert("
Please enter the phone number. Only numbers.
");
alert("
<?php echo __('Please enter the phone number. Only numbers.');?>
");
}
}
function check_notnum() {
var letters = /^[A-Za-zก-๙]+$/;
if(letters.test( event.key )==false){
alert("
Please enter the correct Thai or English text.
");
alert("
<?php echo __('Please enter the correct Thai or English text.');?>
");
return false;
}
...
...
@@ -251,96 +251,96 @@
e_k = true;
}else{
e_k = false;
alert("
Please enter only English letters and numbers.
");
alert("
<?php echo __('Please enter only English letters and numbers.');?>
");
}
}
function validateForm() {
var firstname = document.getElementById("firstname").value;
if (firstname == null || firstname == "") {
alert("
Please enter your firstname.
");
alert("
<?php echo __('Please enter your firstname.');?>
");
return false;
}
var lastname = document.getElementById("lastname").value;
if (lastname == null || lastname == "") {
alert("
Please enter your lastname.
");
alert("
<?php echo __('Please enter your lastname.');?>
");
return false;
}
var username = document.getElementById("username").value;
if (username == null || username == "") {
alert("
Please enter your username.
");
alert("
<?php echo __('Please enter your username.');?>
");
return false;
}
if(document.getElementById("username").value.length < 4 || document.getElementById("username").value.length > 10)
{
alert(
'Please enter a 4-10 character username.'
);
alert(
"<?php echo __('Please enter a 4-10 character username.');?>"
);
return false;
}
var master_country_id = document.getElementById("master_country_id").value;
if (master_country_id == null || master_country_id == "") {
alert("
Please specify country
");
alert("
<?php echo __('Please specify country');?>
");
return false;
}
var master_province_id = document.getElementById("master_province_id").value;
if (master_province_id == null || master_province_id == "") {
alert("
Please specify province
");
alert("
<?php echo __('Please specify province');?>
");
return false;
}
var birthdate = document.getElementById("date").value;
if (birthdate == null || birthdate == "") {
alert("
Please enter the date of your birth.
");
alert("
<?php echo __('Please enter the date of your birth.');?>
");
return false;
}
var moblie_no = document.getElementById("moblie_no").value;
if (moblie_no == null || moblie_no == "") {
alert("
Please enter your phone number.
");
alert("
<?php echo __('Please enter your phone number.');?>
");
return false;
}
if(document.getElementById("moblie_no").value.length != 10)
{
alert(
'Please enter a 10 digit phone number.'
);
alert(
"<?php echo __('Please enter a 10 digit phone number.');?>"
);
return false;
}
var email = document.getElementById("fremail").value;
if (email == null || email == "") {
alert("
Please enter your email.
");
alert("
<?php echo __('Please enter your email.');?>
");
return false;
}
// Validate Email
var email = $("#fremail").val();
if (/(.+)@(.+){2,}\.(.+){2,}/.test(email)) { } else {
alert("
Wrong email address format Please enter the correct number.
");
alert("
<?php echo __('Wrong email address format Please enter the correct number.');?>
");
return false;
}
var password = document.getElementById("password").value;
if (password == null || password == "") {
alert("
Please enter your password.
");
alert("
<?php echo __('Please enter your password.');?>
");
return false;
}
if(document.forms["createAccount"]["password"].value.length < 8)
{
alert(
'Please enter at least 8 characters.'
);
alert(
"<?php echo __('Please enter at least 8 characters.');?>"
);
return false;
}
var confirm_password = document.getElementById("confirm_password").value;
if (confirm_password == null || confirm_password == "") {
alert("
Please verify your password.
");
alert("
<?php echo __('Please verify your password.');?>
");
return false;
}
if(confirm_password = document.getElementById("password").value != document.getElementById("confirm_password").value){
alert(
'Please provide your password.'
);
alert(
"<?php echo __('Please provide your password.');?>"
);
//document.createAccount.confirm_password.focus();
return false;
}
if($("#accept:checked").length==0){
alert("
Please accept the Terms of Use.
");
alert("
<?php echo __('Please accept the Terms of Use.');?>
");
return false;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment