Commit c1dff3e9 by Zen-PC\Zen

Merge branch 'integration' into kraikrit

parents d4d42bfd f2a1c246
......@@ -414,29 +414,4 @@ class UsersController extends AppController
$this->checkToken();
}
public function getProvince() {
$this->autoRender = false;
$this->loadModel('MasterProvinces');
$states = array();
$id = $this->request->data('id');
$states = $this->MasterProvinces->find('list', array(
'keyField' => 'id',
'valueField' => 'province_name_th',
'conditions' => array(
'master_country_id' =>$id
)
))->toArray();
$arr = array();
if(!empty($states)){
echo '<option value=""> ---Select--- </option>';
foreach($states as $key => $val){
echo '<option value="' . $key . '">' . $val. '</option>';
}
}else{
return false;
}
}
}
......@@ -50,7 +50,7 @@ use Cake\I18n\Time;
<?php
$now = new Time($value['date_expiry']);
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateIssued);
echo $this->DateFormat->formatDateThai($dateExpiry);
?>
</div>
</div>
......@@ -122,7 +122,7 @@ use Cake\I18n\Time;
<?php
$now = new Time($value['date_expiry']);
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateIssued);
echo $this->DateFormat->formatDateThai($dateExpiry);
?>
</div>
</div>
......@@ -141,12 +141,6 @@ use Cake\I18n\Time;
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->create('UserCards', ['id' => 'frmSignIn', 'type' => 'file', 'onsubmit' => 'return check();']); ?>
<!-- <div style="position: absolute;z-index: 2;">
<a href="profile_setting"><img src="/img/core/img/setting-icon@3x.png"/></a>
</div> -->
<!-- <div class="bg-profile"></div> -->
<!--<div class="col-xs-12 col-sm-12 col-md-12" style="padding-top: 20px;">-->
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?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']); ?>
......@@ -158,12 +152,12 @@ use Cake\I18n\Time;
</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' => __('รหัสพนักงาน / รหัสนักศึกษา'), 'placeholder' => 'รหัสพนักงาน / รหัสนักศึกษา', 'disabled', 'required']); ?>
<?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' => 'รหัสพนักงาน / รหัสนักศึกษา', 'disabled', 'required']); ?>
</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 __('วันเกิด');?></label>
<label class="label-text-sub"><?php echo __('Ref 2');?></label>
<input type="text" name="UserCards[birthdate]" id="date" placeholder="กรุณาระบุวันเดือนปีเกิด" value="" placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy" class="form-control-reg border-bottom-from" disabled>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div>
......@@ -235,7 +229,6 @@ function callBack(){
if(data!='false'){
data = jQuery.parseJSON(data);
console.log(data);
employee.val('sssss');
if(data['chkuser'] == true){
$("#noorg_th").text('ลงทะเบียนกับ '+data[0]['org_name_th']+' แล้ว');
$("#nameorg_th").text('');
......
<div>
<div class=" row center">
<div class="title_header"><?php echo __('ยืนยันตัวตนด้วยรหัส PIN');?></div>
</div>
<div style="padding-top: 20px;"></div>
<div class="col-md-12">
<?php echo $this->Form->create(null, ['url' => ['controller' => 'Users', 'action' => 'pinCodepassword/'.$token],
'id' => 'PinCode', 'name' => 'PinCode', 'role' => 'form']);
?>
<?php echo $this->Flash->render(); ?>
<div class="row">
<div class="form-group has-feedback">
<div class="col-md-12">
<div class=" row center">
<?php echo __('รหัส PIN 4 หลัก ในอีเมลล์ที่ระบุเพื่อเข้าใช้งาน');?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group has-feedback">
<div class="col-md-12">
<div class="data-pin" style=" text-align: center;">
<input type="hidden" name="token" value="<?php echo $token;?>">
<?php for($i=1;$i<=4;$i++){?>
<input type="password" pattern="[0-9]*" maxlength="1" min="0" name="pin_code_<?php echo $i;?>" id="pin_code_<?php echo $i;?>" onkeyup="verifyPinCode('pin_code')">
<?php }?>
</div>
</div>
</div>
</div>
<?php echo $this->Form->end(); ?>
</div>
</div>
<!---------------------------------------------------------------------->
<style>
input[type="number"], input[type="password"] {
width: 50px;
height: 50px;
margin-right: 5px;
margin-bottom: 0;
text-align: center;
/* font-size: 81px;
padding: 0px 0px 30px 0px;*/
}
</style>
<script>
function verifyPinCode(obj) {
if ($('#'+obj+'_1').val() != '' && $('#'+obj+'_2').val() != '' && $('#'+obj+'_3').val() != '' && $('#'+obj+'_4').val() != '') {
$("#PinCode").submit();
}else{
if ($('#'+obj+'_1').val() != '') $('#'+obj+'_2').focus();
if ($('#'+obj+'_2').val() != '') $('#'+obj+'_3').focus();
if ($('#'+obj+'_3').val() != '') $('#'+obj+'_4').focus();
return false;
}
}
</script>
......@@ -440,7 +440,7 @@
$("#master_province_id").html('');
$.ajax({
type: "POST",
url: '/users/getProvince',
url: '/provinces/getProvince',
data: dataString,
cache: false,
success: function (html) {
......
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