From a9c5787cb993112ebf6e4cf45fd22aeb8df12c82 Mon Sep 17 00:00:00 2001
From: Laura Beaufort <31420082+lbeaufort@users.noreply.github.com>
Date: Wed, 22 Aug 2018 13:06:19 -0400
Subject: [PATCH] Simplify candidate/committee 2-year-select macros
---
fec/data/templates/macros/cycle-select.jinja | 17 +----------------
.../templates/partials/candidate/raising.jinja | 2 +-
.../templates/partials/candidate/spending.jinja | 2 +-
.../partials/committee/about-committee.jinja | 2 +-
.../templates/partials/committee/filings.jinja | 2 +-
.../partials/committee/financial-summary.jinja | 2 +-
.../templates/partials/committee/raising.jinja | 2 +-
.../templates/partials/committee/spending.jinja | 2 +-
8 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/fec/data/templates/macros/cycle-select.jinja b/fec/data/templates/macros/cycle-select.jinja
index 9404c3001e..c2de526c85 100644
--- a/fec/data/templates/macros/cycle-select.jinja
+++ b/fec/data/templates/macros/cycle-select.jinja
@@ -27,22 +27,7 @@
{% endif %}
{% endmacro %}
-{% macro candidate_cycle_select(cycles, cycle=none, id='') %}
-{% set cycle = cycle | int %}
-
diff --git a/fec/data/templates/partials/candidate/raising.jinja b/fec/data/templates/partials/candidate/raising.jinja
index b4c2124f01..b40f7e7570 100644
--- a/fec/data/templates/partials/candidate/raising.jinja
+++ b/fec/data/templates/partials/candidate/raising.jinja
@@ -5,7 +5,7 @@
- {{ select.candidate_cycle_select(cycles, cycle, id="cycle-5") }}
+ {{ select.two_year_select(cycles, cycle, id="cycle-5") }}
{% if committee_groups['P'] or committee_groups['A']%}
Data is included from these committees:
diff --git a/fec/data/templates/partials/candidate/spending.jinja b/fec/data/templates/partials/candidate/spending.jinja
index 7783883d94..5816689877 100644
--- a/fec/data/templates/partials/candidate/spending.jinja
+++ b/fec/data/templates/partials/candidate/spending.jinja
@@ -7,7 +7,7 @@
- {{ select.candidate_cycle_select(cycles, cycle, id="cycle-4") }}
+ {{ select.two_year_select(cycles, cycle, id="cycle-4") }}
{% if committee_groups['P'] or committee_groups['A']%}
Data is included from these committees:
diff --git a/fec/data/templates/partials/committee/about-committee.jinja b/fec/data/templates/partials/committee/about-committee.jinja
index 892fb0cdba..63f9c04029 100644
--- a/fec/data/templates/partials/committee/about-committee.jinja
+++ b/fec/data/templates/partials/committee/about-committee.jinja
@@ -3,7 +3,7 @@
About this committee
- {{ select.committee_cycle_select(cycles, cycle, 'about')}}
+ {{ select.two_year_select(cycles, cycle, 'about')}}