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
0f8e2c87
authored
Jun 06, 2018
by
Wittaya-PIM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AddCards : ปรับValidate
parent
fedb47c7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
29 deletions
+4
-29
www/src/Template/Element/card_from/from_add_card.ctp
+4
-29
No files found.
www/src/Template/Element/card_from/from_add_card.ctp
View file @
0f8e2c87
...
@@ -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 {
...
...
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