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
2d65c262
authored
May 18, 2018
by
Teeradone-PIM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teeradone: regster แก้ไข Province
parent
3e1fe137
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
26 deletions
+1
-26
www/src/Controller/UsersController.php
+0
-25
www/src/Template/Users/signup.ctp
+1
-1
No files found.
www/src/Controller/UsersController.php
View file @
2d65c262
...
@@ -414,29 +414,4 @@ class UsersController extends AppController
...
@@ -414,29 +414,4 @@ class UsersController extends AppController
$this
->
checkToken
();
$this
->
checkToken
();
}
}
public
function
getProvince
()
{
$this
->
autoRender
=
false
;
$this
->
loadModel
(
'MasterProvinces'
);
$states
=
array
();
$id
=
$this
->
request
->
data
(
'id'
);
$states
=
$this
->
MasterProvinces
->
find
(
'list'
,
array
(
'keyField'
=>
'id'
,
'valueField'
=>
'province_name_th'
,
'conditions'
=>
array
(
'master_country_id'
=>
$id
)
))
->
toArray
();
$arr
=
array
();
if
(
!
empty
(
$states
)){
echo
'<option value=""> ---Select--- </option>'
;
foreach
(
$states
as
$key
=>
$val
){
echo
'<option value="'
.
$key
.
'">'
.
$val
.
'</option>'
;
}
}
else
{
return
false
;
}
}
}
}
www/src/Template/Users/signup.ctp
View file @
2d65c262
...
@@ -440,7 +440,7 @@
...
@@ -440,7 +440,7 @@
$("#master_province_id").html('');
$("#master_province_id").html('');
$.ajax({
$.ajax({
type: "POST",
type: "POST",
url: '/
user
s/getProvince',
url: '/
province
s/getProvince',
data: dataString,
data: dataString,
cache: false,
cache: false,
success: function (html) {
success: function (html) {
...
...
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