Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web-ui
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WEBGDE-Components
web-ui
Commits
0ac1a3fd
Commit
0ac1a3fd
authored
Sep 15, 2023
by
Owen Ryan Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XML Generation logic changes to accommodate radiolist changes.
parent
9550d9c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
generateFields.js
...bContent/WebGde-Widgets/DataInputWidget/generateFields.js
+8
-3
XML_Saver.js
...e/WebContent/WebGde-Widgets/Submit/XMLWriter/XML_Saver.js
+6
-4
No files found.
WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
View file @
0ac1a3fd
...
...
@@ -481,7 +481,10 @@ const inputChecklist = (key, validation) => {
checkbox
.
name
=
`checkboxChoices_
${
key
}
`
;
checkbox
.
classList
.
add
(
"checkboxOption"
);
checkbox
.
value
=
item
;
if
(
index
==
0
)
checkbox
.
setAttribute
(
'id'
,
`
${
key
}
`
);
if
(
index
==
0
)
{
checkbox
.
classList
.
add
(
"checkboxFirst"
);
checkbox
.
setAttribute
(
'id'
,
`
${
key
}
`
);
}
div
.
appendChild
(
checkbox
);
var
label
=
document
.
createTextNode
(
item
);
...
...
@@ -571,8 +574,10 @@ const inputRadiolist = (key, validation) => {
radio
.
name
=
`radioChoices_
${
key
}
`
;
radio
.
classList
.
add
(
"radioOption"
);
radio
.
value
=
item
;
if
(
index
==
0
)
radio
.
setAttribute
(
'id'
,
`
${
key
}
`
);
if
(
index
==
0
)
{
radio
.
classList
.
add
(
'radioFirst'
);
radio
.
setAttribute
(
'id'
,
`
${
key
}
`
);
}
var
label
=
document
.
createTextNode
(
item
);
radioDiv
.
appendChild
(
radio
);
radioDiv
.
appendChild
(
label
);
...
...
WebGde/WebContent/WebGde-Widgets/Submit/XMLWriter/XML_Saver.js
View file @
0ac1a3fd
...
...
@@ -33,8 +33,9 @@ export async function WriteForm(e,metrics,doctype,section) {
continue
;
}
// If the first radio button was found
if
(
fid
==
'Radio_List'
)
{
const
radioButtons
=
document
.
getElementsByName
(
'radioChoices'
);
if
(
Nodes
[
i
].
classList
.
contains
(
'radioFirst'
))
{
var
key
=
fid
;
const
radioButtons
=
document
.
getElementsByName
(
`radioChoices_
${
key
}
`
);
let
selectedValue
;
//check if the value is checked to find the selected value
radioButtons
.
forEach
(
radio
=>
{
...
...
@@ -50,8 +51,9 @@ export async function WriteForm(e,metrics,doctype,section) {
}
// If the first checkbox was found
if
(
fid
==
'Checkbox_List'
)
{
const
checkboxButtons
=
document
.
getElementsByName
(
'checkboxChoices'
);
if
(
Nodes
[
i
].
classList
.
contains
(
'checkboxFirst'
))
{
var
key
=
fid
;
const
checkboxButtons
=
document
.
getElementsByName
(
`checkboxChoices_
${
key
}
`
);
let
selectedValue
=
''
;
let
isFirstChecked
=
true
;
// Variable to track the first checked checkbox
//check each checkbox if it is checked to find the values.
...
...
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