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
2faaee2b
authored
May 24, 2018
by
Teeradone-PIM
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'integration' into teeradone
parents
51fcd1b7
751cd56f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
297 additions
and
52 deletions
+297
-52
www/src/Template/UserCards/view_card.ctp
+61
-52
www/src/Template/Users/change_forgotpassword.ctp
+236
-0
No files found.
www/src/Template/UserCards/view_card.ctp
View file @
2faaee2b
...
@@ -10,11 +10,11 @@ use Cake\I18n\Time;
...
@@ -10,11 +10,11 @@ use Cake\I18n\Time;
</div>
</div>
</div>
</div>
<div class="col-xs-9 col-sm-9 col-md-9 box-card">
<div class="col-xs-9 col-sm-9 col-md-9 box-card">
<div data-toggle="modal" data-target="#defaultModal" style="
text-align: center; cursor: pointer
;">
<div data-toggle="modal" data-target="#defaultModal" style="
cursor: pointer; padding-right: 10px; padding-left: 10px
;">
<div class="row">
<div class="row">
<div class="col-xs-1">
<
!-- <
div class="col-xs-1">
</div>
</div>
-->
<div class="col-xs-
6
">
<div class="col-xs-
8
">
<div style="font-size: 17px">
<div style="font-size: 17px">
<br>
<br>
<label>id<label>
<label>id<label>
...
@@ -26,30 +26,29 @@ use Cake\I18n\Time;
...
@@ -26,30 +26,29 @@ use Cake\I18n\Time;
<label style="font-size: 17px">ชื่อ</label> <?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
<label style="font-size: 17px">ชื่อ</label> <?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
</div>
</div>
</div>
</div>
<div class="col-xs-4">
<div class="col-xs-4">
<img src="/img/core/img/user-profile@3x.png" class="img-responsive">
<img src="/img/core/img/user-profile@3x.png" class="img-responsive">
</div>
</div>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-xs-1">
<
!-- <
div class="col-xs-1">
</div>
</div>
-->
<div class="col-xs-10">
<div class="col-xs-10">
<label style="font-size: 17px">ตำแหน่ง</label> <?php echo $value['position_name'] ?>
<label style="font-size: 17px">ตำแหน่ง</label> <?php echo $value['position_name'] ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row text-center">
<div class="col-xs-1">
<!-- <div class="col-xs-1">
</div>
</div> -->
<div class="col-xs-5">
<br>
<div class="col-xs-6">
<?php
<?php
$now = new Time($value['date_issued']);
$now = new Time($value['date_issued']);
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateIssued);
echo $this->DateFormat->formatDateThai($dateIssued);
?>
?>
</div>
</div>
<div class="col-xs-
5
">
<div class="col-xs-
6
">
<?php
<?php
$now = new Time($value['date_expiry']);
$now = new Time($value['date_expiry']);
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
...
@@ -57,13 +56,13 @@ use Cake\I18n\Time;
...
@@ -57,13 +56,13 @@ use Cake\I18n\Time;
?>
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row
text-center
">
<div class="col-xs-1">
<
!-- <
div class="col-xs-1">
</div>
</div>
-->
<div class="col-xs-
5
">
<div class="col-xs-
6
">
<label style="font-size: 17px">วันออกบัตร</label>
<label style="font-size: 17px">วันออกบัตร</label>
</div>
</div>
<div class="col-xs-
5
">
<div class="col-xs-
6
">
<label style="font-size: 17px">วันหมดออายุ</label>
<label style="font-size: 17px">วันหมดออายุ</label>
</div>
</div>
</div>
</div>
...
@@ -186,18 +185,18 @@ use Cake\I18n\Time;
...
@@ -186,18 +185,18 @@ use Cake\I18n\Time;
<div class = "row rotate270 form_1">
<div class = "row rotate270 form_1">
<?php echo $this->Html->image('/img/core/img/card-bg-front@3x.png', array('div' => false, 'class' => 'img-responsive img-rounded','style' => 'position: absolute;')); ?>
<?php echo $this->Html->image('/img/core/img/card-bg-front@3x.png', array('div' => false, 'class' => 'img-responsive img-rounded','style' => 'position: absolute;')); ?>
<div class="row date-name">
<div class="row date-name">
<div class="col-xs-1">
<
!-- <
div class="col-xs-1">
</div>
</div>
-->
<div class="col-xs-
6
">
<div class="col-xs-
8
">
<
div style="font-size: 17px"
>
<
br
>
<br
>
<div
>
<label>id<label>
<label>id<
/
label>
</div>
</div>
<div>
<div>
<?php echo $value['card_code'] ?>
<?php echo $value['card_code'] ?>
</div>
</div>
<div>
<div>
<labe
l style="font-size: 17px"
>ชื่อ</label> <?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
<labe>ชื่อ</label> <?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
</div>
</div>
</div>
</div>
<div class="col-xs-4">
<div class="col-xs-4">
...
@@ -205,23 +204,23 @@ use Cake\I18n\Time;
...
@@ -205,23 +204,23 @@ use Cake\I18n\Time;
</div>
</div>
</div>
</div>
<div class="row date-position">
<div class="row date-position">
<div class="col-xs-1">
<
!-- <
div class="col-xs-1">
</div>
</div>
-->
<div class="col-xs-1
0
">
<div class="col-xs-1
2
">
<label
style="font-size: 17px"
>ตำแหน่ง</label> <?php echo $value['position_name'] ?>
<label>ตำแหน่ง</label> <?php echo $value['position_name'] ?>
</div>
</div>
</div>
</div>
<div class="row date-time">
<div class="row
text-center
date-time">
<div class="col-xs-1">
<
!-- <
div class="col-xs-1">
</div>
</div>
-->
<div class="col-xs-
5
">
<div class="col-xs-
6
">
<?php
<?php
$now = new Time($value['date_issued']);
$now = new Time($value['date_issued']);
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateIssued);
echo $this->DateFormat->formatDateThai($dateIssued);
?>
?>
</div>
</div>
<div class="col-xs-
5
">
<div class="col-xs-
6
">
<?php
<?php
$now = new Time($value['date_expiry']);
$now = new Time($value['date_expiry']);
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
...
@@ -229,14 +228,14 @@ use Cake\I18n\Time;
...
@@ -229,14 +228,14 @@ use Cake\I18n\Time;
?>
?>
</div>
</div>
</div>
</div>
<div class="row date-label">
<div class="row
text-center
date-label">
<div class="col-xs-1">
<
!-- <
div class="col-xs-1">
</div>
</div>
-->
<div class="col-xs-
5
">
<div class="col-xs-
6
">
<label
style="font-size: 17px"
>วันออกบัตร</label>
<label>วันออกบัตร</label>
</div>
</div>
<div class="col-xs-
5
">
<div class="col-xs-
6
">
<label
style="font-size: 17px"
>วันหมดออายุ</label>
<label>วันหมดออายุ</label>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -411,27 +410,37 @@ use Cake\I18n\Time;
...
@@ -411,27 +410,37 @@ use Cake\I18n\Time;
-o-transform: rotate(270deg);
-o-transform: rotate(270deg);
writing-mode: rl-tb;
writing-mode: rl-tb;
position: absolute;
position: absolute;
font-size:
2
0px;
font-size:
3
0px;
}
}
.form_1 .date-name{
.form_1 .date-name{
width: 350px;
width: 500px;
margin: 70% 0% 0% -20%;
margin: 55% 0% 0% -40%;
border-bottom:0px solid red;
}
.date-name div div{
height:35px;
}
}
.form_1 .date-position{
.form_1 .date-position{
width: 350px;
width: 500px;
margin: 55% 0% 0% 5%;
margin: 70% 0% 0% -15%;
border-bottom:0px solid #000;
}
}
.form_1 .date-time{
.form_1 .date-time{
width: 350px;
width: 500px;
margin: 70% 0% 0% 17%;
margin: 70% 0% 0% 10%;
border-bottom:0px solid #000;
}
}
.form_1 .date-label{
.form_1 .date-label{
width: 350px;
width: 500px;
margin: 70% 0% 0% 25%;
margin: 70% 0% 0% 20%;
border-bottom:0px solid #000;
}
}
</style>
</style>
...
...
www/src/Template/Users/change_forgotpassword.ctp
0 → 100644
View file @
2faaee2b
<div class="row">
<div class="center">
<div class="title_header" style="padding-top: 20px;"><a href="javascript:history.go(-1)"><?php echo $this->Html->image('/img/core/img/back-icon@3x.png', ['style' => 'float: left;padding-left: 15px;padding-top: 5px;']); ?></a><?php echo __('เปลี่ยนรหัสผ่าน');?></div>
</div>
<div class="col-md-12">
<!-- <div class="alert alert-warning" role="alert" style="margin: 10px 0px 10px 0px;font-size: 17px;text-align: center;">
<strong><?php echo __('กรุณา! ตรวจสอบอีเมลล์ของท่าน');?></strong>
</div>-->
<?php echo $this->Form->create(null, ['url' => ['controller' => 'Users','action' => 'changePassword/'.$token],'class' => 'form-horizontal','id' => '','name' => 'changeForgotpassword','role' => 'form', 'onsubmit' => 'return validateForm()']);?>
<?php echo $this->Flash->render(); ?>
</div>
<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="password" placeholder="********" class="form-control-reg border-bottom-from" id="password" onkeyup='check();'>
<span class="glyphicon glyphicon-eye-open form-control-feedback"></span>
</div>
</div>
</div>
<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="confirm_password" placeholder="********" class="form-control-reg border-bottom-from" id="confirm_password" onkeyup='check();'>
<span class="glyphicon glyphicon-eye-close form-control-feedback" id='message'></span>
</div>
</div>
</div>
<div>
<?php
echo $this->Form->submit('ตรวจสอบ', array('div' => false, 'class' => 'btn btn-quaternary mr-xs mb-sm button-text',
'name' => 'btn', 'id' => '', 'title' => 'Title'));
?>
</div>
<?php echo $this->Form->end(); ?>
</div>
</div>
<!-- ------------------------------- popup ----------------------------------- -->
<script>
function validateForm() {
var password = document.forms["changeForgotpassword"]["password"].value;
if (password == null || password == "") {
alert("กรุณากรอก รหัสผ่านใหม่");
return false;
}
if(document.forms["changeForgotpassword"]["password"].value.length < 8)
{
alert('กรุณาระบุรหัสผ่านใหม่อย่างน้อย 8 ตัวอักษร');
return false;
}
var confirm_password = document.forms["changeForgotpassword"][["confirm_password"]].value;
if (confirm_password == null || confirm_password == "") {
alert("กรุณากรอก ยืนยันรหัสผ่าน");
return false;
}
if(document.forms["changeForgotpassword"]["confirm_password"].value.length < 8)
{
alert('กรุณาระบุยืนยันรหัสผ่านอย่างน้อย 8 ตัวอักษร');
return false;
}
if(document.forms["changeForgotpassword"]["password"].value != document.forms["changeForgotpassword"]["confirm_password"].value){
alert('กรุณาระบุรหัสผ่านให้ตรงกัน');
//document.createAccount.confirm_password.focus();
return false;
}
}
</script>
<style>
#alertBox {
position:relative;
width:300px;
min-height:100px;
/*margin-top:50px;*/
border:1px solid #666;
background-color:#fff;
background-repeat:no-repeat;
background-position:20px 30px;
left: 0;
right: 0;
top: 100px;
z-index: 2;
}
#modalContainer > #alertBox {
position:fixed;
}
#alertBox h1 {
margin:0;
font:bold 0.9em verdana,arial;
background-color:#000;
color:#FFF;
border-bottom:1px solid #000;
padding:2px 0 2px 5px;
}
#alertBox p {
font-size: 14px;
height: 30px;
padding: 10px;
/* margin-left: 55px; */
text-align: center;
}
#alertBox #closeBtn {
display:block;
position:relative;
margin:5px auto;
padding:7px;
border:0 none;
width:70px;
font:0.7em verdana,arial;
text-transform:uppercase;
text-align:center;
color:#FFF;
background-color:#000;
border-radius: 3px;
text-decoration:none;
}
/* unrelated styles */
#mContainer {
position:relative;
width:600px;
margin:auto;
padding:5px;
border-top:2px solid #000;
border-bottom:2px solid #000;
font:0.7em verdana,arial;
}
h1,h2 {
margin:0;
padding:4px;
font:bold 1.5em verdana;
border-bottom:1px solid #000;
text-align: center;
}
code {
font-size:1.2em;
color:#069;
}
#credits {
position:relative;
margin:25px auto 0px auto;
width:350px;
font:0.7em verdana;
border-top:1px solid #000;
border-bottom:1px solid #000;
height:90px;
padding-top:4px;
}
#credits img {
float:left;
margin:5px 10px 5px 0px;
border:1px solid #000000;
width:80px;
height:79px;
}
.important {
background-color:#F5FCC8;
padding:2px;
}
code span {
color:green;
}
</style>
<script>
var ALERT_TITLE = "";
var ALERT_BUTTON_TEXT = "Ok";
if (document.getElementById) {
window.alert = function (txt) {
createCustomAlert(txt);
}
}
function createCustomAlert(txt) {
d = document;
if (d.getElementById("modalContainer"))
return;
mObj = d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));
mObj.id = "modalContainer";
mObj.style.height = d.documentElement.scrollHeight + "px";
alertObj = mObj.appendChild(d.createElement("div"));
alertObj.id = "alertBox";
if (d.all && !window.opera)
alertObj.style.top = document.documentElement.scrollTop + "px";
alertObj.style.left = (d.documentElement.scrollWidth - alertObj.offsetWidth) / 2 + "px";
alertObj.style.visiblity = "visible";
h1 = alertObj.appendChild(d.createElement("h1"));
h1.appendChild(d.createTextNode(ALERT_TITLE));
msg = alertObj.appendChild(d.createElement("p"));
//msg.appendChild(d.createTextNode(txt));
msg.innerHTML = txt;
btn = alertObj.appendChild(d.createElement("a"));
btn.id = "closeBtn";
btn.appendChild(d.createTextNode(ALERT_BUTTON_TEXT));
btn.href = "#";
btn.focus();
btn.onclick = function () {
removeCustomAlert();
return false;
}
alertObj.style.display = "block";
}
function removeCustomAlert() {
document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"));
}
function ful() {
alert('Alert this pages');
}
</script>
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