aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-04-28 16:53:28 -0500
committerFrederick Muriuki Muriithi2025-04-28 16:53:28 -0500
commit5f686da1ad6814657b7a699dcafdf58ca3521e33 (patch)
tree184f537b5b74a929829b36391f0394c8fc261553
parentcbaceb34a742047ff43e27b176befd34ef18549a (diff)
downloadgn-uploader-5f686da1ad6814657b7a699dcafdf58ca3521e33.tar.gz
Provide correct redirection uri, and data.HEADmain
-rw-r--r--uploader/publications/views.py2
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-base.html9
-rw-r--r--uploader/templates/publications/create-publication.html2
3 files changed, 10 insertions, 3 deletions
diff --git a/uploader/publications/views.py b/uploader/publications/views.py
index 06fef0b..ebb8740 100644
--- a/uploader/publications/views.py
+++ b/uploader/publications/views.py
@@ -83,7 +83,7 @@ def create_publication():
},))
flash("New publication created!", "alert alert-success")
return redirect(url_for(
- request.args.get("return-to") or "publications.view_publication",
+ request.args.get("return_to") or "publications.view_publication",
publication_id=publications[0]["publication_id"],
**request.args))
diff --git a/uploader/templates/phenotypes/add-phenotypes-base.html b/uploader/templates/phenotypes/add-phenotypes-base.html
index b05a194..a7aaeb0 100644
--- a/uploader/templates/phenotypes/add-phenotypes-base.html
+++ b/uploader/templates/phenotypes/add-phenotypes-base.html
@@ -46,7 +46,14 @@
<legend>Publication Information</legend>
<input type="hidden" name="publication-id" id="txt-publication-id" />
<span class="form-text text-muted">
- Select a publication for your data</span>
+ Select a publication for your data. <br />
+ Can't find a publication you can use? Go ahead and
+ <a href="{{url_for(
+ 'publications.create_publication',
+ return_to='species.populations.phenotypes.add_phenotypes',
+ species_id=species.SpeciesId,
+ population_id=population.Id,
+ dataset_id=dataset.Id)}}">create a new publication</a>.</span>
<table id="tbl-select-publication" class="table compact stripe">
<thead>
<tr>
diff --git a/uploader/templates/publications/create-publication.html b/uploader/templates/publications/create-publication.html
index 1961b4e..3f828a9 100644
--- a/uploader/templates/publications/create-publication.html
+++ b/uploader/templates/publications/create-publication.html
@@ -12,7 +12,7 @@
<div class="row">
<form id="frm-create-publication"
method="POST"
- action="{{url_for('publications.create_publication')}}"
+ action="{{url_for('publications.create_publication', **request.args)}}"
class="form-horizontal">
<div class="row mb-3">