Commit 9e6c0a7a by Zen-PC\Zen

Zen : update provainec box and add link for fa-arrow

parent fc44746c
......@@ -20,6 +20,11 @@ class ProfilesController extends AppController
]);
$username = $responseUserProfile['username'];
$this->loadModel('UserPersonals');
$responseUserPersonal = $this->UserPersonals->get($id, [
'contain' => []
]);
//********DropdownCountry********
$this->loadModel('MasterCountries');
$Country = $this->MasterCountries->find('list', [
......@@ -28,6 +33,7 @@ class ProfilesController extends AppController
'keyField' => 'id',
'valueField' => 'country_name_th'
]);
// pr($responseUserPersonal['master_country_id']);die;
if(!empty($Country)) $Country = $Country->toArray();
//********DropdownProvince********
......@@ -37,14 +43,11 @@ class ProfilesController extends AppController
'is_used' => true],
'keyField' => 'id',
'valueField' => 'province_name_th'
]);
])->where(['master_country_id =' => $responseUserPersonal['master_country_id']]);
// pr($Province);die;
if(!empty($Province)) $Province = $Province->toArray();
$this->loadModel('UserPersonals');
$responseUserProfile = $this->UserPersonals->get($id, [
'contain' => []
]);
$res = $responseUserProfile['birthdate'];
$res = $responseUserPersonal['birthdate'];
$dateNow = $res->i18nFormat('dd/MM/yyyy');
if ($this->request->is(['patch', 'post', 'put'])) {
......@@ -104,7 +107,7 @@ class ProfilesController extends AppController
}
$this->Flash->error(__('Not update. Please, try again.'));
}
$this->set(compact('userPersonals', 'responseUserProfile', 'dateNow', 'username', 'Country', 'Province'));
$this->set(compact('userPersonals', 'responseUserProfile', 'dateNow', 'username', 'Country', 'Province', 'responseUserPersonal'));
$this->set('_serialize', ['userPersonals', 'responseUserProfile', 'dateNow', 'username', 'Country', 'Province']);
}
......
......@@ -30,6 +30,7 @@ public function generate(){
<div class="row">
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow" ></div>
<div class="col-xs-10 col-sm-10 col-md-10">
<div data-toggle="modal" data-target="#defaultModal" style="text-align: center; cursor: pointer;">
<img src="/img/core/img/card-bg-front@3x-V2.png" class="img-responsive" id="img-upload" alt="Profile picture">
......@@ -37,7 +38,12 @@ public function generate(){
</div>
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow" >
<i class = "fa fa-angle-right"></i>
<a>
<?php echo $this->Html->link(
'<i class = "fa fa-angle-right"></i>',
['controller' => 'UserCards', 'action' => 'viewCard', '_full' => true],['escape' => false]
); ?>
</a>
</div>
<div style="clear: both"></div>
</div><!--/row-->
......@@ -133,9 +139,9 @@ public function generate(){
'label' => false,
'type' => 'select',
'options' => $Country,
'value' => $responseUserProfile['master_country_id'],
'value' => $responseUserPersonal['master_country_id'],
'empty' => '---Select---',
'default' => !empty($responseUserProfile['master_country_id'])? $responseUserProfile['master_country_id']:'',
'default' => !empty($responseUserPersonal['master_country_id'])? $responseUserPersonal['master_country_id']:'',
'class' => 'form-control border-bottom-from label-text-sub required',
'style' => 'width:100%'
));
......@@ -151,9 +157,9 @@ public function generate(){
'label' => false,
'type' => 'select',
'options' => $Province,
'value' => $responseUserProfile['master_province_id'],
'value' => $responseUserPersonal['master_province_id'],
'empty' => '---Select---',
'default' => !empty($responseUserProfile['master_province_id'])? $responseUserProfile['master_province_id']:'',
'default' => !empty($responseUserPersonal['master_province_id'])? $responseUserPersonal['master_province_id']:'',
'class' => 'form-control border-bottom-from label-text-sub required',
'style' => 'width:100%'
));
......@@ -199,7 +205,7 @@ public function generate(){
</div>
</div>
</div>
<?php $this->append('scriptBottom'); ?>
<script type="text/javascript">
$(function () {
$('#moblieNo').inputmask('999-999-9999');
......@@ -233,6 +239,7 @@ public function generate(){
});
</script>
<?php $this->end();?>
<style>
.box-arrow{
font-size:36px;
......
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