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
c4abb1f6
authored
May 21, 2018
by
Teeradone-PIM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teeradone
parent
fc9ff95a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
1 deletions
+67
-1
www/src/Template/Profiles/index.ctp
+67
-1
No files found.
www/src/Template/Profiles/index.ctp
View file @
c4abb1f6
...
...
@@ -50,7 +50,7 @@ public function generate(){
<br><br>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->create('UserProfiles', ['id' => 'frmSignIn', 'type' => 'file']); ?>
<?php echo $this->Form->create('UserProfiles', ['id' => 'frmSignIn', 'type' => 'file'
, 'name' => 'frmSignIn'
]); ?>
<?php echo $this->Flash->render() ?>
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
...
...
@@ -205,6 +205,72 @@ public function generate(){
</div>
</div>
<?php $this->append('scriptBottom'); ?>
<script>
function validateForm() {
var firstname = document.forms["createAccount"]["firstname"].value;
if (firstname == null || firstname == "") {
alert("กรุณากรอกชื่อ");
return false;
}
var lastname = document.forms["createAccount"]["lastname"].value;
if (lastname == null || lastname == "") {
alert("กรุณากรอกนามสกุล");
return false;
}
var username = document.forms["createAccount"]["username"].value;
if (username == null || username == "") {
alert("กรุณากรอกชื่อผู้ใช้งานของท่าน");
return false;
}
// var birthdate = document.forms["createAccount"]["birthdate"].value;
// if (birthdate == null || birthdate == "") {
// alert("กรุณากรอก วันเดือนปีเกิดของท่าน");
// return false;
// }
// var person_card_no = document.forms["createAccount"]["person_card_no"].value;
// if (person_card_no == null || person_card_no == "") {
// alert("กรุณากรอกเลขบัตรประชาชน");
// return false;
// }
// if(document.forms["createAccount"]["data[person_card_no]"].value.length < 13 || document.forms["createAccount"]["data[person_card_no]"].value.length > 13)
// {
// alert('กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก');
// return false;
// }
var phone_no = document.forms["createAccount"]["phone_no"].value;
// if (phone_no == null || phone_no == "") {
// alert("กรุณากรอก เบอร์โทรศัพท์ของท่าน");
// return false;
}
if(document.forms["createAccount"]["phone_no"].value.length < 10 || document.forms["createAccount"]["phone_no"].value.length > 10)
{
alert('กรุณากรอกเบอร์โทรศัพท์ ให้ครบ 10 หลัก');
return false;
}
// var lastname = document.forms["createAccount"]["data[lastname]"].value;
// if (lastname == null || lastname == "") {
// alert("กรุณากรอกรหัสผ่าน");
// return false;
// }
var email = document.forms["createAccount"]["email"].value;
if (email == null || email == "") {
alert("กรุณากรอกอีเมลล์");
return false;
}
// Validate Email
var email = $("#fremail").val();
if ((/(.+)@(.+){2,}\.(.+){2,}/.test(email)) || email=="" || email==null) { } else {
alert("รูปแบบที่อยู่อีเมลล์ผิด กรุณากรอกให้ถูกต้อง");
return false;
}
}
</script>
<script type="text/javascript">
$(function () {
$('#moblieNo').inputmask('999-999-9999');
...
...
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