Commit 4d6ad11c by Zen-PC\Zen

Zen : จัดโค้ดให้ดูง่ายขึ้น

parent 1fe14090
......@@ -45,7 +45,13 @@ use Cake\I18n\Time;
<div style="clear: both"></div>
<br><br>
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->create('UserProfiles', ['id' => 'frmSignIn', 'type' => 'file','name' => 'frmSignIn','role' => 'form', 'onsubmit' => 'return validateForm()']); ?>
<?php echo $this->Form->create('UserProfiles', [
'id' => 'frmSignIn',
'type' => 'file',
'name' => 'frmSignIn',
'role' => 'form',
'onsubmit' => 'return validateForm()'
]); ?>
<?php echo $this->Flash->render() ?>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
......@@ -56,8 +62,23 @@ 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->hidden('Users.user_id', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserProfile['id'], 'id' => 'userId', 'type' => 'text', 'label' => __('username'), 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->input('Users.username', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $username, 'id' => 'username', 'type' => 'text', 'label' => __('username'), 'placeholder' => 'USERNAME', 'readonly']); ?>
<?php echo $this->Form->hidden('Users.user_id', [
'class' => 'form-control-reg border-bottom-from label-text-sub',
'value' => $responseUserProfile['id'],
'id' => 'userId',
'type' => 'text',
'label' => __('username'),
'placeholder' => 'USERNAME'
]); ?>
<?php echo $this->Form->input('Users.username', [
'class' => 'form-control-reg border-bottom-from label-text-sub',
'value' => $username,
'id' => 'username',
'type' => 'text',
'label' => __('username'),
'placeholder' => 'USERNAME',
'readonly'
]); ?>
<?php // echo $this->Form->input('user_id', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $userProfile->username, 'id' => 'userId', 'type' => 'text', 'label' => __('ชื่อผู้ใช้งาน'), 'placeholder' => 'USERNAME']); ?>
</div>
</div>
......@@ -69,7 +90,8 @@ use Cake\I18n\Time;
'class' => 'form-control-reg border-bottom-from label-text-sub required letterthai',
'value' => $responseUserPersonal['firstname_th'],
'id' => 'firstname_th',
'type' => 'text', 'label' => false,
'type' => 'text',
'label' => false,
'minlength' => '4',
'placeholder' => 'firstname'
]); ?>
......@@ -84,7 +106,8 @@ use Cake\I18n\Time;
'class' => 'form-control-reg border-bottom-from label-text-sub required letterthai',
'value' => $responseUserPersonal['lastname_th'],
'id' => 'lastname_th',
'type' => 'text', 'label' => false,
'type' => 'text',
'label' => false,
'minlength' => '4',
'placeholder' => 'lastname'
]); ?>
......@@ -179,8 +202,7 @@ use Cake\I18n\Time;
'id' => 'email',
'name' => 'email',
'label' => false,
'placeholder' =>
'mail@xxx.com'
'placeholder' => 'mail@xxx.com'
]); ?>
<?php // echo $this->Form->input('email', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $userProfiles->email, 'id' => 'email', 'type' => 'email', 'label' => __('Email'), 'placeholder' => 'mail@xxx.com']); ?>
<!-- <input type="text" name="email" id="email" value="<?php echo $responseUserPersonal['email'] ?>" placeholder="mail@xxx.com"
......@@ -205,19 +227,19 @@ use Cake\I18n\Time;
<?php echo __('country'); ?>
<em>* </em>
<?php
echo $this->Form->input( 'master_country_id', array(
'id' => 'master_country_id',
'label' => false,
'type' => 'select',
'require'=>'require',
'options' => $Country,
'value' => $responseUserPersonal['master_country_id'],
'empty' => '---Select---',
'default' => !empty($responseUserPersonal['master_country_id'])? $responseUserPersonal['master_country_id']:'',
'class' => 'form-control border-bottom-from label-text-sub require required',
'style' => 'width:100%'
));
?>
echo $this->Form->input( 'master_country_id', array(
'id' => 'master_country_id',
'label' => false,
'type' => 'select',
'require'=>'require',
'options' => $Country,
'value' => $responseUserPersonal['master_country_id'],
'empty' => '---Select---',
'default' => !empty($responseUserPersonal['master_country_id'])? $responseUserPersonal['master_country_id']:'',
'class' => 'form-control border-bottom-from label-text-sub require required',
'style' => 'width:100%'
));
?>
</div>
</div>
<div class="form-group has-feedback">
......@@ -225,19 +247,19 @@ use Cake\I18n\Time;
<?php echo __('province'); ?>
<em>* </em>
<?php
echo $this->Form->input( 'master_province_id', array(
'id' => 'master_province_id',
'label' => false,
'type' => 'select',
'require'=>'require',
'options' => $Province,
'value' => $responseUserPersonal['master_province_id'],
'empty' => '---Select---',
'default' => !empty($responseUserPersonal['master_province_id'])? $responseUserPersonal['master_province_id']:'',
'class' => 'form-control border-bottom-from label-text-sub require required',
'style' => 'width:100%'
));
?>
echo $this->Form->input( 'master_province_id', array(
'id' => 'master_province_id',
'label' => false,
'type' => 'select',
'require'=>'require',
'options' => $Province,
'value' => $responseUserPersonal['master_province_id'],
'empty' => '---Select---',
'default' => !empty($responseUserPersonal['master_province_id'])? $responseUserPersonal['master_province_id']:'',
'class' => 'form-control border-bottom-from label-text-sub require required',
'style' => 'width:100%'
));
?>
</div>
</div>
<div>
......
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