Commit 5d33e689 by Prasong Putichanchai

Merge branch 'integration' into prasong

parents 09987581 f95aaefb
# LANGUAGE translation of CakePHP Application
# Copyright YEAR NAME <EMAIL@ADDRESS>
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"POT-Creation-Date: 2018-03-03 14:50+0700\n"
"PO-Revision-Date: 2018-05-07 13:13+0700\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
"Language: th_TH\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.0.7\n"
#: Controller/AppController.php:318
msgid "user profile"
msgstr "User Profile"
\ No newline at end of file
# LANGUAGE translation of CakePHP Application
# Copyright YEAR NAME <EMAIL@ADDRESS>
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"POT-Creation-Date: 2018-03-03 14:50+0700\n"
"PO-Revision-Date: 2018-05-07 13:13+0700\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
"Language: th_TH\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.0.7\n"
#: Controller/AppController.php:318
msgid "user profile"
msgstr "User Profile"
\ No newline at end of file
......@@ -53,33 +53,33 @@
<?php echo $this->Flash->render() ?>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<h3> <?php echo __('ข้อมูลสมาชิก');?></h3>
<h3> <?php echo __('user profile');?></h3>
</div>
</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' => __('ชื่อผู้ใช้งาน'), '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' => __('ชื่อผู้ใช้งาน'), '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>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('ชื่อ');?><em>* </em>
<?php echo $this->Form->input('UserPersonals.firstname_th', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['firstname_th'], 'id' => 'firstname_th', 'type' => 'text', 'label' => false, 'placeholder' => 'ชื่อ']); ?>
<?php echo __('firstname');?><em>* </em>
<?php echo $this->Form->input('UserPersonals.firstname_th', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['firstname_th'], 'id' => 'firstname_th', 'type' => 'text', 'label' => false, 'placeholder' => 'firstname']); ?>
<?php // echo $this->Form->input('fullname', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $userProfiles->firstname_th . ' ' . $userProfiles->lastname_th, 'id' => 'fullName', 'type' => 'text', 'label' => __('ชื่อ - นามสกุล'), 'placeholder' => 'ชื่อ - นามสกุล']); ?>
</div>
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('สกุล');?><em>* </em>
<?php echo $this->Form->input('UserPersonals.lastname_th', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['lastname_th'], 'id' => 'lastname_th', 'type' => 'text', 'label' => false, 'placeholder' => 'นามสกุล']); ?>
<?php echo __('lastname');?><em>* </em>
<?php echo $this->Form->input('UserPersonals.lastname_th', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['lastname_th'], 'id' => 'lastname_th', 'type' => 'text', 'label' => false, 'placeholder' => 'lastname']); ?>
<?php // echo $this->Form->input('fullname', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $userProfiles->firstname_th . ' ' . $userProfiles->lastname_th, 'id' => 'fullName', 'type' => 'text', 'label' => __('ชื่อ - นามสกุล'), 'placeholder' => 'ชื่อ - นามสกุล']); ?>
</div>
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('วันเดือนปีเกิด');?><em>* </em>
<?php echo __('birthdate');?><em>* </em>
<?php echo $this->Form->input('UserPersonals.birthdate', ['class' => 'form-control-reg border-bottom-from', 'value' => $dateNow, 'id' => 'datepicker', 'type' => 'text', 'label' => false, 'placeholder' => 'DD-MM-YYYY']); ?>
<span class="glyphicon glyphicon-calendar form-control-feedback datepicker"></span>
</div>
......@@ -87,20 +87,20 @@
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<!--<label class="label-text-sub">เพศ</label>-->
<?php echo __('เพศ'); ?>
<?php echo __('gender'); ?>
<div class="radio-group">
<label class="radio-inline">
<input type="radio" name="UserPersonals[gender]" id="male" value="M" <?php echo ($responseUserPersonal['gender'] == 'M') ? 'checked="checked"' : null; ?>> <?php echo __('ชาย'); ?>
<input type="radio" name="UserPersonals[gender]" id="male" value="M" <?php echo ($responseUserPersonal['gender'] == 'M') ? 'checked="checked"' : null; ?>> <?php echo __('male'); ?>
</label>
<label class="radio-inline">
<input type="radio" name="UserPersonals[gender]" id="female" value="F" <?php echo ($responseUserPersonal['gender'] == 'F') ? 'checked="checked"' : null; ?>> <?php echo __('หญิง'); ?>
<input type="radio" name="UserPersonals[gender]" id="female" value="F" <?php echo ($responseUserPersonal['gender'] == 'F') ? 'checked="checked"' : null; ?>> <?php echo __('female'); ?>
</label>
</div>
</div>
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('กรุ๊ปเลือด'); ?>
<?php echo __('blood group'); ?>
<div class="radio-group">
<label class="radio-inline">
<input type="radio" name="UserPersonals[blood_group]" id="blood-A" value="A" <?php echo ($responseUserPersonal['blood_group'] == 'A') ? 'checked="checked"' : null; ?>> <?php echo __('A'); ?>
......@@ -119,14 +119,14 @@
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('เบอร์โทรศัพท์(มือถือ)');?><em>* </em>
<?php echo $this->Form->input('UserPersonals.moblie_no', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['moblie_no'], 'id' => 'moblieNo', 'type' => 'text', 'label' => false, 'maxlength' => '10', 'placeholder' => 'หมายเลขโทรศัพท์(มือถือ)']); ?>
<?php echo __('moblie');?><em>* </em>
<?php echo $this->Form->input('UserPersonals.moblie_no', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['moblie_no'], 'id' => 'moblieNo', 'type' => 'text', 'label' => false, 'maxlength' => '10', 'placeholder' => 'moblie']); ?>
<?php // echo $this->Form->input('moblie_no', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $userProfiles->moblie_no, 'id' => 'moblieNo', 'type' => 'text', 'label' => __('เบอร์โทรศัพท์'), 'placeholder' => '000-000-0000']); ?>
</div>
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('อีเมล');?><em>* </em>
<?php echo __('email');?><em>* </em>
<!-- <?php echo $this->Form->input('UserPersonals.email', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['email'], 'id' => 'email', 'label' => false, '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" class="form-control-reg border-bottom-from">
......@@ -134,13 +134,13 @@
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->input('UserPersonals.address', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['address'], 'id' => 'address', 'type' => 'text', 'label' => __('ที่อยู่อาศัย'), 'placeholder' => __('112/3 สุขุมวิท 22 ทองหล่อ กทม 10523')]); ?>
<?php echo $this->Form->input('UserPersonals.address', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $responseUserPersonal['address'], 'id' => 'address', 'type' => 'text', 'label' => __('address'), 'placeholder' => __('112/3 สุขุมวิท 22 ทองหล่อ กทม 10523')]); ?>
<?php // echo $this->Form->input('address', ['class' => 'form-control-reg border-bottom-from label-text-sub', 'value' => $userProfiles->address, 'id' => 'address', 'type' => 'text', 'label' => __('ที่อยู่อาศัย'), 'placeholder' => __('112/3 สุขุมวิท 22 ทองหล่อ กทม 10523')]); ?>
</div>
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('ประเทศ'); ?><em>* </em>
<?php echo __('country'); ?><em>* </em>
<?php
echo $this->Form->input( 'master_country_id', array(
'id' => 'master_country_id',
......@@ -159,7 +159,7 @@
</div>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('จังหวัด'); ?><em>* </em>
<?php echo __('province'); ?><em>* </em>
<?php
echo $this->Form->input( 'master_province_id', array(
'id' => 'master_province_id',
......@@ -178,7 +178,7 @@
</div>
<div>
<?php // echo $this->Form->submit(__('SAVE')) ?>
<button type="submit" class="btn btn-quaternary mr-xs mb-sm button-text-profile">บันทึก</button>
<button type="submit" class="btn btn-quaternary mr-xs mb-sm button-text-profile">SAVE</button>
</div>
<?php echo $this->Form->end(); ?>
</div>
......@@ -223,7 +223,7 @@
// console.log(data);
data = jQuery.parseJSON(data);
if(data['chk'] == 'false'){
alert("อีเมลนี้มีในระบบแล้ว");
alert("This email is already in the system.");
return false;
}
});
......@@ -232,7 +232,7 @@
var elem = document.getElementById('moblieNo').value;
// console.log(elem);
if(!elem.match(/^([A-Za-zก-๙])+$/i)){
alert("กรอกเฉพาะตัวเลข");
alert("only numbers");
return false;
}
})
......@@ -241,41 +241,41 @@
function validateForm() {
var firstname_th = document.getElementById("firstname_th").value;
if (firstname_th == null || firstname_th == "") {
alert("กรุณากรอกชื่อ");
alert("Please enter your firstname.");
return false;
}
var lastname_th = document.getElementById("lastname_th").value;
if (lastname_th == null || lastname_th == "") {
alert("กรุณากรอกนามสกุล");
alert("Please enter your lastname.");
return false;
}
var birthdate = document.getElementById("datepicker").value;
if (birthdate == null || birthdate == "") {
alert("กรุณากรอก วันเดือนปีเกิดของท่าน");
alert("Please enter your birthdate.");
return false;
}
var moblieNo = document.getElementById("moblieNo").value;
if (moblieNo == null || moblieNo == "") {
alert("กรุณากรอก เบอร์โทรศัพท์ของท่าน");
alert("Please enter your mobile.");
return false;
}
if(document.getElementById("moblieNo").value.length != 10)
{
alert('กรุณากรอกเบอร์โทรศัพท์ ให้ครบ 10 หลัก');
alert('Please enter a 10 digit mobile number.');
return false;
}
var email = document.getElementById("email").value;
if (email == null || email == "") {
alert("กรุณากรอกอีเมลล์");
alert("Please enter your email address.");
return false;
}
var email = $("#email").val();
if (/(.+)@(.+){2,}\.(.+){2,}/.test(email)) { } else {
alert("รูปแบบที่อยู่อีเมลล์ผิด กรุณากรอกให้ถูกต้อง");
alert("Email address format wrong, Please enter the correct number.");
return false;
}
// var email = document.getElementById("email").value;
......@@ -288,12 +288,12 @@
// });
var master_country_id = document.getElementById("master_country_id").value;
if (master_country_id == null || master_country_id == "") {
alert("กรุณาระบุประเทศ");
alert("Please specify country");
return false;
}
var master_province_id = document.getElementById("master_province_id").value;
if (master_province_id == null || master_province_id == "") {
alert("กรุณาระบุจังหวัด");
alert("Please specify province");
return false;
}
......
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