Commit 1e7da6e4 by Teeradone Darunnat

teeradone validate 14.52 6/6/2561

parent f6d13942
...@@ -158,11 +158,14 @@ msgstr "Forgot password" ...@@ -158,11 +158,14 @@ msgstr "Forgot password"
msgid "Verify PIN" msgid "Verify PIN"
msgstr "Verify PIN" msgstr "Verify PIN"
#: Controller/UsersController.php/pin_codepassword.ctp:18
#: View/Users/pin_code:16 #: View/Users/pin_code:16
msgid "4 digit PIN in the email address specified for access" msgid "4 digit PIN in the email address specified for access"
msgstr "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:18
msgid "4 digit PIN in the email address specified to change the password."
msgstr "4 digit PIN in the email address specified to change the password."
#: Controller/UsersController.php/pin_codepassword.ctp:40 #: Controller/UsersController.php/pin_codepassword.ctp:40
#: View/Users/pin_code:40 #: View/Users/pin_code:40
msgid "Re-send pin code" msgid "Re-send pin code"
...@@ -443,3 +446,7 @@ msgstr "Please enter a old password." ...@@ -443,3 +446,7 @@ msgstr "Please enter a old password."
#: View/Users/changge_password:99 #: View/Users/changge_password:99
msgid "Please enter a old password at least 8 characters." msgid "Please enter a old password at least 8 characters."
msgstr "Please enter a old password at least 8 characters." msgstr "Please enter a old password at least 8 characters."
#: View/Users/changge_password:99
msgid "Please specify the email below. We will send a link to reset the password to the email."
msgstr "Please specify the email below. We will send a link to reset the password to the email."
\ No newline at end of file
...@@ -444,6 +444,12 @@ msgstr "กรุณายืนยันรหัสผ่าน" ...@@ -444,6 +444,12 @@ msgstr "กรุณายืนยันรหัสผ่าน"
msgid "Please provide your password." msgid "Please provide your password."
msgstr "กรุณาระบุรหัสผ่านให้ตรงกัน" msgstr "กรุณาระบุรหัสผ่านให้ตรงกัน"
#: Controller/UsersController.php/change_forgotpassword.ctp:32
#: Controller/UsersController.php/forgot_password.ctp:21
msgid "submit"
msgstr "ตกลง"
#: View/Users/signup:251 #: View/Users/signup:251
msgid "Please accept the Terms of Use." msgid "Please accept the Terms of Use."
msgstr "กรุณายอมรับ เงื่อนไขการใช้งาน" msgstr "กรุณายอมรับ เงื่อนไขการใช้งาน"
...@@ -463,3 +469,11 @@ msgstr "กรุณากรอก รหัสผ่านเก่า" ...@@ -463,3 +469,11 @@ msgstr "กรุณากรอก รหัสผ่านเก่า"
#: View/Users/changge_password:99 #: View/Users/changge_password:99
msgid "Please enter a old password at least 8 characters." msgid "Please enter a old password at least 8 characters."
msgstr "กรุณาระบุรหัสผ่านเก่าอย่างน้อย 8 ตัวอักษร" msgstr "กรุณาระบุรหัสผ่านเก่าอย่างน้อย 8 ตัวอักษร"
#: View/Users/changge_password:99
msgid "Please specify the email below. We will send a link to reset the password to the email."
msgstr "กรุณาระบุอีเมลข้างล่าง เราจะส่งลิงก์เพื่อรีเซ็ตรหัสผ่านไปยังอีเมล"
#: Controller/UsersController.php/pin_codepassword.ctp:18
msgid "4 digit PIN in the email address specified to change the password."
msgstr "รหัส PIN 4 หลัก ในอีเมลล์ที่ระบุเพื่อเปลี่ยนรหัสผ่าน"
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('new password');?></label> <label class="label-text-sub"><?php echo __('new password');?></label>
<input data-toggle="password" data-placement="before" onkeyup="check();" 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 data-toggle="password" data-placement="before" onkeyup="check();" type="password" name="password" id="password" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from required passwordtext" style="padding:0px 0px !important;" minlength="6">
</div> </div>
</div> </div>
</div> </div>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('confirm password');?></label> <label class="label-text-sub"><?php echo __('confirm password');?></label>
<input data-toggle="password" data-placement="before" onkeyup="check();" 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 data-toggle="password" data-placement="before" onkeyup="check();" type="password" name="confirm_password" id="confirm_password" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from required passwordtext" style="padding:0px 0px !important;" minlength="6">
</div> </div>
</div> </div>
</div> </div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div> <div>
<?php <?php
echo $this->Form->submit('submit', array('div' => false, 'class' => 'btn btn-quaternary mr-xs mb-sm button-text', echo $this->Form->submit(__('submit'), array('div' => false, 'class' => 'btn btn-quaternary mr-xs mb-sm button-text',
'name' => 'btn', 'id' => '', 'title' => 'Title'));//ตกลง 'name' => 'btn', 'id' => '', 'title' => 'Title'));//ตกลง
?> ?>
</div> </div>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<!-- ------------------------------- popup ----------------------------------- --> <!-- ------------------------------- popup ----------------------------------- -->
<script> <!-- <script>
$("#password").on('change',function(){ $("#password").on('change',function(){
var elem = document.getElementById('password').value; var elem = document.getElementById('password').value;
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
} }
} }
</script> </script> -->
<style> <style>
#alertBox { #alertBox {
position:relative; position:relative;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('รหัสผ่านเก่า');?></label> <label class="label-text-sub"><?php echo __('รหัสผ่านเก่า');?></label>
<input data-toggle="password" data-placement="before" onkeyup="check();" type="password" name="oldpassword" id="oldpassword" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from" style="padding:0px 0px !important;"> <input data-toggle="password" data-placement="before" onkeyup="check();" type="password" name="oldpassword" id="oldpassword" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from required passwordtext" style="padding:0px 0px !important;" minlength="6">
</div> </div>
</div> </div>
</div> </div>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('รหัสผ่านใหม่');?></label> <label class="label-text-sub"><?php echo __('รหัสผ่านใหม่');?></label>
<input data-toggle="password" data-placement="before" onkeyup="check();" 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 data-toggle="password" data-placement="before" onkeyup="check();" type="password" name="password" id="password" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from required passwordtext" style="padding:0px 0px !important;" minlength="6">
</div> </div>
</div> </div>
</div> </div>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('ยืนยันรหัสผ่าน');?></label> <label class="label-text-sub"><?php echo __('ยืนยันรหัสผ่าน');?></label>
<input data-toggle="password" data-placement="before" onkeyup="check();" 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 data-toggle="password" data-placement="before" onkeyup="check();" type="password" name="confirm_password" id="confirm_password" value="" placeholder="********" class="form-control input-lg color-button-border border-bottom-from required passwordtext" style="padding:0px 0px !important;" minlength="6">
</div> </div>
</div> </div>
</div> </div>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<!-- ------------------------------- popup ----------------------------------- --> <!-- ------------------------------- popup ----------------------------------- -->
<script> <!-- <script>
$("#oldpassword").on('change',function(){ $("#oldpassword").on('change',function(){
var elem = document.getElementById('oldpassword').value; var elem = document.getElementById('oldpassword').value;
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
} }
} }
</script> </script> -->
<style> <style>
#alertBox { #alertBox {
position:relative; position:relative;
......
...@@ -8,17 +8,25 @@ ...@@ -8,17 +8,25 @@
<div style="padding: 5px;"> <div style="padding: 5px;">
<?php echo $this->Flash->render(); ?> <?php echo $this->Flash->render(); ?>
</div> </div>
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('Please specify the email below. We will send a link to reset the password to the email.');?></label>
</div>
</div>
</div>
<div> <div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('Email');?><em>* </em></label> <label class="label-text-sub"><?php echo __('Email');?><em>* </em></label>
<input type="text" value="" name="email" placeholder="mail@xxx.com" class="form-control-reg border-bottom-from" id="fremail"> <input type="text" value="" name="email" placeholder="mail@xxx.com" class="form-control-reg border-bottom-from email emailtext" id="fremail">
</div> </div>
</div> </div>
</div> </div>
<div> <div>
<?php <?php
echo $this->Form->submit('submit', array('div' => false, 'class' => 'btn btn-quaternary mr-xs mb-sm button-text', echo $this->Form->submit(__('submit'), array('div' => false, 'class' => 'btn btn-quaternary mr-xs mb-sm button-text',
'name' => 'btn', 'id' => '', 'title' => 'Title')); 'name' => 'btn', 'id' => '', 'title' => 'Title'));
?> ?>
</div> </div>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class=" row center"> <div class=" row center">
<?php <?php
echo $this->Html->link('Re-send pin code', ['controller' => 'Users', 'action' => 'registersendpin/'.$token]); echo $this->Html->link(__('Re-send pin code'), ['controller' => 'Users', 'action' => 'registersendpin/'.$token]);
?> ?>
</div> </div>
</div> </div>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<div class=" row center"> <div class=" row center">
<?php echo __('4 digit PIN in the email address specified for access');?> <?php echo __('4 digit PIN in the email address specified to change the password.');?>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class=" row center"> <div class=" row center">
<?php <?php
echo $this->Html->link('Re-send pin code', ['controller' => 'Users', 'action' => 'forgotsendpin/'.$token]); echo $this->Html->link(__('Re-send pin code'), ['controller' => 'Users', 'action' => 'forgotsendpin/'.$token]);
?> ?>
</div> </div>
</div> </div>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('Firstname');?><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 required letterthai"> <input type="text" name="firstname" id="firstname" value="" placeholder="FIRSTNAME" class="form-control-reg border-bottom-from required letters">
</div> </div>
</div> </div>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('Lastname');?><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 required letterthai"> <input type="text" name="lastname" id="lastname" value="" placeholder="LASTNAME" class="form-control-reg border-bottom-from required">
</div> </div>
</div> </div>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<div class="form-group has-feedback bootstrap-iso"> <div class="form-group has-feedback bootstrap-iso">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('Birthdate');?></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 required date" readonly> <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 required datepicker" readonly>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span> <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div> </div>
</div> </div>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('Password');?><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 required alphanumeric" style="padding:0px 0px !important;" minlength=8> <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 required passwordtext" style="padding:0px 0px !important;" minlength="6">
<!--<input type="password" name="data[password]" id="password" value="" placeholder="********" class="form-control-reg border-bottom-from" onkeyup='check();'>--> <!--<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>--> <!--<span class="glyphicon glyphicon-eye-close form-control-feedback"></span>-->
</div> </div>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('Confirm password');?><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 required alphanumeric" style="padding:0px 0px !important;" minlength=8> <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 required passwordtext" style="padding:0px 0px !important;" minlength="6">
<!--<input type="password" id="confirm_password" name="data[confirm_password]" value="" placeholder="********" class="form-control-reg border-bottom-from" onkeyup='check();'>--> <!--<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>--> <!--<span class="glyphicon glyphicon-eye-close form-control-feedback" id='message'></span>-->
<span id='message'></span> <span id='message'></span>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<div> <div>
<?php <?php
echo $this->Form->submit('Register', 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')); 'name' => 'btn', 'id' => '', 'title' => 'Title'));
?> ?>
</div> </div>
...@@ -164,7 +164,94 @@ ...@@ -164,7 +164,94 @@
</div> </div>
</div> </div>
<!-- ------------------------------- popup ----------------------------------- --> <!-- ------------------------------- popup ----------------------------------- -->
<script> <!-- <script>
$(document).ready(function() {
$("#username").on('change',function(){
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.');?>");
return false;
}
})
$("#firstname").on('change',function(){
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.');?>");
return false;
}
})
$("#lastname").on('change',function(){
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.');?>");
return false;
}
})
$("#password").on('change',function(){
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.');?>");
return false;
}
})
$("#confirm_password").on('change',function(){
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.');?>");
return false;
}
})
$("#fremail").on('change',function(){
var elem = document.getElementById('fremail').value;
console.log(elem);
if(!elem.match(/^([A-Za-z0-9@._])+$/i)){
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("<?php echo __('Please enter your password.');?>");
return false;
}
if(document.forms["createAccount"]["password"].value.length < 8)
{
alert("<?php echo __('Please enter at least 8 characters.');?>");
return false;
}
$("#fremail").on('change',function(){
var email = document.getElementById("fremail").value;
$.post("/Checkemails/checkemail", {email: email}, function(data) {
// console.log(data);
data = jQuery.parseJSON(data);
if(data['chk'] == 'false'){
alert("<?php echo __('This email is already in the system.');?>");
return false;
}
});
});
});
// function check_phone() {
// e_k=event.keyCode
// // if (((e_k < 48) || (e_k > 57)) && e_k != 46 ) {
// if (e_k = 10 && (e_k < 48) || (e_k > 59)) {
// event.returnValue = false;
// alert("<?php echo __('Please enter the phone number. Only numbers.');?>");
// }
// }
function validateForm() { function validateForm() {
var password = document.getElementById("password").value; var password = document.getElementById("password").value;
...@@ -185,7 +272,7 @@ ...@@ -185,7 +272,7 @@
}); });
} }
</script> </script> -->
<style> <style>
#alertBox { #alertBox {
......
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