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
9e6c0a7a
authored
May 18, 2018
by
Zen-PC\Zen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zen : update provainec box and add link for fa-arrow
parent
fc44746c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
www/src/Controller/ProfilesController.php
+10
-7
www/src/Template/Profiles/index.ctp
+13
-6
No files found.
www/src/Controller/ProfilesController.php
View file @
9e6c0a7a
...
@@ -20,6 +20,11 @@ class ProfilesController extends AppController
...
@@ -20,6 +20,11 @@ class ProfilesController extends AppController
]);
]);
$username
=
$responseUserProfile
[
'username'
];
$username
=
$responseUserProfile
[
'username'
];
$this
->
loadModel
(
'UserPersonals'
);
$responseUserPersonal
=
$this
->
UserPersonals
->
get
(
$id
,
[
'contain'
=>
[]
]);
//********DropdownCountry********
//********DropdownCountry********
$this
->
loadModel
(
'MasterCountries'
);
$this
->
loadModel
(
'MasterCountries'
);
$Country
=
$this
->
MasterCountries
->
find
(
'list'
,
[
$Country
=
$this
->
MasterCountries
->
find
(
'list'
,
[
...
@@ -28,6 +33,7 @@ class ProfilesController extends AppController
...
@@ -28,6 +33,7 @@ class ProfilesController extends AppController
'keyField'
=>
'id'
,
'keyField'
=>
'id'
,
'valueField'
=>
'country_name_th'
'valueField'
=>
'country_name_th'
]);
]);
// pr($responseUserPersonal['master_country_id']);die;
if
(
!
empty
(
$Country
))
$Country
=
$Country
->
toArray
();
if
(
!
empty
(
$Country
))
$Country
=
$Country
->
toArray
();
//********DropdownProvince********
//********DropdownProvince********
...
@@ -37,14 +43,11 @@ class ProfilesController extends AppController
...
@@ -37,14 +43,11 @@ class ProfilesController extends AppController
'is_used'
=>
true
],
'is_used'
=>
true
],
'keyField'
=>
'id'
,
'keyField'
=>
'id'
,
'valueField'
=>
'province_name_th'
'valueField'
=>
'province_name_th'
]);
])
->
where
([
'master_country_id ='
=>
$responseUserPersonal
[
'master_country_id'
]]);
// pr($Province);die;
if
(
!
empty
(
$Province
))
$Province
=
$Province
->
toArray
();
if
(
!
empty
(
$Province
))
$Province
=
$Province
->
toArray
();
$this
->
loadModel
(
'UserPersonals'
);
$res
=
$responseUserPersonal
[
'birthdate'
];
$responseUserProfile
=
$this
->
UserPersonals
->
get
(
$id
,
[
'contain'
=>
[]
]);
$res
=
$responseUserProfile
[
'birthdate'
];
$dateNow
=
$res
->
i18nFormat
(
'dd/MM/yyyy'
);
$dateNow
=
$res
->
i18nFormat
(
'dd/MM/yyyy'
);
if
(
$this
->
request
->
is
([
'patch'
,
'post'
,
'put'
]))
{
if
(
$this
->
request
->
is
([
'patch'
,
'post'
,
'put'
]))
{
...
@@ -104,7 +107,7 @@ class ProfilesController extends AppController
...
@@ -104,7 +107,7 @@ class ProfilesController extends AppController
}
}
$this
->
Flash
->
error
(
__
(
'Not update. Please, try again.'
));
$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'
]);
$this
->
set
(
'_serialize'
,
[
'userPersonals'
,
'responseUserProfile'
,
'dateNow'
,
'username'
,
'Country'
,
'Province'
]);
}
}
...
...
www/src/Template/Profiles/index.ctp
View file @
9e6c0a7a
...
@@ -30,6 +30,7 @@ public function generate(){
...
@@ -30,6 +30,7 @@ public function generate(){
<div class="row">
<div class="row">
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow" ></div>
<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 class="col-xs-10 col-sm-10 col-md-10">
<div data-toggle="modal" data-target="#defaultModal" style="text-align: center; cursor: pointer;">
<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">
<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(){
...
@@ -37,7 +38,12 @@ public function generate(){
</div>
</div>
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow" >
<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>
<div style="clear: both"></div>
<div style="clear: both"></div>
</div><!--/row-->
</div><!--/row-->
...
@@ -133,9 +139,9 @@ public function generate(){
...
@@ -133,9 +139,9 @@ public function generate(){
'label' => false,
'label' => false,
'type' => 'select',
'type' => 'select',
'options' => $Country,
'options' => $Country,
'value' => $responseUserP
rofile
['master_country_id'],
'value' => $responseUserP
ersonal
['master_country_id'],
'empty' => '---Select---',
'empty' => '---Select---',
'default' => !empty($responseUserP
rofile['master_country_id'])? $responseUserProfile
['master_country_id']:'',
'default' => !empty($responseUserP
ersonal['master_country_id'])? $responseUserPersonal
['master_country_id']:'',
'class' => 'form-control border-bottom-from label-text-sub required',
'class' => 'form-control border-bottom-from label-text-sub required',
'style' => 'width:100%'
'style' => 'width:100%'
));
));
...
@@ -151,9 +157,9 @@ public function generate(){
...
@@ -151,9 +157,9 @@ public function generate(){
'label' => false,
'label' => false,
'type' => 'select',
'type' => 'select',
'options' => $Province,
'options' => $Province,
'value' => $responseUserP
rofile
['master_province_id'],
'value' => $responseUserP
ersonal
['master_province_id'],
'empty' => '---Select---',
'empty' => '---Select---',
'default' => !empty($responseUserP
rofile['master_province_id'])? $responseUserProfile
['master_province_id']:'',
'default' => !empty($responseUserP
ersonal['master_province_id'])? $responseUserPersonal
['master_province_id']:'',
'class' => 'form-control border-bottom-from label-text-sub required',
'class' => 'form-control border-bottom-from label-text-sub required',
'style' => 'width:100%'
'style' => 'width:100%'
));
));
...
@@ -199,7 +205,7 @@ public function generate(){
...
@@ -199,7 +205,7 @@ public function generate(){
</div>
</div>
</div>
</div>
</div>
</div>
<?php $this->append('scriptBottom'); ?>
<script type="text/javascript">
<script type="text/javascript">
$(function () {
$(function () {
$('#moblieNo').inputmask('999-999-9999');
$('#moblieNo').inputmask('999-999-9999');
...
@@ -233,6 +239,7 @@ public function generate(){
...
@@ -233,6 +239,7 @@ public function generate(){
});
});
</script>
</script>
<?php $this->end();?>
<style>
<style>
.box-arrow{
.box-arrow{
font-size:36px;
font-size:36px;
...
...
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