Commit b2aba42a by Teeradone Darunnat

teeradone register

parent 9a435aea
......@@ -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);
......
......@@ -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
......@@ -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
......@@ -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>
......
<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>
......
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