Skip to content

Commit

Permalink
SBA dropdown working!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarow committed Aug 17, 2023
1 parent 1e111e2 commit 8b23d53
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
3 changes: 2 additions & 1 deletion usaon_vta_survey/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def conv_String(self, field_args, **extra):
ResponseSocietalBenefitArea,
only=['societal_benefit_area'],
exclude_fk=False,
# field_args={},
# field_args={'get_label': 'id' },
field_args={'societal_benefit_area': {'get_label': 'id'}},
),
# Response relationships ("edges" from Sankey diagram perspective)
ResponseObservingSystemDataProduct: model_form(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ class SuperForm(FlaskForm):
return redirect(url_for('view_response_sbas', survey_id=survey.id))

form = SuperForm(obj=form_obj)
# breakpoint()
return render_template(
'response/relationships/application_societal_benefit_area.html',
form=form,
Expand Down
28 changes: 9 additions & 19 deletions usaon_vta_survey/templates/response/sbas.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@

{{super()}}

<h3>SBAs</h3>
<table>
<tr>
<th>ALL SBA ID's</th>
</tr>
{% for sba in sbas %}
<tr>
<td>{{ sba.id }}</td>
</tr>
{% endfor %}
</table>
<br> </br>
<h3>Assign societal benefit area</h3>
<form method="POST">
{{form.csrf_token}}
{{societal_benefit_area_fields(form)}}

<input type="submit" value="Select SBA" />
</form>
<br> </br>

<table>
<tr>
Expand Down Expand Up @@ -50,12 +48,4 @@ <h3>SBAs</h3>
{% endfor %}
</table>

<h3>Assign societal benefit area</h3>
<form method="POST">
{{form.csrf_token}}
{{societal_benefit_area_fields(form)}}

<input type="submit" value="Select SBA" />
</form>

{% endblock %}

0 comments on commit 8b23d53

Please sign in to comment.