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
da05b445
authored
Jun 07, 2018
by
Zen-PC\Zen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'integration' into kraikrit
parents
4d6ad11c
7212b8f8
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
149 additions
and
53 deletions
+149
-53
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/Element/card_from/from_add_card.ctp
+4
-29
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
www/webroot/js/validate/jQuery.validate.addValidate.js
+3
-0
No files found.
www/src/Locale/en_EN/default.mo
View file @
da05b445
No preview for this file type
www/src/Locale/en_EN/default.po
View file @
da05b445
...
...
@@ -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 pin to reset the password to the email."
msgstr "Please specify the email below. We will send a pin to reset the password to the email."
\ No newline at end of file
www/src/Locale/th_TH/default.mo
View file @
da05b445
No preview for this file type
www/src/Locale/th_TH/default.po
View file @
da05b445
...
...
@@ -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 pin to reset the password to the email."
msgstr "กรุณาระบุอีเมลข้างล่าง เราจะส่งรหัส 4 เพื่อรีเซ็ตรหัสผ่านไปยังอีเมล"
#: 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/Element/card_from/from_add_card.ctp
View file @
da05b445
...
...
@@ -12,7 +12,6 @@
<?php echo $this->Form->create('UserCards', [
'id' => 'frmSignIn',
'type' => 'file',
'onsubmit' => 'return check();',
'url' => ['controller' => 'user-cards', 'action' => 'view-card']
]); ?>
<div class="form-group has-feedback">
...
...
@@ -20,25 +19,22 @@
<?php echo $this->Flash->render(); ?>
<?php echo $this->Form->hidden('UserCards.user_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'userId', 'type' => 'text', 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->hidden('UserCards.organize_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_id', 'type' => 'text', 'label' => __('ไอดีใช้งาน'), 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->input('UserCards.organize_code', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_code', 'type' => 'text', 'label' => __('Company Code'), 'placeholder' => 'Company Code']); ?>
<?php echo $this->Form->input('UserCards.organize_code', ['class' => 'form-control-reg border-bottom-from label-text-sub required
alphanumeric
', 'id' => 'organize_code', 'type' => 'text', 'label' => __('Company Code'), 'placeholder' => 'Company Code']); ?>
<label id="nameorg_th" style="color: green"></label>
<label id="noorg_th" style="color: red"></label>
</div>
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->input('UserCards.employee', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'employee', 'type' => 'text', 'label' => __('Ref 1'), 'placeholder' => 'Ref 1', 'disabled']); ?>
<?php echo $this->Form->input('UserCards.employee', ['class' => 'form-control-reg border-bottom-from label-text-sub required
alphanumeric
', 'id' => 'employee', 'type' => 'text', 'label' => __('Ref 1'), 'placeholder' => 'Ref 1', 'disabled']); ?>
<label id="nameemp_th" style="color: green"></label>
<label id="noepm_th" style="color: red"></label>
</div>
</div>
<div class="form-group has-feedback bootstrap-iso">
<div class="col-xs-12 col-sm-12 col-md-12">
<label class="label-text-sub">
<?php echo __('Ref 2');?>
</label>
<input type="text" name="UserCards[birthdate]" id="date" placeholder="Ref 2" value="" readonly placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy"
class="form-control-reg border-bottom-from" disabled>
<label class="label-text-sub"><?php echo __('Ref 2');?></label>
<input type="text" name="UserCards[birthdate]" id="date" placeholder="Ref 2" value="" readonly placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy" class="form-control-reg border-bottom-from required" disabled>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div>
</div>
...
...
@@ -53,9 +49,6 @@
</div>
<!--/.col-xs-12 -->
<?php $this->append('scriptBottom'); ?>
<script type="text/javascript">
var organize_id = $("#organize_id");
...
...
@@ -147,24 +140,6 @@
date_input.datepicker(options);
});
function check() {
if ($("#organize_code").val() == '') {
alert("<?php echo __('Please enter Company Code') ?>");
organize_id.focus();
return false;
}
if (employee.val() == '') {
alert("<?php echo __('Please enter Ref1') ?>");
employee.focus();
return false;
}
if (date.val() == '') {
alert("<?php echo __('Please enter Ref2') ?>");
date.focus();
return false;
}
}
</script>
<style>
#alertBox {
...
...
www/src/Template/Users/change_forgotpassword.ctp
View file @
da05b445
...
...
@@ -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 @
da05b445
...
...
@@ -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 @
da05b445
...
...
@@ -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 pin 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 @
da05b445
...
...
@@ -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 @
da05b445
...
...
@@ -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 @
da05b445
...
...
@@ -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 {
...
...
www/webroot/js/validate/jQuery.validate.addValidate.js
View file @
da05b445
...
...
@@ -26,6 +26,9 @@
| 19. ckquarter-min ,Example 'ckquarter-min' = '2'
| ------------------------------------------------------------------------------------------------------------------
*/
jQuery
.
validator
.
addMethod
(
"passwordtext"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
([
a-zA-Z0-9
])
+$/
.
test
(
value
);
},
"รหัสผ่านต้องเป็นตัวอักษร a-z, A-Z และ 0-9 ความยาวขั้นต่ำ 6 ตัวอักษร."
);
jQuery
.
validator
.
addMethod
(
"emailtext"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
([
a-zA-Z0-9@_.
])
+$/
.
test
(
value
);
},
"โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง."
);
...
...
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