Few changes at the governance part
Browse files- sdc_view.py +7 -5
sdc_view.py
CHANGED
@@ -153,10 +153,10 @@ def render_sdc():
|
|
153 |
st.session_state[agekey] = 0 # default value
|
154 |
# Display a number input widget
|
155 |
st.slider(
|
156 |
-
label="The age of the participant:",
|
157 |
-
value=60,
|
158 |
min_value=0,
|
159 |
max_value=120,
|
|
|
160 |
key=agekey,
|
161 |
on_change=lambda: (st.session_state.form_data.update({key: st.session_state[agekey]}), save_to_cache())[1]
|
162 |
)
|
@@ -222,12 +222,13 @@ def render_sdc():
|
|
222 |
with governance:
|
223 |
col1, col2 = st.columns([1, 2])
|
224 |
with col1:
|
225 |
-
cached_text_input("Project Type", "governance_projectType", "Specify the type of software project (private, public funded, non-profit, driven by an open-source community, etc.)")
|
226 |
-
|
227 |
with col2:
|
228 |
# Multiple value
|
229 |
key = "governance_govProcesses"
|
230 |
init_state(key)
|
|
|
231 |
if st.button("Add governament processes"):
|
232 |
add_text_area(key)
|
233 |
# Loop over the array and create a text area with a remove button for each element
|
@@ -241,6 +242,7 @@ def render_sdc():
|
|
241 |
remove_text_area(idx,key)
|
242 |
|
243 |
# BODIES
|
|
|
244 |
key = "governance_bodies"
|
245 |
init_state(key)
|
246 |
if st.button("Add governament bodies"):
|
@@ -259,7 +261,7 @@ def render_sdc():
|
|
259 |
with col2:
|
260 |
if st.button("Remove", key=f"{key}_remove_{idx}"):
|
261 |
remove_text_area(idx,key)
|
262 |
-
|
263 |
|
264 |
st.text("If participants in the body are individuals please use the individuals tab. If not, leave it blank.")
|
265 |
# Button to add a new text area
|
|
|
153 |
st.session_state[agekey] = 0 # default value
|
154 |
# Display a number input widget
|
155 |
st.slider(
|
156 |
+
label="The average age of the participant:",
|
|
|
157 |
min_value=0,
|
158 |
max_value=120,
|
159 |
+
value=(10,20),
|
160 |
key=agekey,
|
161 |
on_change=lambda: (st.session_state.form_data.update({key: st.session_state[agekey]}), save_to_cache())[1]
|
162 |
)
|
|
|
222 |
with governance:
|
223 |
col1, col2 = st.columns([1, 2])
|
224 |
with col1:
|
225 |
+
#cached_text_input("Project Type", "governance_projectType", "Specify the type of software project (private, public funded, non-profit, driven by an open-source community, etc.)")
|
226 |
+
cached_multiple_radio("governance_projectType",["public funded", "research", "private", "private non-profit", "driven by open-source community", "citizen science"],"Specify the type of software project")
|
227 |
with col2:
|
228 |
# Multiple value
|
229 |
key = "governance_govProcesses"
|
230 |
init_state(key)
|
231 |
+
st.write("Define the set of governament process of your software project")
|
232 |
if st.button("Add governament processes"):
|
233 |
add_text_area(key)
|
234 |
# Loop over the array and create a text area with a remove button for each element
|
|
|
242 |
remove_text_area(idx,key)
|
243 |
|
244 |
# BODIES
|
245 |
+
st.write("Add the different types of governament bodies of your software project (boards and funders)")
|
246 |
key = "governance_bodies"
|
247 |
init_state(key)
|
248 |
if st.button("Add governament bodies"):
|
|
|
261 |
with col2:
|
262 |
if st.button("Remove", key=f"{key}_remove_{idx}"):
|
263 |
remove_text_area(idx,key)
|
264 |
+
cached_multiple_radio(f"{key}_{idx}_type", ['funders', 'directors', 'administrators', 'other'], f"Body role type" )
|
265 |
|
266 |
st.text("If participants in the body are individuals please use the individuals tab. If not, leave it blank.")
|
267 |
# Button to add a new text area
|