diff --git a/.travis.yml b/.travis.yml index 2b8af934..230ef22b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ install: - export PATH="$HOME/miniconda/bin:$PATH" - python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' - pushd deploy + - conda clean --all -y - ./install_taxbrain_server.sh - popd - source activate aei_dropq diff --git a/RELEASES.md b/RELEASES.md index c319be35..3b06eeb3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4,7 +4,7 @@ Go [here](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pulls?q=is%3Apr+is%3Aclosed) for a complete commit history. -Release 1.5.0 on 2018-03-13 +Release 1.5.0 on 2018-03-14 ---------------------------- **Major Changes** - None @@ -12,6 +12,7 @@ Release 1.5.0 on 2018-03-13 **Minor Changes** - [#835](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pull/835/) - Add button to allow CPS as input data source - Sean Wang, Anderson Frailey, and Hank Doupe - [#842](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pull/842/) - Gray out fields based on data-source selection - Hank Doupe and Sean Wang +- [#847](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pull/847) - Adds data source to file input page, refactors reform submission, and improves tests - Hank Doupe **Bug Fixes** - [#844](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pull/842/) - Pass start year to dynamic behavioral - Hank Doupe diff --git a/requirements.txt b/requirements.txt index 60247c71..a1b7d540 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,3 +25,4 @@ boto django-storages django-htmlmin pyparsing +python-dateutil diff --git a/static/js/filetb.js b/static/js/filetb.js index c2d6ecba..c06602d9 100644 --- a/static/js/filetb.js +++ b/static/js/filetb.js @@ -78,7 +78,7 @@ $('#id_factor_adjustment, #id_factor_target').focus(function() { var currentYear = $('#start-year-select').val(); $('#start-year-select').change(function(e) { - $('#current-year-link').attr('href', '/taxbrain/file/?start_year=' + $(this).val()); + $('#current-year-link').attr('href', '/taxbrain/file/?start_year=' + $(this).val() + '&data_source=' + $('#data-source-select').val()); $('#current-year-modal').modal('show'); }); @@ -86,3 +86,14 @@ $('#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 dataSource = $('#data-source-select').val(); +$('#data-source-select').change(function(e) { + $('#data-source-link').attr('href', '/taxbrain/file/?start_year=' + $('#start-year-select').val() + '&data_source=' + $(this).val()); + $('#data-source-modal').modal('show'); +}); + +$('#data-choice-modal').on('hide.bs.modal', function (e) { + $('#data-source option').removeAttr("selected"); + $('#data-source option[value="' + dataSource + '"]').attr("selected", "selected"); +}); diff --git a/templates/taxbrain/input_file.html b/templates/taxbrain/input_file.html index 8ea2749f..87a38200 100644 --- a/templates/taxbrain/input_file.html +++ b/templates/taxbrain/input_file.html @@ -124,7 +124,7 @@