Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add button to allow CPS as input data source #831

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions static/js/taxbrain.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,9 @@ $('#current-year-modal').on('hide.bs.modal', function (e) {
$('#start-year-select option').removeAttr("selected");
$('#start-year-select option[value="' + currentYear + '"]').attr("selected", "selected");
});

var Data = $('#cps-or-puf').val();
$('#cps-or-puf').change(function(e) {
$('#cps-or-puf option').removeAttr("selected");
$('#cps-or-puf option[value="' + Data + '"]').attr("selected", "selected");
});
7 changes: 7 additions & 0 deletions templates/taxbrain/input_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ <h2>Tax-Calculator Code Build</h2>
{% endfor %}
</select>
</label>
<label class="cps-button"> Data Source:
<select id="cps-or-puf" class="form-control pull-right">
{% for data in data_sources %}
<option value="{{data}}" {% if data == default_source %} selected {% endif %}>{{data}}</option>
{% endfor %}
</select>
</label>
<div class="reset-button">
{% if is_edit_page %}
<a href="/taxbrain" class="btn btn-tertiary btn-block" style="background-color:#96000b">Reset Parameters</a>
Expand Down
2 changes: 2 additions & 0 deletions webapp/apps/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@

START_YEARS = ('2013', '2014', '2015', '2016', '2017', '2018')
START_YEAR = os.environ.get('START_YEAR', '2017')
DATA_SOURCES = ('CPS', 'PUF')
DEFAULT_SOURCE = os.environ.get('DEFAULT_SOURCE', 'PUF')

TAXCALC_VERS_RESULTS_BACKWARDS_INCOMPATIBLE = "0.13.0"