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
1e7da6e4
authored
Jun 06, 2018
by
Teeradone Darunnat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teeradone validate 14.52 6/6/2561
parent
f6d13942
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
142 additions
and
24 deletions
+142
-24
www/src/Locale/en_EN/default.mo
+0
-0
www/src/Locale/en_EN/default.po
+9
-1
www/src/Locale/th_TH/default.mo
+0
-0
www/src/Locale/th_TH/default.po
+15
-0
www/src/Template/Users/change_forgotpassword.ctp
+5
-5
www/src/Template/Users/change_password.ctp
+5
-5
www/src/Template/Users/forgot_password.ctp
+10
-2
www/src/Template/Users/pin_code.ctp
+1
-1
www/src/Template/Users/pin_codepassword.ctp
+2
-2
www/src/Template/Users/signup.ctp
+95
-8
No files found.
www/src/Locale/en_EN/default.mo
View file @
1e7da6e4
No preview for this file type
www/src/Locale/en_EN/default.po
View file @
1e7da6e4
...
...
@@ -158,11 +158,14 @@ msgstr "Forgot password"
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: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
#: View/Users/pin_code:40
msgid "Re-send pin code"
...
...
@@ -443,3 +446,7 @@ 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."
#: 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
www/src/Locale/th_TH/default.mo
View file @
1e7da6e4
No preview for this file type
www/src/Locale/th_TH/default.po
View file @
1e7da6e4
...
...
@@ -444,6 +444,12 @@ msgstr "กรุณายืนยันรหัสผ่าน"
msgid "Please provide your password."
msgstr "กรุณาระบุรหัสผ่านให้ตรงกัน"
#: Controller/UsersController.php/change_forgotpassword.ctp:32
#: Controller/UsersController.php/forgot_password.ctp:21
msgid "submit"
msgstr "ตกลง"
#: View/Users/signup:251
msgid "Please accept the Terms of Use."
msgstr "กรุณายอมรับ เงื่อนไขการใช้งาน"
...
...
@@ -463,3 +469,11 @@ msgstr "กรุณากรอก รหัสผ่านเก่า"
#: View/Users/changge_password:99
msgid "Please enter a old password at least 8 characters."
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
www/src/Template/Users/change_forgotpassword.ctp
View file @
1e7da6e4
...
...
@@ -12,7 +12,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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>
...
...
@@ -20,7 +20,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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>
...
...
@@ -29,7 +29,7 @@
<div>
<?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'));//ตกลง
?>
</div>
...
...
@@ -40,7 +40,7 @@
<!-- ------------------------------- popup ----------------------------------- -->
<script>
<
!-- <
script>
$("#password").on('change',function(){
var elem = document.getElementById('password').value;
...
...
@@ -89,7 +89,7 @@
}
}
</script>
</script>
-->
<style>
#alertBox {
position:relative;
...
...
www/src/Template/Users/change_password.ctp
View file @
1e7da6e4
...
...
@@ -12,7 +12,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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>
...
...
@@ -20,7 +20,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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>
...
...
@@ -28,7 +28,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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>
...
...
@@ -48,7 +48,7 @@
<!-- ------------------------------- popup ----------------------------------- -->
<script>
<
!-- <
script>
$("#oldpassword").on('change',function(){
var elem = document.getElementById('oldpassword').value;
...
...
@@ -116,7 +116,7 @@
}
}
</script>
</script>
-->
<style>
#alertBox {
position:relative;
...
...
www/src/Template/Users/forgot_password.ctp
View file @
1e7da6e4
...
...
@@ -8,17 +8,25 @@
<div style="padding: 5px;">
<?php echo $this->Flash->render(); ?>
</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 class="form-group has-feedback">
<div class="col-md-12">
<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>
<?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'));
?>
</div>
...
...
www/src/Template/Users/pin_code.ctp
View file @
1e7da6e4
...
...
@@ -37,7 +37,7 @@
<div class="col-md-12">
<div class=" row center">
<?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>
...
...
www/src/Template/Users/pin_codepassword.ctp
View file @
1e7da6e4
...
...
@@ -15,7 +15,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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>
...
...
@@ -37,7 +37,7 @@
<div class="col-md-12">
<div class=" row center">
<?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>
...
...
www/src/Template/Users/signup.ctp
View file @
1e7da6e4
...
...
@@ -11,7 +11,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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 letter
thai
">
<input type="text" name="firstname" id="firstname" value="" placeholder="FIRSTNAME" class="form-control-reg border-bottom-from required letter
s
">
</div>
</div>
...
...
@@ -20,7 +20,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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>
...
...
@@ -82,7 +82,7 @@
<div class="form-group has-feedback bootstrap-iso">
<div class="col-md-12">
<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 date
picker
" readonly>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div>
</div>
...
...
@@ -109,7 +109,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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();'>-->
<!--<span class="glyphicon glyphicon-eye-close form-control-feedback"></span>-->
</div>
...
...
@@ -119,7 +119,7 @@
<div class="form-group has-feedback">
<div class="col-md-12">
<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();'>-->
<!--<span class="glyphicon glyphicon-eye-close form-control-feedback" id='message'></span>-->
<span id='message'></span>
...
...
@@ -155,7 +155,7 @@
<div>
<?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'));
?>
</div>
...
...
@@ -164,7 +164,94 @@
</div>
</div>
<!-- ------------------------------- 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() {
var password = document.getElementById("password").value;
...
...
@@ -185,7 +272,7 @@
});
}
</script>
</script>
-->
<style>
#alertBox {
...
...
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