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
7cd84950
authored
May 31, 2018
by
Teeradone Darunnat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'integration' into teeradone
parents
870bef27
947fa85b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
9 deletions
+20
-9
www/src/Controller/UsersController.php
+3
-5
www/src/Template/Element/card_from/from_0.ctp
+4
-1
www/src/Template/UserCards/view_card.ctp
+13
-3
No files found.
www/src/Controller/UsersController.php
View file @
7cd84950
...
@@ -18,13 +18,11 @@ class UsersController extends AppController {
...
@@ -18,13 +18,11 @@ class UsersController extends AppController {
*/
*/
public
function
initialize
()
{
public
function
initialize
()
{
parent
::
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', 'changeForgotpassword']);
$this
->
Auth
->
allow
([
'signin'
,
'signout'
,
'signup'
,
'verify'
,
'forgotPassword'
,
'createAccount'
,
'pinCode'
,
'pinCodepassword'
,
'registersendpin'
,
'forgotsendpin'
,
'changeForgotpassword'
,
'reautorize'
]);
$this
->
Auth
->
allow
([
'signin'
,
'signout'
,
'signup'
,
'verify'
,
'forgotPassword'
,
'createAccount'
,
'pinCode'
,
'pinCodepassword'
,
'registersendpin'
,
'forgotsendpin'
,
'changeForgotpassword'
]);
}
}
public
function
index
()
{
public
function
index
()
{
return
$this
->
redirect
([
'controller'
=>
'Users'
,
'action'
=>
'signin'
]);
return
$this
->
redirect
([
'controller'
=>
'Users'
,
'action'
=>
'signin'
]);
}
}
...
...
www/src/Template/Element/card_from/from_0.ctp
View file @
7cd84950
<?php
use Cake\I18n\Time;
?>
<div class="row">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="modal
fade" id="defaultModal_<?php echo $i;?>" tabindex="-1" role="dialog" aria-labelledby="defaultModalLabel
"
<div class="modal
" id="card_<?php echo $i;?>" tabindex="-1" role="dialog" aria-labelledby="
"
aria-hidden="true">
aria-hidden="true">
<div class="modal-dialog box-ads">
<div class="modal-dialog box-ads">
<a class="close-modal" data-dismiss="modal">X </a>
<a class="close-modal" data-dismiss="modal">X </a>
...
...
www/src/Template/UserCards/view_card.ctp
View file @
7cd84950
...
@@ -158,8 +158,8 @@ use Cake\I18n\Time;
...
@@ -158,8 +158,8 @@ use Cake\I18n\Time;
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Flash->render(); ?>
<?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.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'
, 'required'
]); ?>
<?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'
, 'required'
]); ?>
<?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']); ?>
<label id="nameorg_th" style="color: green"></label>
<label id="nameorg_th" style="color: green"></label>
<label id="noorg_th" style="color: red"></label>
<label id="noorg_th" style="color: red"></label>
</div>
</div>
...
@@ -499,7 +499,6 @@ use Cake\I18n\Time;
...
@@ -499,7 +499,6 @@ use Cake\I18n\Time;
var date = $("#date");
var date = $("#date");
$(document).ready(function () {
$(document).ready(function () {
$("#organize_code").on('change', function () {
$("#organize_code").on('change', function () {
// alert(moment("05/22/2012", 'MM/DD/YYYY',true).isValid()); //true
var organize_code = $("#organize_code").val();
var organize_code = $("#organize_code").val();
$('#employee').attr("disabled", true);
$('#employee').attr("disabled", true);
$('#date').attr("disabled", true);
$('#date').attr("disabled", true);
...
@@ -513,6 +512,7 @@ use Cake\I18n\Time;
...
@@ -513,6 +512,7 @@ use Cake\I18n\Time;
if (data != 'false') {
if (data != 'false') {
data = jQuery.parseJSON(data);
data = jQuery.parseJSON(data);
if (data['chkuser'] == true) {
if (data['chkuser'] == true) {
$("#noorg_th").text('');
$("#noorg_th").text('ลงทะเบียนกับ ' + data[0]['org_name_th'] +
$("#noorg_th").text('ลงทะเบียนกับ ' + data[0]['org_name_th'] +
' แล้ว');
' แล้ว');
$("#nameorg_th").text('');
$("#nameorg_th").text('');
...
@@ -520,6 +520,7 @@ use Cake\I18n\Time;
...
@@ -520,6 +520,7 @@ use Cake\I18n\Time;
organize_id.val('');
organize_id.val('');
employee.val('');
employee.val('');
} else if (data['chkuser'] == false) {
} else if (data['chkuser'] == false) {
$("#nameorg_th").text('');
$("#nameorg_th").text(data[0]['org_name_th']);
$("#nameorg_th").text(data[0]['org_name_th']);
$("#noorg_th").text('');
$("#noorg_th").text('');
$("#checkbutton").removeAttr("disabled");
$("#checkbutton").removeAttr("disabled");
...
@@ -527,6 +528,7 @@ use Cake\I18n\Time;
...
@@ -527,6 +528,7 @@ use Cake\I18n\Time;
organize_id.val(data[0]['id']);
organize_id.val(data[0]['id']);
}
}
} else {
} else {
$("#noorg_th").text('');
$("#noorg_th").text('ไม่พบข้อมูล');
$("#noorg_th").text('ไม่พบข้อมูล');
$("#nameorg_th").text('');
$("#nameorg_th").text('');
$('#employee').attr("disabled", true);
$('#employee').attr("disabled", true);
...
@@ -547,17 +549,20 @@ use Cake\I18n\Time;
...
@@ -547,17 +549,20 @@ use Cake\I18n\Time;
if (data != 'false') {
if (data != 'false') {
data = jQuery.parseJSON(data);
data = jQuery.parseJSON(data);
if (data['chkuser'] == true) {
if (data['chkuser'] == true) {
$("#noepm_th").text('');
$("#noepm_th").text('ลงทะเบียนแล้ว');
$("#noepm_th").text('ลงทะเบียนแล้ว');
$("#nameemp_th").text('');
$("#nameemp_th").text('');
$('#date').attr("disabled", true);
$('#date').attr("disabled", true);
date.val('');
date.val('');
} else if (data['chkuser'] == false) {
} else if (data['chkuser'] == false) {
$("#nameemp_th").text('');
$("#nameemp_th").text(data['prefix_name_th'] + data['firstname_th'] +
$("#nameemp_th").text(data['prefix_name_th'] + data['firstname_th'] +
' ' + data['lastname_th']);
' ' + data['lastname_th']);
$("#noepm_th").text('');
$("#noepm_th").text('');
$("#date").removeAttr("disabled");
$("#date").removeAttr("disabled");
}
}
} else {
} else {
$("#noepm_th").text('');
$("#noepm_th").text(
$("#noepm_th").text(
'"ไม่พบข้อมูลที่ต้องการ" กรุณากรอกรหัสข้อมูลที่ถูกต้องและกดตรวจสอบ'
'"ไม่พบข้อมูลที่ต้องการ" กรุณากรอกรหัสข้อมูลที่ถูกต้องและกดตรวจสอบ'
);
);
...
@@ -570,6 +575,11 @@ use Cake\I18n\Time;
...
@@ -570,6 +575,11 @@ use Cake\I18n\Time;
});
});
function check() {
function check() {
if ($("#organize_code").val() == '') {
alert('กรุณากรอก Company Code');
organize_id.focus();
return false;
}
if (employee.val() == '') {
if (employee.val() == '') {
alert('กรุณากรอก Ref1');
alert('กรุณากรอก Ref1');
employee.focus();
employee.focus();
...
...
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