bugfix
Browse files- sdc_view.py +52 -53
sdc_view.py
CHANGED
|
@@ -256,7 +256,7 @@ def render_sdc():
|
|
| 256 |
st.rerun() # Rerun to update the interface
|
| 257 |
|
| 258 |
|
| 259 |
-
|
| 260 |
|
| 261 |
##
|
| 262 |
## Title
|
|
@@ -332,6 +332,7 @@ def render_sdc():
|
|
| 332 |
with colt:
|
| 333 |
if st.button("Load Besser's diversity card", type="secondary"):
|
| 334 |
unflattenedJson = load_state()
|
|
|
|
| 335 |
##
|
| 336 |
## Master info
|
| 337 |
##
|
|
@@ -362,16 +363,15 @@ def render_sdc():
|
|
| 362 |
if st.button("Add governament processes"):
|
| 363 |
add_text_area(key)
|
| 364 |
# Loop over the array and create a text area with a remove button for each element
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
remove_text_area(idx,key)
|
| 375 |
|
| 376 |
# BODIES
|
| 377 |
st.write("Add the different types of governament bodies of your software project (boards and funders)")
|
|
@@ -380,33 +380,32 @@ def render_sdc():
|
|
| 380 |
if st.button("Add governament bodies"):
|
| 381 |
add_text_area(key)
|
| 382 |
# Loop over the array and create a text area with a remove button for each element
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
organization(f"{key}_{idx}_organization")
|
| 410 |
|
| 411 |
with usageContext:
|
| 412 |
colr, coll = st.columns([1, 1])
|
|
@@ -439,21 +438,21 @@ def render_sdc():
|
|
| 439 |
if st.button("Add a team of participants"):
|
| 440 |
add_text_area(key)
|
| 441 |
# Loop over the array and create a text area with a remove button for each element
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
|
| 458 |
|
| 459 |
|
|
|
|
| 256 |
st.rerun() # Rerun to update the interface
|
| 257 |
|
| 258 |
|
| 259 |
+
|
| 260 |
|
| 261 |
##
|
| 262 |
## Title
|
|
|
|
| 332 |
with colt:
|
| 333 |
if st.button("Load Besser's diversity card", type="secondary"):
|
| 334 |
unflattenedJson = load_state()
|
| 335 |
+
|
| 336 |
##
|
| 337 |
## Master info
|
| 338 |
##
|
|
|
|
| 363 |
if st.button("Add governament processes"):
|
| 364 |
add_text_area(key)
|
| 365 |
# Loop over the array and create a text area with a remove button for each element
|
| 366 |
+
|
| 367 |
+
for idx, processes in enumerate(st.session_state[key]):
|
| 368 |
+
# Create two columns: one for the text area, one for the remove button
|
| 369 |
+
col1, col2 = st.columns([6, 1])
|
| 370 |
+
with col1:
|
| 371 |
+
cached_text_area(f"Governament process {idx + 1}", f"governance_govProcesses_{idx}", "Specific the governance rules of the software project. For instance, the funders, or the role and the relation between the different bodies that governs the software.")
|
| 372 |
+
with col2:
|
| 373 |
+
if st.button("Remove", key=f"remove_{key}_{idx}"):
|
| 374 |
+
remove_text_area(idx,key)
|
|
|
|
| 375 |
|
| 376 |
# BODIES
|
| 377 |
st.write("Add the different types of governament bodies of your software project (boards and funders)")
|
|
|
|
| 380 |
if st.button("Add governament bodies"):
|
| 381 |
add_text_area(key)
|
| 382 |
# Loop over the array and create a text area with a remove button for each element
|
| 383 |
+
|
| 384 |
+
for idx, text in enumerate(st.session_state[key]):
|
| 385 |
+
# Create two columns: one for the text area, one for the remove button
|
| 386 |
+
with st.container(border=True):
|
| 387 |
+
col1, col2 = st.columns([3, 2])
|
| 388 |
+
with col1:
|
| 389 |
+
cached_text_input("Body name", f"{key}_{idx}_name", "The name of id of the body")
|
| 390 |
+
cached_text_area("Body description", f"{key}_{idx}_description", "A description of the body")
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
with col2:
|
| 394 |
+
cached_multiple_radio(f"{key}_{idx}_type", ['funders', 'directors', 'administrators', 'other'], f"Body role type" )
|
| 395 |
+
if st.button("Remove", key=f"{key}_remove_{idx}"):
|
| 396 |
+
remove_text_area(idx,f"{key}_remove_{idx}")
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
with st.expander("If needed provide detailed information about the organizations or individuals involved in the governance", expanded=False):
|
| 400 |
+
# Button to add a new text area
|
| 401 |
+
org, individual = st.tabs([
|
| 402 |
+
"Organization",
|
| 403 |
+
"Individual",
|
| 404 |
+
])
|
| 405 |
+
with individual:
|
| 406 |
+
participant(f"{key}_{idx}_participant")
|
| 407 |
+
with org:
|
| 408 |
+
organization(f"{key}_{idx}_organization")
|
|
|
|
| 409 |
|
| 410 |
with usageContext:
|
| 411 |
colr, coll = st.columns([1, 1])
|
|
|
|
| 438 |
if st.button("Add a team of participants"):
|
| 439 |
add_text_area(key)
|
| 440 |
# Loop over the array and create a text area with a remove button for each element
|
| 441 |
+
|
| 442 |
+
for idx, text in enumerate(st.session_state[key]):
|
| 443 |
+
# Create two columns: one for the text area, one for the remove button
|
| 444 |
+
with st.container(border=True):
|
| 445 |
+
col1, col2 = st.columns([2, 2])
|
| 446 |
+
with col1:
|
| 447 |
+
cached_text_input("Team name", f"{key}_{idx}_name", "The name of id of the team")
|
| 448 |
+
cached_text_area("Team description", f"{key}_{idx}_description", "A description of the team")
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
with col2:
|
| 452 |
+
if st.button("Remove", key=f"{key}_remove_{idx}"):
|
| 453 |
+
remove_text_area(idx,f"{key}_remove_{idx}")
|
| 454 |
+
cached_multiple_radio(f"{key}_{idx}_type", ['Development Team', 'NonCoding Contributor', 'Tester Team', 'Public Reporter TEam'], f"Team role type" )
|
| 455 |
+
team(f"{key}_{idx}")
|
| 456 |
|
| 457 |
|
| 458 |
|