Commit 97b57f7e by Prasong Putichanchai

Merge branch 'integration' into prasong

parents a2c840d2 af9675dc
......@@ -434,4 +434,12 @@ msgstr "Verify Completed."
#: View/Users:325
msgid "Pin Code Invalid"
msgstr "Pin Code Invalid"
\ No newline at end of file
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
......@@ -454,4 +454,12 @@ msgstr "สมัครสมาชิกสำเร็จ"
#: View/Users:325
msgid "Pin Code Invalid"
msgstr "Pin Code ผิด"
\ No newline at end of file
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
......@@ -64,6 +64,7 @@
$(document).ready(function () {
$("#organize_code").on('change', function () {
console.log('sss');
var organize_code = $("#organize_code").val();
$('#employee').attr("disabled", true);
$('#date').attr("disabled", true);
......@@ -78,7 +79,7 @@
data = jQuery.parseJSON(data);
if (data['chkuser'] == true) {
$("#noorg_th").text('');
$("#noorg_th").text("<?php echo __('Register with') ?> + data[0]['org_name_th'] + <?php echo __('already') ?>");
$("#noorg_th").text("<?php echo __('Register with') ?>" + data[0]['org_name_th'] + "<?php echo __('already') ?>");
$("#nameorg_th").text('');
$('#employee').attr("disabled", true);
organize_id.val('');
......@@ -129,7 +130,7 @@
}
} else {
$("#noepm_th").text('');
$("#noepm_th").text("<?php echo __('"Did not find the information you need", Please enter the correct information and press the check.') ?>");
$("#noepm_th").text('<?php echo __('"Did not find the information you need", Please enter the correct information and press the check.') ?>');
$("#nameemp_th").text('');
$('#date').attr("disabled", true);
date.val('');
......@@ -151,17 +152,17 @@
function check() {
if ($("#organize_code").val() == '') {
alert(<?php echo __('Please enter Company Code.') ?>);
alert("<?php echo __('Please enter Company Code') ?>");
organize_id.focus();
return false;
}
if (employee.val() == '') {
alert(<?php echo __('Please enter Ref1.') ?>);
alert("<?php echo __('Please enter Ref1') ?>");
employee.focus();
return false;
}
if (date.val() == '') {
alert(<?php echo __('Please enter Ref2.') ?>);
alert("<?php echo __('Please enter Ref2') ?>");
date.focus();
return false;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment