Commit 7666d4de by Prasong Putichanchai

update code

parent 7f202ff6
......@@ -78,8 +78,7 @@
data = jQuery.parseJSON(data);
if (data['chkuser'] == true) {
$("#noorg_th").text('');
$("#noorg_th").text(<?php echo __('Register with') ?> + data[0]['org_name_th'] +
<?php echo __('already') ?>);
$("#noorg_th").text("<?php echo __('Register with') ?> + data[0]['org_name_th'] + <?php echo __('already') ?>");
$("#nameorg_th").text('');
$('#employee').attr("disabled", true);
organize_id.val('');
......@@ -94,7 +93,7 @@
}
} else {
$("#noorg_th").text('');
$("#noorg_th").text(<?php echo __('Data not found') ?>);
$("#noorg_th").text("<?php echo __('Data not found') ?>");
$("#nameorg_th").text('');
$("#noepm_th").text('');
$("#nameemp_th").text('');
......@@ -118,7 +117,7 @@
data = jQuery.parseJSON(data);
if (data['chkuser'] == true) {
$("#noepm_th").text('');
$("#noepm_th").text(<?php echo __('Registered') ?>);
$("#noepm_th").text("<?php echo __('Registered') ?>");
$("#nameemp_th").text('');
$('#date').attr("disabled", true);
date.val('');
......@@ -130,7 +129,7 @@
}
} else {
$("#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('');
$('#date').attr("disabled", true);
date.val('');
......
......@@ -81,7 +81,7 @@ use Cake\I18n\Time;
<div class="col-xs-12 col-sm-12 col-md-12">
<?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']); ?>
<?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>
</div>
</div>
......
......@@ -28,35 +28,18 @@
</div>
<!-- ------------------------------- popup ----------------------------------- -->
<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() {
var email = document.getElementById("email").value;
var email = document.forms["forgotPressword"]["email"].value;
if (email == null || email == "") {
alert("Please enter your email.");
alert(<?php echo __('Please enter your email.');?>);
return false;
}
// Validate Email
var email = $("#email").val();
if (/(.+)@(.+){2,}\.(.+){2,}/.test(email)) { } else {
alert("Email address format wrong Please enter the correct.");
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;
}
$("body").delegate(".is_active", "click", function () {
$('.is_active').not(this).prop('checked', false);
return true;
});
}
</script>
<style>
......
......@@ -82,7 +82,7 @@
<div class="form-group has-feedback bootstrap-iso">
<div class="col-md-12">
<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>
</div>
</div>
......
......@@ -6,4 +6,4 @@
Login.onLogin('<?php echo $token; ?>', '<?php echo $RedirectApplicationURL; ?>', '<?php echo $topic; ?>');
}
}, 1000);
</script>;
\ No newline at end of file
</script>
\ 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