diff --git a/app/assets/javascripts/Components/Modals/filter_modal.jsx b/app/assets/javascripts/Components/Modals/filter_modal.jsx index 97a24c2278..78099734fc 100644 --- a/app/assets/javascripts/Components/Modals/filter_modal.jsx +++ b/app/assets/javascripts/Components/Modals/filter_modal.jsx @@ -186,135 +186,133 @@ export class FilterModal extends React.Component { {I18n.t("results.filter_submissions")} -
-
-
-
-
-

{I18n.t("results.filters.order_by")}

- { - this.props.mutateFilterData({ - ...this.props.filterData, - orderBy: selection, - }); +
+
+
+
+

{I18n.t("results.filters.order_by")}

+ { + this.props.mutateFilterData({ + ...this.props.filterData, + orderBy: selection, + }); + }} + defaultValue={I18n.t("activerecord.attributes.group.group_name")} + /> +
+ { + this.props.mutateFilterData({...this.props.filterData, ascending: true}); }} - defaultValue={I18n.t("activerecord.attributes.group.group_name")} + id={"Asc"} + data-testid={"ascending"} /> -
- { - this.props.mutateFilterData({...this.props.filterData, ascending: true}); - }} - id={"Asc"} - data-testid={"ascending"} - /> - - { - this.props.mutateFilterData({...this.props.filterData, ascending: false}); - }} - id={"Desc"} - data-testid={"descending"} - /> - -
-
-
-

{I18n.t("activerecord.attributes.result.marking_state")}

- { - this.props.mutateFilterData({ - ...this.props.filterData, - markingState: selection, - }); + + { + this.props.mutateFilterData({...this.props.filterData, ascending: false}); }} + id={"Desc"} + data-testid={"descending"} /> +
-
-
-

{I18n.t("activerecord.models.tag.other")}

- {this.renderTagsDropdown()} -
-
-

{I18n.t("activerecord.models.section.one")}

- { - this.props.mutateFilterData({ - ...this.props.filterData, - section: selection, - }); - }} - defaultValue={""} - /> -
+
+

{I18n.t("activerecord.attributes.result.marking_state")}

+ { + this.props.mutateFilterData({ + ...this.props.filterData, + markingState: selection, + }); + }} + />
-
- {this.renderTasDropdown()} -
-

{I18n.t("activerecord.models.annotation.one")}

- - this.props.mutateFilterData({ - ...this.props.filterData, - annotationText: e.target.value, - }) - } - placeholder={I18n.t("results.filters.text_box_placeholder")} - /> -
+
+
+
+

{I18n.t("activerecord.models.tag.other")}

+ {this.renderTagsDropdown()}
- -
- {this.rangeFilter( - this.props.filterData.totalMarkRange.min, - this.props.filterData.totalMarkRange.max, - I18n.t("results.total_mark"), - this.onTotalMarkMinChange, - this.onTotalMarkMaxChange - )} - {this.rangeFilter( - this.props.filterData.totalExtraMarkRange.min, - this.props.filterData.totalExtraMarkRange.max, - I18n.t("results.total_extra_marks"), - this.onTotalExtraMarkMinChange, - this.onTotalExtraMarkMaxChange - )} +
+

{I18n.t("activerecord.models.section.one")}

+ { + this.props.mutateFilterData({ + ...this.props.filterData, + section: selection, + }); + }} + defaultValue={""} + />
+
+ {this.renderTasDropdown()} +
+

{I18n.t("activerecord.models.annotation.one")}

+ + this.props.mutateFilterData({ + ...this.props.filterData, + annotationText: e.target.value, + }) + } + placeholder={I18n.t("results.filters.text_box_placeholder")} + /> +
+
+ +
+ {this.rangeFilter( + this.props.filterData.totalMarkRange.min, + this.props.filterData.totalMarkRange.max, + I18n.t("results.total_mark"), + this.onTotalMarkMinChange, + this.onTotalMarkMaxChange + )} + {this.rangeFilter( + this.props.filterData.totalExtraMarkRange.min, + this.props.filterData.totalExtraMarkRange.max, + I18n.t("results.total_extra_marks"), + this.onTotalExtraMarkMinChange, + this.onTotalExtraMarkMaxChange + )} +
-
-
- - -
-
- +
+
+
+ + +
+
); }