Skip to content

Commit

Permalink
fix template fail and dropdown comment
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourpeas committed Dec 9, 2024
1 parent 30edb53 commit a0015be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
</div>

<div class="field">
{% url "epilepsy_cause" multiaxial_diagnosis_id=multiaxial_diagnosis.pk as hx_post %} {% include 'epilepsy12/partials/page_elements/select_model.html' with choices=epilepsy_causes field_name='preferredTerm' field_name2='term' hx_post=hx_post hx_name='epilepsy_cause' hx_default_text='Select a cause' hx_swap='innerHTML' hx_target='#epilepsy_causes' hx_trigger='change' test_positive=multiaxial_diagnosis.epilepsy_cause.pk label=multiaxial_diagnosis.get_epilepsy_cause_help_label_text reference=multiaxial_diagnosis.get_epilepsy_cause_help_reference_text enabled=perms.epilepsy12.change_multiaxialdiagnosis allow_none=True %}
{% url "epilepsy_cause" multiaxial_diagnosis_id=multiaxial_diagnosis.pk as hx_post %} {% include 'epilepsy12/partials/page_elements/select_model.html' with choices=epilepsy_causes field_name='preferredTerm' field_name2='term' hx_post=hx_post hx_name='epilepsy_cause' hx_default_text='Select a cause (optional field)' hx_swap='innerHTML' hx_target='#epilepsy_causes' hx_trigger='change' test_positive=multiaxial_diagnosis.epilepsy_cause.pk label=multiaxial_diagnosis.get_epilepsy_cause_help_label_text reference=multiaxial_diagnosis.get_epilepsy_cause_help_reference_text enabled=perms.epilepsy12.change_multiaxialdiagnosis allow_none=True %}
</div>
6 changes: 3 additions & 3 deletions templates/epilepsy12/partials/page_elements/select_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ <h5 class="rcpch_plain_label">
<div class="default text">{{hx_default_text}}</div>
<div class="menu">
{% if allow_none %}
<div class="item" data-value="empty">No choice made</div>
<div class="item" data-value="empty">Not available in the list (defaults to empty on selection)</div>
{% endif %} {% for item in choices %}
<div class="item" data-value="{{item.pk}}">
{% value_for_field_name item field_name False %} {%
value_for_field_name item field_name2 True %}
{% value_for_field_name item field_name False %}
{% value_for_field_name item field_name2 True %}
</div>
{% endfor %}
</div>
Expand Down

0 comments on commit a0015be

Please sign in to comment.