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
b2aba42a
authored
Jun 01, 2018
by
Teeradone Darunnat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teeradone register
parent
9a435aea
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
313 additions
and
67 deletions
+313
-67
www/src/Controller/UsersController.php
+3
-3
www/src/Locale/en_EN/default.mo
+0
-0
www/src/Locale/en_EN/default.po
+119
-2
www/src/Locale/th_TH/default.mo
+0
-0
www/src/Locale/th_TH/default.po
+120
-3
www/src/Template/Users/forgot_password.ctp
+25
-8
www/src/Template/Users/pin_code.ctp
+3
-3
www/src/Template/Users/signup.ctp
+43
-48
No files found.
www/src/Controller/UsersController.php
View file @
b2aba42a
...
...
@@ -245,10 +245,10 @@ class UsersController extends AppController {
return
$this
->
redirect
([
'controller'
=>
'Users'
,
'action'
=>
'pinCode/'
.
$users
[
'token'
]]);
// return $this->redirect(['action' => 'signin']);
}
$this
->
Flash
->
error
(
__
(
'
Username or Email Address already used by others
.'
));
$this
->
Flash
->
error
(
__
(
'
This email is already in the system
.'
));
return
$this
->
redirect
([
'action'
=>
'signup'
]);
}
else
if
(
empty
(
$this
->
request
->
data
[
'accept'
]))
{
$this
->
Flash
->
error
(
__
(
'
please accept
'
));
$this
->
Flash
->
error
(
__
(
'
Please accept the Terms of Use.
'
));
return
$this
->
redirect
([
'action'
=>
'signup'
]);
}
$this
->
Flash
->
error
(
__
(
'The article could not be saved. Please, try again.'
));
...
...
@@ -361,7 +361,7 @@ class UsersController extends AppController {
//pr($user_personals);die;
$data_notification
=
[];
$data_notification
[
'email'
]
=
$this
->
request
->
data
[
'email'
];
$data_notification
[
'pin_code'
]
=
$users
[
'pin_pass'
];
$data_notification
[
'pin_code'
]
=
$users
[
'pin_pass'
]
.
'<br>Username:'
.
$users
[
'username'
]
;
$this
->
notification
(
$data_notification
);
//----------------------------------------------------------------------------------------
$this
->
Users
->
save
(
$users
);
...
...
www/src/Locale/en_EN/default.mo
View file @
b2aba42a
No preview for this file type
www/src/Locale/en_EN/default.po
View file @
b2aba42a
...
...
@@ -24,6 +24,7 @@ msgid "username"
msgstr "Username"
#: Controller/ProfilesController.php/index.ctp:68,69
#: View/Users/signup:13
msgid "firstname"
msgstr "Firstname"
...
...
@@ -72,6 +73,8 @@ msgid "SAVE"
msgstr "SAVE"
#: Controller/ProfilesController.php/index.ctp:226
#: View/Users:248
#: View/Users/signup:222
msgid "This email is already in the system."
msgstr "This email is already in the system."
...
...
@@ -80,14 +83,17 @@ msgid "only numbers"
msgstr "Please enter only numbers"
#: Controller/ProfilesController.php/index.ctp:244
#: View/Users/signup:261
msgid "Please enter your firstname."
msgstr "Please enter your firstname."
#: Controller/ProfilesController.php/index.ctp:249
#: View/Users/signup:266
msgid "Please enter your lastname."
msgstr "Please enter your lastname."
#: Controller/ProfilesController.php/index.ctp:255
#: View/Users/signup:293
msgid "Please enter your birthdate."
msgstr "Please enter your birthdate."
...
...
@@ -108,10 +114,12 @@ msgid "Email address format wrong, Please enter the correct number."
msgstr "Email address format wrong, Please enter the correct number."
#: Controller/ProfilesController.php/index.ctp:291
#: View/Users/signup:281
msgid "Please specify country"
msgstr "Please select country"
#: Controller/ProfilesController.php/index.ctp:296
#: View/Users/signup:286
msgid "Please specify province"
msgstr "Please select province"
...
...
@@ -128,10 +136,12 @@ msgid "Not update. Please, try again."
msgstr "Not update. Please, try again."
#: Controller/UsersController.php/forgot_password.ctp:14
#: View/Users/signup:102
msgid "Email"
msgstr "Email"
#: Controller/UsersController.php/forgot_password.ctp:34
#: View/Users/signup:310
msgid "Please enter your email."
msgstr "Please enter your email."
...
...
@@ -144,14 +154,17 @@ msgid "Forgot password"
msgstr "Forgot password"
#: Controller/UsersController.php/pin_codepassword.ctp:3
#: View/Users/pin_code:3
msgid "Verify PIN"
msgstr "Verify PIN"
#: Controller/UsersController.php/pin_codepassword.ctp:18
#: View/Users/pin_code:16
msgid "4 digit PIN in the email address specified for access"
msgstr "4 digit PIN in the email address specified for access"
#: Controller/UsersController.php/pin_codepassword.ctp:40
#: View/Users/pin_code:40
msgid "Re-send pin code"
msgstr "Re-send pin code"
...
...
@@ -170,6 +183,7 @@ msgstr "Submit"
#: Controller/UsersController.php/change_forgotpassword.ctp:49
#: Controller/UsersController.php/change_forgotpassword.ctp:58
#: View/Users/signup:254
msgid "Please enter only English letters and numbers."
msgstr "Please enter only English letters and numbers."
...
...
@@ -182,10 +196,12 @@ msgid "Please enter a new password at least 8 characters."
msgstr "Please enter a new password at least 8 characters."
#: Controller/UsersController.php/change_forgotpassword.ctp:77
#: View/Users/signup:322
msgid "Please enter your password."
msgstr "Please enter your password."
#: Controller/UsersController.php/change_forgotpassword.ctp:82
#: View/Users/signup:327
msgid "Please enter at least 8 characters."
msgstr "Please enter at least 8 characters."
...
...
@@ -251,6 +267,7 @@ msgid "Firstname"
msgstr "Firstname"
#: Controller/UserCardsController.php/view_card.ctp:87
#: View/Users/signup:22
msgid "Lastname"
msgstr "Lastname"
...
...
@@ -317,4 +334,104 @@ msgstr "Save Complete"
#: Controller/UserCardsController:309
msgid "Already registered"
msgstr "Already registered"
\ No newline at end of file
msgstr "Already registered"
#: View/Users/signup:3
#: View/Users/signup:158
msgid "Register"
msgstr "Register"
#: View/Users/signup:31
msgid "Username"
msgstr "Username"
#: View/Users/signup:42
msgid "Country"
msgstr "Country"
#: View/Users/signup:63
msgid "Province"
msgstr "Province"
#: View/Users/signup:84
msgid "Birthdate"
msgstr "Birthdate"
#: View/Users/signup:94
msgid "Phone Number (Mobile)"
msgstr "Phone Number (Mobile)"
#: View/Users/signup:111
msgid "Password"
msgstr "Password"
#: View/Users/signup:121
msgid "Confirm password"
msgstr "Confirm password"
#: View/Users/signup:145
msgid "Close"
msgstr "Close"
#: View/Users/signup:153
msgid "Please accept the <b> Terms of Use </ b>."
msgstr "Please accept the <b> Terms of Use </ b>."
#: View/Users/signup:175
#: View/Users/signup:202
msgid "Please enter only text in English or numbers."
msgstr "Please enter only text in English or numbers."
#: View/Users/signup:184
#: View/Users/signup:193
#: View/Users/signup:211
msgid "Please enter text in English, Thai or only."
msgstr "Please enter text in English, Thai or only."
#: View/Users/signup:234
msgid "Please enter the phone number. Only numbers."
msgstr "Please enter the phone number. Only numbers."
#: View/Users/signup:241
msgid "Please enter the correct Thai or English text."
msgstr "Please enter the correct Thai or English text."
#: View/Users/signup:271
msgid "Please enter your username."
msgstr "Please enter your username."
#: View/Users/signup:276
msgid "Please enter a 4-10 character username."
msgstr "Please enter a 4-10 character username."
#: View/Users/signup:299
msgid "Please enter your phone number."
msgstr "Please enter your phone number."
#: View/Users/signup:304
msgid "Please enter a 10 digit phone number."
msgstr "Please enter a 10 digit phone number."
#: View/Users/signup:316
msgid "Wrong email address format Please enter the correct number."
msgstr "Wrong email address format Please enter the correct number."
#: View/Users/signup:332
msgid "Please verify your password."
msgstr "Please verify your password."
#: View/Users/signup:337
msgid "Please provide your password."
msgstr "Please provide your password."
#: View/Users/signup:251
msgid "Please accept the Terms of Use."
msgstr "Please accept the Terms of Use."
#: View/Users:322
msgid "Verify Completed."
msgstr "Verify Completed."
#: View/Users:325
msgid "Pin Code Invalid"
msgstr "Pin Code Invalid"
\ No newline at end of file
www/src/Locale/th_TH/default.mo
View file @
b2aba42a
No preview for this file type
www/src/Locale/th_TH/default.po
View file @
b2aba42a
...
...
@@ -96,6 +96,8 @@ msgid "Show QR Code to get permission"
msgstr "แสดงคิวอาร์โค้ดเพื่อรับสิทธิ์"
#: View/Profiles/index:226
#: View/Users:248
#: View/Users/signup:222
msgid "This email is already in the system."
msgstr "อีเมลนี้มีอยู่ในระบบอยู่แล้ว"
...
...
@@ -104,14 +106,17 @@ msgid "only numbers"
msgstr "กรอกเฉพาะหมายเลข"
#: View/Profiles/index:244
#: View/Users/signup:261
msgid "Please enter your firstname."
msgstr "กรุณากรอกชื่อของท่าน"
#: View/Profiles/index:249
#: View/Users/signup:266
msgid "Please enter your lastname."
msgstr "กรุณากรอกนามสกุลของท่าน"
#: View/Profiles/index:255
#: View/Users/signup:293
msgid "Please enter your birthdate."
msgstr "กรุณากรอกวันเดือนปีเกิดของท่าน"
...
...
@@ -132,10 +137,12 @@ msgid "Email address format wrong, Please enter the correct number."
msgstr "รูปแบบของที่อยู่อีเมลผิด กรุณากรอกให้ถูกต้อง"
#: View/Profiles/index:291
#: View/Users/signup:281
msgid "Please specify country"
msgstr "กรุณาระบุประเทศ"
#: View/Profiles/index:296
#: View/Users/signup:286
msgid "Please specify province"
msgstr "กรุณาระบุจังหวัด"
...
...
@@ -167,10 +174,12 @@ msgid "Company Information"
msgstr "ข้อมูลบริษัท"
#: View/UserCards/view_card:81
#: View/Users/signup:13
msgid "Firstname"
msgstr "ชื่อ"
#: View/UserCards/view_card:87
#: View/Users/signup:22
msgid "Lastname"
msgstr "นามสกุล"
...
...
@@ -235,10 +244,12 @@ msgid "Forgot password"
msgstr "ลืมรหัสผ่าน"
#: View/Users/forgot_password:14
#: View/Users/signup:102
msgid "Email"
msgstr "อีเมล"
#: View/Users/forgot_password:34
#: View/Users/signup:310
msgid "Please enter your email."
msgstr "กรุณากรอกที่อยู่อีเมลของท่าน"
...
...
@@ -260,6 +271,7 @@ msgstr "ยืนยันรหัสผ่าน"
#: View/Users/change_forgotpassword:49
#: View/Users/change_forgotpassword:58
#: View/Users/signup:254
msgid "Please enter only English letters and numbers."
msgstr "กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น"
...
...
@@ -272,10 +284,12 @@ msgid "Please enter a new password at least 8 characters."
msgstr "กรุณาระบุรหัสผ่านใหม่อย่างน้อย 8 ตัวอักษร่"
#: View/Users/change_forgotpassword:77
#: View/Users/signup:322
msgid "Please enter your password."
msgstr "กรุณากรอก ยืนยันรหัสผ่าน"
#: View/Users/change_forgotpassword:82
#: View/Users/signup:327
msgid "Please enter at least 8 characters."
msgstr "กรุณาระบุยืนยันรหัสผ่านอย่างน้อย 8 ตัวอักษร"
...
...
@@ -284,14 +298,17 @@ msgid "Please provide the same password."
msgstr "กรุณาระบุรหัสผ่านให้ตรงกัน"
#: View/Users/pin_codepassword:3
#: View/Users/pin_code:3
msgid "Verify PIN"
msgstr "ยืนยัน PIN"
#: View/Users/pin_codepassword:18
#: View/Users/pin_code:16
msgid "4 digit PIN in the email address specified for access"
msgstr "
กรุณาใส่ PIN 4 หลัก ที่ถูกส่งไปยังอีเมลของท่
าน"
msgstr "
รหัส PIN 4 หลัก ในอีเมลล์ที่ระบุเพื่อเข้าใช้ง
าน"
#: View/Users/pin_codepassword:40
#: View/Users/pin_code:40
msgid "Re-send pin code"
msgstr "ส่ง PIN ใหม่อีกครั้ง"
...
...
@@ -337,4 +354,104 @@ msgstr "ลงทะเบียนอยู่แล้ว"
#: Controller/UserCardsController:313
msgid "Data not found"
msgstr "ไม่พบข้อมูล"
\ No newline at end of file
msgstr "ไม่พบข้อมูล"
#: View/Users/signup:3
#: View/Users/signup:158
msgid "Register"
msgstr "สมัครสมาชิก"
#: View/Users/signup:31
msgid "Username"
msgstr "ชื่อผู้ใช้งาน"
#: View/Users/signup:42
msgid "Country"
msgstr "ประเทศ"
#: View/Users/signup:63
msgid "Province"
msgstr "จังหวัด"
#: View/Users/signup:84
msgid "Birthdate"
msgstr "วันเกิด"
#: View/Users/signup:94
msgid "Phone Number (Mobile)"
msgstr "เบอร์โทรศัพท์(มือถือ)"
#: View/Users/signup:111
msgid "Password"
msgstr "รหัสผ่าน"
#: View/Users/signup:121
msgid "Confirm password"
msgstr "ยืนยันรหัสผ่าน"
#: View/Users/signup:145
msgid "Close"
msgstr "ปิด"
#: View/Users/signup:153
msgid "Please accept the <b> Terms of Use </ b>."
msgstr "กรุณายอมรับ <b>เงื่อนไขการใช้งาน</b>"
#: View/Users/signup:175
#: View/Users/signup:202
msgid "Please enter only text in English or numbers."
msgstr "กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น"
#: View/Users/signup:184
#: View/Users/signup:193
#: View/Users/signup:211
msgid "Please enter text in English, Thai or only."
msgstr "กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษ,ไทยหรือตัวเลขเท่านั้น"
#: View/Users/signup:234
msgid "Please enter the phone number. Only numbers."
msgstr "กรุณาใส่ข้อมูลที่หมายเลขโทรศัพท์ เป็นตัวเลขเท่านั้น"
#: View/Users/signup:241
msgid "Please enter the correct Thai or English text."
msgstr "กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาไทยหรือภาษาอังกฤษให้ถูกต้อง"
#: View/Users/signup:271
msgid "Please enter your username."
msgstr "กรุณากรอกชื่อผู้ใช้งานของท่าน"
#: View/Users/signup:276
msgid "Please enter a 4-10 character username."
msgstr "กรุณาระบุชื่อผู้ใช้งานความยาว 4-10 ตัวอักษร"
#: View/Users/signup:299
msgid "Please enter your phone number."
msgstr "กรุณากรอก เบอร์โทรศัพท์ของท่าน"
#: View/Users/signup:304
msgid "Please enter a 10 digit phone number."
msgstr "กรุณากรอกเบอร์โทรศัพท์ ให้ครบ 10 หลัก"
#: View/Users/signup:316
msgid "Wrong email address format Please enter the correct number."
msgstr "รูปแบบที่อยู่อีเมลผิด กรุณากรอกให้ถูกต้อง"
#: View/Users/signup:332
msgid "Please verify your password."
msgstr "กรุณายืนยันรหัสผ่าน"
#: View/Users/signup:337
msgid "Please provide your password."
msgstr "กรุณาระบุรหัสผ่านให้ตรงกัน"
#: View/Users/signup:251
msgid "Please accept the Terms of Use."
msgstr "กรุณายอมรับ เงื่อนไขการใช้งาน"
#: View/Users:322
msgid "Verify Completed."
msgstr "สมัครสมาชิกสำเร็จ"
#: View/Users:325
msgid "Pin Code Invalid"
msgstr "Pin Code ผิด"
\ No newline at end of file
www/src/Template/Users/forgot_password.ctp
View file @
b2aba42a
...
...
@@ -28,18 +28,35 @@
</div>
<!-- ------------------------------- popup ----------------------------------- -->
<script>
// function validateForm() {
// var email = document.forms["forgotPressword"]["email"].value;
// if (email == null || 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.');?>);
// return false;
// }
// }
function validateForm() {
var email = document.
forms["forgotPressword"]["email"]
.value;
var email = document.
getElementById("email")
.value;
if (email == null || email == "") {
alert(
<?php echo __('Please enter your email.');?>
);
alert(
"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.');?>);
return false;
}
// Validate Email
var email = $("#email").val();
if (/(.+)@(.+){2,}\.(.+){2,}/.test(email)) { } else {
alert("Email address format wrong Please enter the correct.");
return false;
}
$("body").delegate(".is_active", "click", function () {
$('.is_active').not(this).prop('checked', false);
return true;
});
}
</script>
<style>
...
...
www/src/Template/Users/pin_code.ctp
View file @
b2aba42a
<div>
<div class=" row center">
<div class="title_header"><?php echo __('
กำหนดรหัส
PIN');?></div>
<div class="title_header"><?php echo __('
Verify
PIN');?></div>
</div>
<div style="padding-top: 20px;"></div>
...
...
@@ -13,7 +13,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<div class=" row center">
<?php echo __('
รหัส PIN 4 หลัก ในอีเมลล์ที่ระบุเพื่อเข้าใช้งาน
');?>
<?php echo __('
4 digit PIN in the email address specified for access
');?>
</div>
</div>
</div>
...
...
@@ -37,7 +37,7 @@
<div class="col-md-12">
<div class=" row center">
<?php
echo $this->Html->link('
ส่ง pin ใหม่อีกครั้ง
', ['controller' => 'Users', 'action' => 'registersendpin/'.$token]);
echo $this->Html->link('
Re-send pin code
', ['controller' => 'Users', 'action' => 'registersendpin/'.$token]);
?>
</div>
</div>
...
...
www/src/Template/Users/signup.ctp
View file @
b2aba42a
<div class="row">
<div class="center">
<div class="title_header"><a href="javascript:history.go(-1)"><?php echo $this->Html->image('/img/core/img/back-icon@3x.png', ['style' => 'float: left;padding-left: 15px;padding-top: 5px;']); ?></a><?php echo __('
สมัครสมาชิก
');?></div>
<div class="title_header"><a href="javascript:history.go(-1)"><?php echo $this->Html->image('/img/core/img/back-icon@3x.png', ['style' => 'float: left;padding-left: 15px;padding-top: 5px;']); ?></a><?php echo __('
Register
');?></div>
</div>
<div class="col-md-12">
<?php echo $this->Form->create(null, ['url' => ['controller' => 'Users','action' => 'createAccount'],'class' => 'form-horizontal','id' => '','name' => 'createAccount','role' => 'form', 'onsubmit' => 'return validateForm()']);?>
...
...
@@ -10,7 +10,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
ชื่อ
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Firstname
');?><em>* </em></label>
<input type="text" name="firstname" id="firstname" value="" placeholder="FIRSTNAME" class="form-control-reg border-bottom-from">
</div>
...
...
@@ -19,7 +19,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
นามสกุล
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Lastname
');?><em>* </em></label>
<input type="text" name="lastname" id="lastname" value="" placeholder="LASTNAME" class="form-control-reg border-bottom-from">
</div>
...
...
@@ -28,7 +28,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
ชื่อผู้ใช้งาน
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Username
');?><em>* </em></label>
<input type="text" name="username" id="username" value="" placeholder="USERNAME" class="form-control-reg border-bottom-from">
</div>
...
...
@@ -39,7 +39,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
ประเทศ
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Country
');?><em>* </em></label>
<?php
echo $this->Form->input( 'master_country_id', array(
'name'=>'master_country_id',
...
...
@@ -60,7 +60,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
จังหวัด
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Province
');?><em>* </em></label>
<?php
echo $this->Form->input( 'master_province_id', [
'name'=>'master_province_id',
...
...
@@ -81,7 +81,7 @@
<div>
<div class="form-group has-feedback bootstrap-iso">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
วันเกิด
');?></label>
<label class="label-text-sub"><?php echo __('
Birthdate
');?></label>
<input type="text" name="birthdate" id="date" placeholder="กรุณาระบุวันเดือนปีเกิด" value="" placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy" class="form-control-reg border-bottom-from">
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div>
...
...
@@ -91,7 +91,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
เบอร์โทรศัพท์(มือถือ
)');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Phone Number (Mobile
)');?><em>* </em></label>
<input type="text" name="phone_no" id="phone_no" onkeypress="check_phone();" value="" maxlength="10" placeholder="000-000-0000" class="mask form-control-reg border-bottom-from">
</div>
</div>
...
...
@@ -99,7 +99,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
อีเมล
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Email
');?><em>* </em></label>
<input type="text" name="email" id="fremail" value="" placeholder="mail@xxx.com" class="form-control-reg border-bottom-from">
</div>
...
...
@@ -108,7 +108,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
รหัสผ่าน
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Password
');?><em>* </em></label>
<input data-toggle="password" data-placement="before" type="password" name="password" id="password" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from" style="padding:0px 0px !important;">
<!--<input type="password" name="data[password]" id="password" value="" placeholder="********" class="form-control-reg border-bottom-from" onkeyup='check();'>-->
<!--<span class="glyphicon glyphicon-eye-close form-control-feedback"></span>-->
...
...
@@ -118,7 +118,7 @@
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('
ยืนยันรหัสผ่าน
');?><em>* </em></label>
<label class="label-text-sub"><?php echo __('
Confirm password
');?><em>* </em></label>
<input data-toggle="password" data-placement="before" type="password" name="confirm_password" id="confirm_password" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from" style="padding:0px 0px !important;">
<!--<input type="password" id="confirm_password" name="data[confirm_password]" value="" placeholder="********" class="form-control-reg border-bottom-from" onkeyup='check();'>-->
<!--<span class="glyphicon glyphicon-eye-close form-control-feedback" id='message'></span>-->
...
...
@@ -142,7 +142,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('
ปิด
');?></button>
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('
Close
');?></button>
</div>
</div>
</div>
...
...
@@ -150,12 +150,12 @@
<!------------------Exit Model---------------------->
<div class="switch switch-lg switch-warning" style="padding: 10px 0px 30px 0px;">
<input type="checkbox" id="accept" name="accept" data-plugin-ios-switch data-toggle="modal" data-target="#largeModal"/>
<span style="font-size: 17px;"><?php echo __('
กรุณายอมรับ <b>เงื่อนไขการใช้งาน</b>
');?></span>
<span style="font-size: 17px;"><?php echo __('
Please accept the <b> Terms of Use </ b>.
');?></span>
</div>
<div>
<?php
echo $this->Form->submit('
สมัครสมาชิก
', array('div' => false, 'class' => 'btn btn-quaternary mr-xs mb-sm button-text',
echo $this->Form->submit('
Register
', array('div' => false, 'class' => 'btn btn-quaternary mr-xs mb-sm button-text',
'name' => 'btn', 'id' => '', 'title' => 'Title'));
?>
</div>
...
...
@@ -172,7 +172,7 @@
var elem = document.getElementById('username').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert(
"กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาไทยหรือภาษาอังกฤษให้ถูกต้อง"
);
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(
"กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น"
);
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(
"กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น"
);
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(
"กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น"
);
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(
"กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น"
);
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(
"อีเมลนี้มีในระบบแล้ว"
);
alert(
<?php echo __("This email is already in the system.");?>
);
return false;
}
});
...
...
@@ -231,20 +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("
กรุณาใส่ข้อมูลที่หมายเลขโทรศัพท์ เป็นตัวเลขเท่านั้น
");
alert("
Please enter the phone number. Only numbers.
");
}
}
function check_notnum() {
// e_k=event.keyCode
// if ((e_k== 13 || e_k== 110) && (e_k > 48) || (e_k< 57)) {
// event.returnValue = false;
// alert("กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาไทยหรือภาษาอังกฤษให้ถูกต้อง");
// }
function check_notnum() {
var letters = /^[A-Za-zก-๙]+$/;
if(letters.test( event.key )==false){
alert("
กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาไทยหรือภาษาอังกฤษให้ถูกต้อง
");
alert("
Please enter the correct Thai or English text.
");
return false;
}
...
...
@@ -257,96 +251,96 @@ function check_notnum() {
e_k = true;
}else{
e_k = false;
alert("
กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น
");
alert("
Please enter only English letters and numbers.
");
}
}
function validateForm() {
var firstname = document.getElementById("firstname").value;
if (firstname == null || firstname == "") {
alert("
กรุณากรอกชื่อ
");
alert("
Please enter your firstname.
");
return false;
}
var lastname = document.getElementById("lastname").value;
if (lastname == null || lastname == "") {
alert("
กรุณากรอกนามสกุล
");
alert("
Please enter your lastname.
");
return false;
}
var username = document.getElementById("username").value;
if (username == null || username == "") {
alert("
กรุณากรอกชื่อผู้ใช้งานของท่าน
");
alert("
Please enter your username.
");
return false;
}
if(document.getElementById("username").value.length < 4 || document.getElementById("username").value.length > 10)
{
alert('
กรุณาระบุชื่อผู้ใช้งานความยาว 4-10 ตัวอักษร
');
alert('
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("
กรุณาระบุประเทศ
");
alert("
Please specify country
");
return false;
}
var master_province_id = document.getElementById("master_province_id").value;
if (master_province_id == null || master_province_id == "") {
alert("
กรุณาระบุจังหวัด
");
alert("
Please specify province
");
return false;
}
var birthdate = document.getElementById("date").value;
if (birthdate == null || birthdate == "") {
alert("
กรุณากรอก วันเดือนปีเกิดของท่าน
");
alert("
Please enter the date of your birth.
");
return false;
}
var phone_no = document.getElementById("phone_no").value;
if (phone_no == null || phone_no == "") {
alert("
กรุณากรอก เบอร์โทรศัพท์ของท่าน
");
alert("
Please enter your phone number.
");
return false;
}
if(document.getElementById("phone_no").value.length != 10)
{
alert('
กรุณากรอกเบอร์โทรศัพท์ ให้ครบ 10 หลัก
');
alert('
Please enter a 10 digit phone number.
');
return false;
}
var email = document.getElementById("fremail").value;
if (email == null || email == "") {
alert("
กรุณากรอกอีเมล
");
alert("
Please enter your email.
");
return false;
}
// Validate Email
var email = $("#fremail").val();
if (/(.+)@(.+){2,}\.(.+){2,}/.test(email)) { } else {
alert("
รูปแบบที่อยู่อีเมลผิด กรุณากรอกให้ถูกต้อง
");
alert("
Wrong email address format Please enter the correct number.
");
return false;
}
var password = document.getElementById("password").value;
if (password == null || password == "") {
alert("
กรุณากรอกรหัสผ่าน
");
alert("
Please enter your password.
");
return false;
}
if(document.forms["createAccount"]["password"].value.length < 8)
{
alert('
กรุณาระบุรหัสผ่านอย่างน้อย 8 ตัวอักษร
');
alert('
Please enter at least 8 characters.
');
return false;
}
var confirm_password = document.getElementById("confirm_password").value;
if (confirm_password == null || confirm_password == "") {
alert("
กรุณายืนยันรหัสผ่าน
");
alert("
Please verify your password.
");
return false;
}
if(confirm_password = document.getElementById("password").value != document.getElementById("confirm_password").value){
alert('
กรุณาระบุรหัสผ่านให้ตรงกัน
');
alert('
Please provide your password.
');
//document.createAccount.confirm_password.focus();
return false;
}
if($("#accept:checked").length==0){
alert("
กรุณายอมรับ เงื่อนไขการใช้งาน
");
alert("
Please accept the Terms of Use.
");
return false;
}
...
...
@@ -363,6 +357,7 @@ function check_notnum() {
}
</script>
<style>
#alertBox {
position:relative;
...
...
@@ -562,7 +557,7 @@ function check_notnum() {
// alert("ขออภัยหมายเลขโทรศัพท์ ต้องเป็นตัวเลขเท่านั้น");
// }
// }
/*var check = function() {
/*var check = function() {
if (document.getElementById('password').value ==
document.getElementById('confirm_password').value) {
document.getElementById('message').style.color = 'green';
...
...
@@ -571,7 +566,7 @@ function check_notnum() {
document.getElementById('message').style.color = 'red';
document.getElementById('message').innerHTML = '';
}
}*/
}*/
</script>
<!--------------------------------- date ------------------------------------->
<script>
...
...
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