-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2211 from WikiWatershed/mjm/gms-download
Add button for default GMS file download
- Loading branch information
Showing
7 changed files
with
86 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<form id="export-gms-form" method="post" action="/mmw/modeling/export/gms/" target="_blank"> | ||
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrftoken }}"> | ||
<input type="hidden" name="filename" class="gms-filename" value="export.gms"> | ||
<!-- Put `gis_data` in single quotes, to keep any unescaped chars from breaking the template --> | ||
<input type="hidden" name="mapshed_data" value='{{ gis_data }}'> | ||
</form> |
16 changes: 13 additions & 3 deletions
16
src/mmw/js/src/modeling/templates/scenarioAddChangesButton.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
<div class="tab-content scenario-toolbar-tab-content"></div> | ||
{% if isOnlyCurrentConditions %} | ||
{% if isOnlyCurrentConditions and isGwlfe %} | ||
<button id="download-cc-gms" class="btn btn-link" type="button" aria-expanded="true"> | ||
<i class="fa fa-download"></i> Export GMS | ||
</button> | ||
|
||
{% include "./gmsDownloadForm.html" %} | ||
|
||
{% endif %} | ||
<div class="right-controls-container"> | ||
<div class="tab-content scenario-toolbar-tab-content"></div> | ||
{% if isOnlyCurrentConditions %} | ||
<button id="add-changes" class="btn btn-link" type="button" aria-expanded="true"> | ||
<i class="fa fa-plus-circle"></i> Add changes to this area | ||
</button> | ||
{% endif %} | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,3 +70,8 @@ | |
} | ||
} | ||
} | ||
|
||
// Hidden form for GMS file downloads | ||
#export-gms-form { | ||
display: none; | ||
} |