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
fedb47c7
authored
Jun 05, 2018
by
Wittaya-PIM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AddCards : update
parent
adc4a768
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
www/src/Controller/UserCardsController.php
+1
-1
www/src/Template/Element/card_from/from_add_card.ctp
+0
-1
www/webroot/js/validate/jQuery.validate.addValidate.js
+2
-2
No files found.
www/src/Controller/UserCardsController.php
View file @
fedb47c7
...
...
@@ -289,7 +289,7 @@ class UserCardsController extends AppController
$UserEntities
=
$this
->
UserEntities
->
find
(
'all'
,
[
'conditions'
=>
[
'user_id'
=>
$this
->
Auth
->
user
(
'id'
),
'entity_code'
=>
$
TempUserCards
[
'organize_id
'
]
'entity_code'
=>
$
this
->
request
->
data
[
'UserCards'
][
'organize_code
'
]
]
])
->
first
();
if
(
empty
(
$UserEntities
)){
...
...
www/src/Template/Element/card_from/from_add_card.ctp
View file @
fedb47c7
...
...
@@ -62,7 +62,6 @@
var employee = $("#employee");
var date = $("#date");
$(document).ready(function () {
$("#organize_code").on('change', function () {
var organize_code = $("#organize_code").val();
$('#employee').attr("disabled", true);
...
...
www/webroot/js/validate/jQuery.validate.addValidate.js
View file @
fedb47c7
...
...
@@ -71,7 +71,7 @@ jQuery.validator.addMethod('filesize', function (value, element, param) {
jQuery
.
validator
.
addMethod
(
"extension"
,
function
(
value
,
element
,
param
)
{
param
=
typeof
(
param
===
"string"
)
?
param
.
replace
(
/,/g
,
'|'
)
:
"png|jpe?g|gif"
;
return
this
.
optional
(
element
)
||
value
.
match
(
new
RegExp
(
".("
+
param
+
")$"
,
"i"
));
},
jQuery
.
format
(
"นามสกุลของไฟล์แนบต้องเป็น {0} เท่านั้น."
));
},
jQuery
.
validator
.
format
(
"นามสกุลของไฟล์แนบต้องเป็น {0} เท่านั้น."
));
jQuery
.
validator
.
addMethod
(
"accept"
,
function
(
value
,
element
,
param
)
{
var
typeParam
=
typeof
(
param
===
"string"
)
?
param
.
replace
(
/
\s
/g
,
''
).
replace
(
/,/g
,
'|'
)
:
"image/*"
,
optionalValue
=
this
.
optional
(
element
),
...
...
@@ -92,7 +92,7 @@ jQuery.validator.addMethod("accept", function (value, element, param) {
}
}
return
true
;
},
jQuery
.
format
(
"ประเภทของไฟล์แนบต้องเป็น {0} เท่านั้น"
));
},
jQuery
.
validator
.
format
(
"ประเภทของไฟล์แนบต้องเป็น {0} เท่านั้น"
));
jQuery
.
validator
.
addMethod
(
"alphanumeric"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
\w
+$/i
.
test
(
value
);
},
"ตัวอักษร หรือตัวเลขเท่านั้น"
);
...
...
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