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
be304415
authored
Jun 06, 2018
by
Teeradone Darunnat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'integration' into teeradone
parents
1e7da6e4
73b7189a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
47 deletions
+22
-47
www/src/Controller/ProfilesController.php
+0
-0
www/src/Template/Element/card_from/from_add_card.ctp
+4
-29
www/src/Template/Profiles/index.ctp
+17
-14
www/webroot/js/validate/jQuery.validate.addValidate.js
+1
-4
No files found.
www/src/Controller/ProfilesController.php
View file @
be304415
www/src/Template/Element/card_from/from_add_card.ctp
View file @
be304415
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
<?php echo $this->Form->create('UserCards', [
<?php echo $this->Form->create('UserCards', [
'id' => 'frmSignIn',
'id' => 'frmSignIn',
'type' => 'file',
'type' => 'file',
'onsubmit' => 'return check();',
'url' => ['controller' => 'user-cards', 'action' => 'view-card']
'url' => ['controller' => 'user-cards', 'action' => 'view-card']
]); ?>
]); ?>
<div class="form-group has-feedback">
<div class="form-group has-feedback">
...
@@ -20,25 +19,22 @@
...
@@ -20,25 +19,22 @@
<?php echo $this->Flash->render(); ?>
<?php echo $this->Flash->render(); ?>
<?php echo $this->Form->hidden('UserCards.user_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'userId', 'type' => 'text', 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->hidden('UserCards.user_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'userId', 'type' => 'text', 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->hidden('UserCards.organize_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_id', 'type' => 'text', 'label' => __('ไอดีใช้งาน'), 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->hidden('UserCards.organize_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_id', 'type' => 'text', 'label' => __('ไอดีใช้งาน'), 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->input('UserCards.organize_code', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_code', 'type' => 'text', 'label' => __('Company Code'), 'placeholder' => 'Company Code']); ?>
<?php echo $this->Form->input('UserCards.organize_code', ['class' => 'form-control-reg border-bottom-from label-text-sub required
alphanumeric
', 'id' => 'organize_code', 'type' => 'text', 'label' => __('Company Code'), 'placeholder' => 'Company Code']); ?>
<label id="nameorg_th" style="color: green"></label>
<label id="nameorg_th" style="color: green"></label>
<label id="noorg_th" style="color: red"></label>
<label id="noorg_th" style="color: red"></label>
</div>
</div>
</div>
</div>
<div class="form-group has-feedback">
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->input('UserCards.employee', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'employee', 'type' => 'text', 'label' => __('Ref 1'), 'placeholder' => 'Ref 1', 'disabled']); ?>
<?php echo $this->Form->input('UserCards.employee', ['class' => 'form-control-reg border-bottom-from label-text-sub required
alphanumeric
', 'id' => 'employee', 'type' => 'text', 'label' => __('Ref 1'), 'placeholder' => 'Ref 1', 'disabled']); ?>
<label id="nameemp_th" style="color: green"></label>
<label id="nameemp_th" style="color: green"></label>
<label id="noepm_th" style="color: red"></label>
<label id="noepm_th" style="color: red"></label>
</div>
</div>
</div>
</div>
<div class="form-group has-feedback bootstrap-iso">
<div class="form-group has-feedback bootstrap-iso">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-12 col-sm-12 col-md-12">
<label class="label-text-sub">
<label class="label-text-sub"><?php echo __('Ref 2');?></label>
<?php echo __('Ref 2');?>
<input type="text" name="UserCards[birthdate]" id="date" placeholder="Ref 2" value="" readonly placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy" class="form-control-reg border-bottom-from required" disabled>
</label>
<input type="text" name="UserCards[birthdate]" id="date" placeholder="Ref 2" value="" readonly placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy"
class="form-control-reg border-bottom-from" disabled>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div>
</div>
</div>
</div>
...
@@ -53,9 +49,6 @@
...
@@ -53,9 +49,6 @@
</div>
</div>
<!--/.col-xs-12 -->
<!--/.col-xs-12 -->
<?php $this->append('scriptBottom'); ?>
<?php $this->append('scriptBottom'); ?>
<script type="text/javascript">
<script type="text/javascript">
var organize_id = $("#organize_id");
var organize_id = $("#organize_id");
...
@@ -147,24 +140,6 @@
...
@@ -147,24 +140,6 @@
date_input.datepicker(options);
date_input.datepicker(options);
});
});
function check() {
if ($("#organize_code").val() == '') {
alert("<?php echo __('Please enter Company Code') ?>");
organize_id.focus();
return false;
}
if (employee.val() == '') {
alert("<?php echo __('Please enter Ref1') ?>");
employee.focus();
return false;
}
if (date.val() == '') {
alert("<?php echo __('Please enter Ref2') ?>");
date.focus();
return false;
}
}
</script>
</script>
<style>
<style>
#alertBox {
#alertBox {
...
...
www/src/Template/Profiles/index.ctp
View file @
be304415
...
@@ -66,8 +66,9 @@ use Cake\I18n\Time;
...
@@ -66,8 +66,9 @@ use Cake\I18n\Time;
<?php echo __('firstname');?>
<?php echo __('firstname');?>
<em>* </em>
<em>* </em>
<?php echo $this->Form->input('UserPersonals.firstname_th', [
<?php echo $this->Form->input('UserPersonals.firstname_th', [
'class' => 'form-control-reg border-bottom-from label-text-sub required',
'class' => 'form-control-reg border-bottom-from label-text-sub required letterthai',
'value' => $responseUserPersonal['firstname_th'], 'id' => 'firstname_th',
'value' => $responseUserPersonal['firstname_th'],
'id' => 'firstname_th',
'type' => 'text', 'label' => false,
'type' => 'text', 'label' => false,
'minlength' => '4',
'minlength' => '4',
'placeholder' => 'firstname'
'placeholder' => 'firstname'
...
@@ -80,8 +81,9 @@ use Cake\I18n\Time;
...
@@ -80,8 +81,9 @@ use Cake\I18n\Time;
<?php echo __('lastname');?>
<?php echo __('lastname');?>
<em>* </em>
<em>* </em>
<?php echo $this->Form->input('UserPersonals.lastname_th', [
<?php echo $this->Form->input('UserPersonals.lastname_th', [
'class' => 'form-control-reg border-bottom-from label-text-sub required',
'class' => 'form-control-reg border-bottom-from label-text-sub required letterthai',
'value' => $responseUserPersonal['lastname_th'], 'id' => 'lastname_th',
'value' => $responseUserPersonal['lastname_th'],
'id' => 'lastname_th',
'type' => 'text', 'label' => false,
'type' => 'text', 'label' => false,
'minlength' => '4',
'minlength' => '4',
'placeholder' => 'lastname'
'placeholder' => 'lastname'
...
@@ -157,7 +159,8 @@ use Cake\I18n\Time;
...
@@ -157,7 +159,8 @@ use Cake\I18n\Time;
<?php echo $this->Form->input('UserPersonals.moblie_no', [
<?php echo $this->Form->input('UserPersonals.moblie_no', [
'class' => 'form-control-reg border-bottom-from label-text-sub required digits',
'class' => 'form-control-reg border-bottom-from label-text-sub required digits',
'value' => $responseUserPersonal['moblie_no'],
'value' => $responseUserPersonal['moblie_no'],
'id' => 'moblieNo', 'type' => 'text',
'id' => 'moblieNo',
'type' => 'text',
'label' => false,
'label' => false,
'maxlength' => '10',
'maxlength' => '10',
'minlength' => '10',
'minlength' => '10',
...
@@ -171,7 +174,7 @@ use Cake\I18n\Time;
...
@@ -171,7 +174,7 @@ use Cake\I18n\Time;
<?php echo __('email');?>
<?php echo __('email');?>
<em>* </em>
<em>* </em>
<?php echo $this->Form->input('UserPersonals.email', [
<?php echo $this->Form->input('UserPersonals.email', [
'class' => 'form-control-reg border-bottom-from label-text-sub required email',
'class' => 'form-control-reg border-bottom-from label-text-sub required email
emailtext
',
'value' => $responseUserPersonal['email'],
'value' => $responseUserPersonal['email'],
'id' => 'email',
'id' => 'email',
'name' => 'email',
'name' => 'email',
...
@@ -652,14 +655,14 @@ use Cake\I18n\Time;
...
@@ -652,14 +655,14 @@ use Cake\I18n\Time;
});
});
});
});
$("#moblieNo").on('change',function(){
//
$("#moblieNo").on('change',function(){
var elem = document.getElementById('moblieNo').value;
//
var elem = document.getElementById('moblieNo').value;
// console.log(elem);
//
// console.log(elem);
if(!elem.match(/^([A-Za-zก-๙])+$/i)){
//
if(!elem.match(/^([A-Za-zก-๙])+$/i)){
alert("<?php echo __('only numbers'); ?>");
//
alert("<?php echo __('only numbers'); ?>");
return false;
//
return false;
}
//
}
});
//
});
//==================================================
//==================================================
// CHANGE Province According Country
// CHANGE Province According Country
...
...
www/webroot/js/validate/jQuery.validate.addValidate.js
View file @
be304415
...
@@ -27,14 +27,11 @@
...
@@ -27,14 +27,11 @@
| ------------------------------------------------------------------------------------------------------------------
| ------------------------------------------------------------------------------------------------------------------
*/
*/
jQuery
.
validator
.
addMethod
(
"emailtext"
,
function
(
value
,
element
)
{
jQuery
.
validator
.
addMethod
(
"emailtext"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
([
a-zA-Z@_.
])
+$/
.
test
(
value
);
return
this
.
optional
(
element
)
||
/^
([
a-zA-Z
0-9
@_.
])
+$/
.
test
(
value
);
},
"โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง."
);
},
"โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง."
);
jQuery
.
validator
.
addMethod
(
"letterthai"
,
function
(
value
,
element
)
{
jQuery
.
validator
.
addMethod
(
"letterthai"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
([
a-zA-Zก-๙
])
+$/
.
test
(
value
);
return
this
.
optional
(
element
)
||
/^
([
a-zA-Zก-๙
])
+$/
.
test
(
value
);
},
"เฉพาะตัวอักษรเท่านั้น."
);
},
"เฉพาะตัวอักษรเท่านั้น."
);
jQuery
.
validator
.
addMethod
(
"letterthai"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
([
a-zA-Zก-๙
])
+$/
.
test
(
value
);
},
"เฉพาะตัวอักษรเท่านั้น."
);
jQuery
.
validator
.
addMethod
(
"letters"
,
function
(
value
,
element
)
{
jQuery
.
validator
.
addMethod
(
"letters"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
a-zA-Z
]
+$/i
.
test
(
value
);
return
this
.
optional
(
element
)
||
/^
[
a-zA-Z
]
+$/i
.
test
(
value
);
},
"เฉพาะตัวอักษรเท่านั้น."
);
},
"เฉพาะตัวอักษรเท่านั้น."
);
...
...
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