aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2021-06-01 16:40:16 +0300
committerBonfaceKilz2021-06-01 17:09:05 +0300
commit23c9d5eef66f159c422b136be9a837b6700208a4 (patch)
tree5ba74ddf005e62ec703b6eda77e844cba42c9270
parent8de5c32c4846b0382ded05ddb633ab67e5e062c8 (diff)
downloadgenenetwork2-23c9d5eef66f159c422b136be9a837b6700208a4.tar.gz
templates: edit_trait: Add "changed" class to hidden input values
When a form element changes, it's marked as changed. Only input elements with "changed" get submitted. Since we need to submit the "hidden" input fields, we add "changed" to them anyways.
-rw-r--r--wqflask/wqflask/templates/edit_trait.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/wqflask/templates/edit_trait.html b/wqflask/wqflask/templates/edit_trait.html
index 05bdebd1..393b8c39 100644
--- a/wqflask/wqflask/templates/edit_trait.html
+++ b/wqflask/wqflask/templates/edit_trait.html
@@ -148,12 +148,12 @@ Submit Trait | Reset
</div>
</div>
<div class="controls" style="display:block; margin-left: 40%; margin-right: 20%;">
- <input name="dataset-name" type="hidden" value="{{ publish_xref.id_ }}"/>
- <input name="phenotype-id" type="hidden" value="{{ publish_xref.phenotype_id }}"/>
- <input name="inbred-set-id" type="hidden" value="{{ publish_xref.inbred_set_id }}"/>
- <input name="comments" type="hidden" value="{{ publish_xref.comments }}"/>
- <input type="submit" style="width: 125px; margin-right: 25px;" class="btn btn-primary form-control col-xs-2" value="Submit Change">
- <input type="reset" style="width: 110px;" class="btn btn-primary form-control col-xs-2" onClick="window.location.reload();" value="Reset">
+ <input name="dataset-name" class="changed" type="hidden" value="{{ publish_xref.id_ }}"/>
+ <input name="phenotype-id" class="changed" type="hidden" value="{{ publish_xref.phenotype_id }}"/>
+ <input name="inbred-set-id" class="changed" type="hidden" value="{{ publish_xref.inbred_set_id }}"/>
+ <input name="comments" class="changed" type="hidden" value="{{ publish_xref.comments }}"/>
+ <input type="submit" style="width: 125px; margin-right: 25px;" class="btn btn-primary form-control col-xs-2 changed" value="Submit Change">
+ <input type="reset" style="width: 110px;" class="btn btn-primary form-control col-xs-2 changed" onClick="window.location.reload();" value="Reset">
</div>
</form>