diff options
author | zsloan | 2021-06-01 20:59:46 +0000 |
---|---|---|
committer | zsloan | 2021-06-01 20:59:46 +0000 |
commit | 10f57df31e9e2974780332917e88a0b9a42344dc (patch) | |
tree | e61713fc0fe5e1f2ff6e45edfc32b86a66e4623e /wqflask | |
parent | c196bced9203625b4fa35d8d2752b70893ad3488 (diff) | |
parent | 271be90f028bf7027f7398251e989ab77f7a9499 (diff) | |
download | genenetwork2-10f57df31e9e2974780332917e88a0b9a42344dc.tar.gz |
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/edit_trait.html | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/wqflask/wqflask/templates/edit_trait.html b/wqflask/wqflask/templates/edit_trait.html index 2cd8a6fd..f01c497c 100644 --- a/wqflask/wqflask/templates/edit_trait.html +++ b/wqflask/wqflask/templates/edit_trait.html @@ -38,7 +38,7 @@ Submit Trait | Reset <div class="form-group"> <label for="post-pub-desc" class="col-sm-2 control-label">Post Publication Description:</label> <div class="col-sm-8"> - <textarea name="pre-pub-desc" class="form-control" rows="4">{{ phenotype.post_pub_description |default('', true) }}</textarea> + <textarea name="post-pub-desc" class="form-control" rows="4">{{ phenotype.post_pub_description |default('', true) }}</textarea> </div> </div> <div class="form-group"> @@ -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> @@ -162,5 +162,13 @@ Submit Trait | Reset {% block js %} <script> gn_server_url = "{{ gn_server_url }}"; + function MarkAsChanged(){ + $(this).addClass("changed"); + } + $(":input").blur(MarkAsChanged).change(MarkAsChanged); + + $("input[type=submit]").click(function(){ + $(":input:not(.changed)").attr("disabled", "disabled"); + }); </script> {% endblock %} |