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
82cf1067
authored
Jun 01, 2018
by
Zen-PC\Zen
Browse files
Options
Browse Files
Download
Plain Diff
Zen : update
parents
b6b4639e
7cd84950
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
19 deletions
+85
-19
www/src/Controller/UsersController.php
+3
-5
www/src/Locale/en_EN/default.po
+63
-2
www/src/Template/UserCards/view_card.ctp
+8
-1
www/src/Template/Users/change_forgotpassword.ctp
+3
-3
www/src/Template/Users/forgot_password.ctp
+5
-5
www/src/Template/Users/pin_codepassword.ctp
+3
-3
No files found.
www/src/Controller/UsersController.php
View file @
82cf1067
...
...
@@ -18,13 +18,11 @@ class UsersController extends AppController {
*/
public
function
initialize
()
{
parent
::
initialize
();
// $this->Auth->allow(['signin', 'signout', 'signup', 'verify', 'forgotPassword', 'createAccount', 'pinCode', 'pinCodepassword', 'changeForgotpassword']);
$this
->
Auth
->
allow
([
'signin'
,
'signout'
,
'signup'
,
'verify'
,
'forgotPassword'
,
'createAccount'
,
'pinCode'
,
'pinCodepassword'
,
'registersendpin'
,
'forgotsendpin'
,
'changeForgotpassword'
]);
// $this->Auth->allow(['signin', 'signout', 'signup', 'verify', 'forgotPassword', 'createAccount', 'pinCode', 'pinCodepassword', 'changeForgotpassword']);
$this
->
Auth
->
allow
([
'signin'
,
'signout'
,
'signup'
,
'verify'
,
'forgotPassword'
,
'createAccount'
,
'pinCode'
,
'pinCodepassword'
,
'registersendpin'
,
'forgotsendpin'
,
'changeForgotpassword'
,
'reautorize'
]);
}
public
function
index
()
{
return
$this
->
redirect
([
'controller'
=>
'Users'
,
'action'
=>
'signin'
]);
}
...
...
www/src/Locale/en_EN/default.po
View file @
82cf1067
...
...
@@ -43,6 +43,10 @@ msgstr "Gender"
msgid "blood group"
msgstr "Blood group"
#: Controller/ProfilesController.php/index.ctp:199
msgid "Show QR Code to get permission"
msgstr "Show QR Code to get permission"
#: Controller/ProfilesController.php/index.ctp:122,123
msgid "mobile"
msgstr "Mobile"
...
...
@@ -137,4 +141,61 @@ msgstr "Email address format wrong Please enter the correct."
#: Controller/UsersController.php/forgot_password.ctp:3
msgid "Forgot password"
msgstr "Forgot password"
\ No newline at end of file
msgstr "Forgot password"
#: Controller/UsersController.php/pin_codepassword.ctp:3
msgid "Verify PIN"
msgstr "Verify PIN"
#: Controller/UsersController.php/pin_codepassword.ctp:18
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
msgid "Re-send pin code"
msgstr "Re-send pin code"
#: Controller/UsersController.php/change_forgotpassword.ctp:14
msgid "new password"
msgstr "New password"
#: Controller/UsersController.php/change_forgotpassword.ctp:22
msgid "confirm password"
msgstr "confirm password"
#: Controller/UsersController.php/change_forgotpassword.ctp:32
#: Controller/UsersController.php/forgot_password.ctp:21
msgid "submit"
msgstr "Submit"
#: Controller/UsersController.php/change_forgotpassword.ctp:49
msgid "Please enter only English letters and numbers."
msgstr "Please enter only English letters and numbers."
#: Controller/UsersController.php/change_forgotpassword.ctp:58
msgid "Please enter only English letters and numbers."
msgstr "Please enter only English letters and numbers."
#: Controller/UsersController.php/change_forgotpassword.ctp:67
msgid "Please enter a new password."
msgstr "Please enter a new password."
#: Controller/UsersController.php/change_forgotpassword.ctp:72
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
msgid "Please enter your password."
msgstr "Please enter your password."
#: Controller/UsersController.php/change_forgotpassword.ctp:82
msgid "Please enter at least 8 characters."
msgstr "Please enter at least 8 characters."
#: Controller/UsersController.php/change_forgotpassword.ctp:86
msgid "Please provide the same password."
msgstr "Please provide the same password."
#: Controller/UsersController.php/change_forgotpassword.ctp:3
msgid "change password"
msgstr "change password"
\ No newline at end of file
www/src/Template/UserCards/view_card.ctp
View file @
82cf1067
...
...
@@ -499,7 +499,6 @@ use Cake\I18n\Time;
var date = $("#date");
$(document).ready(function () {
$("#organize_code").on('change', function () {
// alert(moment("05/22/2012", 'MM/DD/YYYY',true).isValid()); //true
var organize_code = $("#organize_code").val();
$('#employee').attr("disabled", true);
$('#date').attr("disabled", true);
...
...
@@ -520,6 +519,7 @@ use Cake\I18n\Time;
organize_id.val('');
employee.val('');
} else if (data['chkuser'] == false) {
$("#nameorg_th").text('');
$("#nameorg_th").text(data[0]['org_name_th']);
$("#noorg_th").text('');
$("#checkbutton").removeAttr("disabled");
...
...
@@ -552,12 +552,14 @@ use Cake\I18n\Time;
$('#date').attr("disabled", true);
date.val('');
} else if (data['chkuser'] == false) {
$("#nameemp_th").text('');
$("#nameemp_th").text(data['prefix_name_th'] + data['firstname_th'] +
' ' + data['lastname_th']);
$("#noepm_th").text('');
$("#date").removeAttr("disabled");
}
} else {
$("#noepm_th").text('');
$("#noepm_th").text(
<?php echo __('"Did not find the information you need", Please enter the correct information and press the check.') ?>
);
...
...
@@ -570,6 +572,11 @@ use Cake\I18n\Time;
});
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();
...
...
www/src/Template/Users/change_forgotpassword.ctp
View file @
82cf1067
<div class="row">
<div class="center">
<div class="title_header" style="padding-top: 20px;"><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" style="padding-top: 20px;"><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 __('
change password
');?></div>
</div>
<div class="col-md-12">
<!-- <div class="alert alert-warning" role="alert" style="margin: 10px 0px 10px 0px;font-size: 17px;text-align: center;">
...
...
@@ -11,7 +11,7 @@
<div>
<div class="form-group has-feedback">
<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;">
</div>
</div>
...
...
@@ -19,7 +19,7 @@
<div>
<div class="form-group has-feedback">
<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;">
</div>
</div>
...
...
www/src/Template/Users/forgot_password.ctp
View file @
82cf1067
<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 __('Forgot password');
//ลืมรหัสผ่าน
?></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 __('Forgot password');?></div>
</div>
<div class="col-md-12">
...
...
@@ -11,14 +11,14 @@
<div>
<div class="form-group has-feedback">
<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">
</div>
</div>
</div>
<div>
<?php
echo $this->Form->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>
...
...
@@ -31,13 +31,13 @@
function validateForm() {
var email = document.forms["forgotPressword"]["email"].value;
if (email == null || email == "") {
alert("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("Email address format wrong Please enter the correct.");
//รูปแบบที่อยู่อีเมลล์ผิด กรุณากรอกให้ถูกต้อง
alert("Email address format wrong Please enter the correct.");
return false;
}
}
...
...
www/src/Template/Users/pin_codepassword.ctp
View file @
82cf1067
<div>
<div class=" row center">
<div class="title_header"><?php echo __('Verify PIN');
//ยืนยันตัวตนด้วยรหัส PIN
?></div>
<div class="title_header"><?php echo __('Verify PIN');?></div>
</div>
<div style="padding-top: 20px;"></div>
...
...
@@ -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');
//รหัส 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('Re-send pin code', ['controller' => 'Users', 'action' => 'forgotsendpin/'.$token]);
//ส่ง pin ใหม่อีกครั้ง
echo $this->Html->link('Re-send pin code', ['controller' => 'Users', 'action' => 'forgotsendpin/'.$token]);
?>
</div>
</div>
...
...
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