Commit 32e0c1de by Teeradone-PIM

teeradone return change

parent f2e72c36
...@@ -8,6 +8,14 @@ ...@@ -8,6 +8,14 @@
</div>--> </div>-->
<?php echo $this->Form->create(null, ['url' => ['controller' => 'Users','action' => 'changePassword/'.$token],'class' => 'form-horizontal','id' => '','name' => 'changePressword','role' => 'form', 'onsubmit' => 'return validateForm()']);?> <?php echo $this->Form->create(null, ['url' => ['controller' => 'Users','action' => 'changePassword/'.$token],'class' => 'form-horizontal','id' => '','name' => 'changePressword','role' => 'form', 'onsubmit' => 'return validateForm()']);?>
<?php echo $this->Flash->render(); ?> <?php echo $this->Flash->render(); ?>
<div>
<div class="form-group has-feedback">
<div class="col-md-12">
<label class="label-text-sub"><?php echo __('รหัสผ่านเก่า');?></label>
<input type="password" value="" name="oldpassword" placeholder="********" class="form-control-reg border-bottom-from" id="oldpassword" onkeyup='check();'>
<span class="glyphicon glyphicon-eye-close form-control-feedback" id='message'></span>
</div>
</div>
</div> </div>
<div> <div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
...@@ -46,6 +54,16 @@ ...@@ -46,6 +54,16 @@
<script> <script>
function validateForm() { function validateForm() {
var password = document.forms["changePressword"]["oldpassword"].value;
if (password == null || password == "") {
alert("กรุณากรอก รหัสผ่านเก่า");
return false;
}
if(document.forms["changePressword"]["oldpassword"].value.length < 8)
{
alert('กรุณาระบุรหัสผ่านเก่าอย่างน้อย 8 ตัวอักษร');
return false;
}
var password = document.forms["changePressword"]["password"].value; var password = document.forms["changePressword"]["password"].value;
if (password == null || password == "") { if (password == null || password == "") {
alert("กรุณากรอก รหัสผ่านใหม่"); alert("กรุณากรอก รหัสผ่านใหม่");
......
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