Commit 7666d4de by Prasong Putichanchai

update code

parent 7f202ff6
...@@ -78,8 +78,7 @@ ...@@ -78,8 +78,7 @@
data = jQuery.parseJSON(data); data = jQuery.parseJSON(data);
if (data['chkuser'] == true) { if (data['chkuser'] == true) {
$("#noorg_th").text(''); $("#noorg_th").text('');
$("#noorg_th").text(<?php echo __('Register with') ?> + data[0]['org_name_th'] + $("#noorg_th").text("<?php echo __('Register with') ?> + data[0]['org_name_th'] + <?php echo __('already') ?>");
<?php echo __('already') ?>);
$("#nameorg_th").text(''); $("#nameorg_th").text('');
$('#employee').attr("disabled", true); $('#employee').attr("disabled", true);
organize_id.val(''); organize_id.val('');
...@@ -94,7 +93,7 @@ ...@@ -94,7 +93,7 @@
} }
} else { } else {
$("#noorg_th").text(''); $("#noorg_th").text('');
$("#noorg_th").text(<?php echo __('Data not found') ?>); $("#noorg_th").text("<?php echo __('Data not found') ?>");
$("#nameorg_th").text(''); $("#nameorg_th").text('');
$("#noepm_th").text(''); $("#noepm_th").text('');
$("#nameemp_th").text(''); $("#nameemp_th").text('');
...@@ -118,7 +117,7 @@ ...@@ -118,7 +117,7 @@
data = jQuery.parseJSON(data); data = jQuery.parseJSON(data);
if (data['chkuser'] == true) { if (data['chkuser'] == true) {
$("#noepm_th").text(''); $("#noepm_th").text('');
$("#noepm_th").text(<?php echo __('Registered') ?>); $("#noepm_th").text("<?php echo __('Registered') ?>");
$("#nameemp_th").text(''); $("#nameemp_th").text('');
$('#date').attr("disabled", true); $('#date').attr("disabled", true);
date.val(''); date.val('');
...@@ -130,7 +129,7 @@ ...@@ -130,7 +129,7 @@
} }
} else { } else {
$("#noepm_th").text(''); $("#noepm_th").text('');
$("#noepm_th").text(<?php echo __('"Did not find the information you need", Please enter the correct information and press the check.') ?>); $("#noepm_th").text("<?php echo __('"Did not find the information you need", Please enter the correct information and press the check.') ?>");
$("#nameemp_th").text(''); $("#nameemp_th").text('');
$('#date').attr("disabled", true); $('#date').attr("disabled", true);
date.val(''); date.val('');
......
...@@ -81,7 +81,7 @@ use Cake\I18n\Time; ...@@ -81,7 +81,7 @@ use Cake\I18n\Time;
<div class="col-xs-12 col-sm-12 col-md-12"> <div class="col-xs-12 col-sm-12 col-md-12">
<?php echo __('birthdate');?> <?php echo __('birthdate');?>
<em>* </em> <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']); ?> <?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','readonly'=>'readonly']); ?>
<span class="glyphicon glyphicon-calendar form-control-feedback datepicker"></span> <span class="glyphicon glyphicon-calendar form-control-feedback datepicker"></span>
</div> </div>
</div> </div>
......
...@@ -28,35 +28,18 @@ ...@@ -28,35 +28,18 @@
</div> </div>
<!-- ------------------------------- popup ----------------------------------- --> <!-- ------------------------------- popup ----------------------------------- -->
<script> <script>
// function validateForm() {
// var email = document.forms["forgotPressword"]["email"].value;
// if (email == null || email == "") {
// alert(<?php echo __('Please enter your email.');?>);
// return false;
// }
// // Validate Email
// var email = $("#fremail").val();
// if ((/(.+)@(.+){2,}\.(.+){2,}/.test(email)) || email=="" || email==null) { } else {
// alert(<?php echo __('Email address format wrong Please enter the correct.');?>);
// return false;
// }
// }
function validateForm() { function validateForm() {
var email = document.getElementById("email").value; var email = document.forms["forgotPressword"]["email"].value;
if (email == null || email == "") { if (email == null || email == "") {
alert("Please enter your email."); alert(<?php echo __('Please enter your email.');?>);
return false; return false;
} }
// Validate Email // Validate Email
var email = $("#email").val(); var email = $("#fremail").val();
if (/(.+)@(.+){2,}\.(.+){2,}/.test(email)) { } else { if ((/(.+)@(.+){2,}\.(.+){2,}/.test(email)) || email=="" || email==null) { } else {
alert("Email address format wrong Please enter the correct."); alert(<?php echo __('Email address format wrong Please enter the correct.');?>);
return false; return false;
} }
$("body").delegate(".is_active", "click", function () {
$('.is_active').not(this).prop('checked', false);
return true;
});
} }
</script> </script>
<style> <style>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<div class="form-group has-feedback bootstrap-iso"> <div class="form-group has-feedback bootstrap-iso">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-text-sub"><?php echo __('Birthdate');?></label> <label class="label-text-sub"><?php echo __('Birthdate');?></label>
<input type="text" name="birthdate" id="date" placeholder="กรุณาระบุวันเดือนปีเกิด" value="" placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy" class="form-control-reg border-bottom-from"> <input type="text" name="birthdate" id="date" placeholder="กรุณาระบุวันเดือนปีเกิด" value="" placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy" class="form-control-reg border-bottom-from" readonly>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span> <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div> </div>
</div> </div>
......
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
Login.onLogin('<?php echo $token; ?>', '<?php echo $RedirectApplicationURL; ?>', '<?php echo $topic; ?>'); Login.onLogin('<?php echo $token; ?>', '<?php echo $RedirectApplicationURL; ?>', '<?php echo $topic; ?>');
} }
}, 1000); }, 1000);
</script>; </script>
\ No newline at end of file \ No newline at end of file
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