Skip to content

Commit 20ca9ba

Browse files
authored
Merge pull request #1198 from NHSDigital/DTOSS-12378-image-order
Make image view order consistent
2 parents e4c7085 + d3ee876 commit 20ca9ba

3 files changed

Lines changed: 28 additions & 28 deletions

File tree

manage_breast_screening/mammograms/forms/images/image_details_form.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,33 @@ class RecallChoices(TextChoices):
3434
"No, record as 'partial mammography'",
3535
)
3636

37-
rmlo_count = IntegerField(
38-
label="RMLO",
37+
rcc_count = IntegerField(
38+
label="RCC",
3939
classes="nhsuk-input--width-4",
4040
required=True,
4141
min_value=0,
4242
max_value=20,
4343
initial=1,
4444
error_messages={
45-
"min_value": "Number of RMLO images must be at least 0",
46-
"max_value": "Number of RMLO images must be at most 20",
47-
"invalid": "Enter a valid number of RMLO images",
48-
"required": "Enter the number of RMLO images",
45+
"min_value": "Number of RCC images must be at least 0",
46+
"max_value": "Number of RCC images must be at most 20",
47+
"invalid": "Enter a valid number of RCC images",
48+
"required": "Enter the number of RCC images",
4949
},
5050
widget=StepperInput,
5151
)
52-
rcc_count = IntegerField(
53-
label="RCC",
52+
rmlo_count = IntegerField(
53+
label="RMLO",
5454
classes="nhsuk-input--width-4",
5555
required=True,
5656
min_value=0,
5757
max_value=20,
5858
initial=1,
5959
error_messages={
60-
"min_value": "Number of RCC images must be at least 0",
61-
"max_value": "Number of RCC images must be at most 20",
62-
"invalid": "Enter a valid number of RCC images",
63-
"required": "Enter the number of RCC images",
60+
"min_value": "Number of RMLO images must be at least 0",
61+
"max_value": "Number of RMLO images must be at most 20",
62+
"invalid": "Enter a valid number of RMLO images",
63+
"required": "Enter the number of RMLO images",
6464
},
6565
widget=StepperInput,
6666
)
@@ -80,33 +80,33 @@ class RecallChoices(TextChoices):
8080
},
8181
widget=StepperInput,
8282
)
83-
lmlo_count = IntegerField(
84-
label="LMLO",
83+
lcc_count = IntegerField(
84+
label="LCC",
8585
classes="nhsuk-input--width-4",
8686
required=True,
8787
min_value=0,
8888
max_value=20,
8989
initial=1,
9090
error_messages={
91-
"min_value": "Number of LMLO images must be at least 0",
92-
"max_value": "Number of LMLO images must be at most 20",
93-
"invalid": "Enter a valid number of LMLO images",
94-
"required": "Enter the number of LMLO images",
91+
"min_value": "Number of LCC images must be at least 0",
92+
"max_value": "Number of LCC images must be at most 20",
93+
"invalid": "Enter a valid number of LCC images",
94+
"required": "Enter the number of LCC images",
9595
},
9696
widget=StepperInput,
9797
)
98-
lcc_count = IntegerField(
99-
label="LCC",
98+
lmlo_count = IntegerField(
99+
label="LMLO",
100100
classes="nhsuk-input--width-4",
101101
required=True,
102102
min_value=0,
103103
max_value=20,
104104
initial=1,
105105
error_messages={
106-
"min_value": "Number of LCC images must be at least 0",
107-
"max_value": "Number of LCC images must be at most 20",
108-
"invalid": "Enter a valid number of LCC images",
109-
"required": "Enter the number of LCC images",
106+
"min_value": "Number of LMLO images must be at least 0",
107+
"max_value": "Number of LMLO images must be at most 20",
108+
"invalid": "Enter a valid number of LMLO images",
109+
"required": "Enter the number of LMLO images",
110110
},
111111
widget=StepperInput,
112112
)

manage_breast_screening/mammograms/jinja2/mammograms/image_details.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"classes": "nhsuk-fieldset__legend--s"
1515
}
1616
}) %}
17-
{{ form.rmlo_count.as_field_group() }}
1817
{{ form.rcc_count.as_field_group() }}
18+
{{ form.rmlo_count.as_field_group() }}
1919
{{ form.right_eklund_count.as_field_group() }}
2020
{% endcall %}
2121
</div>
@@ -26,8 +26,8 @@
2626
"classes": "nhsuk-fieldset__legend--s"
2727
}
2828
}) %}
29-
{{ form.lmlo_count.as_field_group() }}
3029
{{ form.lcc_count.as_field_group() }}
30+
{{ form.lmlo_count.as_field_group() }}
3131
{{ form.left_eklund_count.as_field_group() }}
3232
{% endcall %}
3333
</div>

manage_breast_screening/mammograms/tests/views/test_add_image_details_views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ def test_invalid_post_renders_response_with_errors(self, clinical_user_client):
167167
assertInHTML(
168168
"""
169169
<ul class="nhsuk-list nhsuk-error-summary__list">
170-
<li><a href="#id_rmlo_count">Number of RMLO images must be at least 0</a></li>
171170
<li><a href="#id_rcc_count">Enter a valid number of RCC images</a></li>
171+
<li><a href="#id_rmlo_count">Number of RMLO images must be at least 0</a></li>
172172
<li><a href="#id_right_eklund_count">Enter a valid number of Right Eklund images</a></li>
173-
<li><a href="#id_lmlo_count">Number of LMLO images must be at most 20</a></li>
174173
<li><a href="#id_lcc_count">Number of LCC images must be at most 20</a></li>
174+
<li><a href="#id_lmlo_count">Number of LMLO images must be at most 20</a></li>
175175
<li><a href="#id_left_eklund_count">Enter the number of Left Eklund images</a></li>
176176
</ul>
177177
""",

0 commit comments

Comments
 (0)