Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
75c9a1a2
Commit
75c9a1a2
authored
Jul 04, 2019
by
Valentin Benozillo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Fix radio field validation
parent
e95b12d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.js
...lateItem/web_page_module/rjs_gadget_erp5_radiofield_js.js
+13
-3
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_radiofield_js.js
View file @
75c9a1a2
...
@@ -29,7 +29,8 @@
...
@@ -29,7 +29,8 @@
}
}
rJS
(
window
)
rJS
(
window
)
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
field_json
=
options
.
field_json
||
{},
var
field_json
=
options
.
field_json
||
{},
state_dict
=
{
state_dict
=
{
...
@@ -151,11 +152,20 @@
...
@@ -151,11 +152,20 @@
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
()
{
var
name
=
this
.
state
.
name
;
var
name
=
this
.
state
.
name
,
gadget
=
this
,
empty
;
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
if
(
this
.
state
.
editable
&&
this
.
state
.
required
)
{
return
this
.
getContent
()
return
this
.
getContent
()
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
return
!
result
[
name
];
empty
=
!
result
[
name
];
if
(
empty
)
{
return
gadget
.
notifyInvalid
(
"
Please fill out this field.
"
);
}
return
gadget
.
notifyValid
();
})
.
push
(
function
()
{
return
!
empty
;
});
});
}
}
return
true
;
return
true
;
...
...
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