Skip to content

Commit

Permalink
Issue #37 2b
Browse files Browse the repository at this point in the history
  • Loading branch information
bkop-ds committed Jan 23, 2024
1 parent 3537490 commit cdaa384
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions confluence.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,14 @@ export const confluence = async () => {
// .getElementById("amendmentno")
// .addEventListener("click", amendFormSelect);
// if (!eraLogin) {
// document.getElementById("loginERa").addEventListener("click", async function () {
// document.getElementById("logineRA").addEventListener("click", async function () {
// location.href = `https://stsstg.nih.gov/auth/oauth/v2/authorize?response_type=code&client_id=ff775e46-ec74-46a3-b19f-ee2c60e8cf11&redirect_uri=https://episphere.github.io/dataplatform/&scope=openid+company+email+profile`
// });
// }
if (eraLogin) {
await dataForm();
} else {
document.getElementById("loginERa").addEventListener("click", async function () {
document.getElementById("logineRA").addEventListener("click", async function () {
localStorage.setItem('lastURL', '#data_access/form');
location.href = `https://stsstg.nih.gov/auth/oauth/v2/authorize?response_type=code&client_id=ff775e46-ec74-46a3-b19f-ee2c60e8cf11&redirect_uri=https://episphere.github.io/dataplatform/&scope=openid+company+email+profile`
});
Expand Down
22 changes: 20 additions & 2 deletions src/pages/dataRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ export const formSection = async (activeTab, showDescripton) => {
</div>
<div class="data-submission div-border font-size-18" style="padding-left: 1rem; padding-right: 1rem;">
<div class="input-group input-group2">
<button class="nav-link nav-menu-links custom-btn" title="Login ERa" id="loginERa">
<img src="./static/images/era.png"> Login ERa
<button class="nav-link nav-menu-links custom-btn" title="Login eRA" id="logineRA">
<img src="./static/images/era.png"> Login eRA
</button>
</div>
</div>
Expand Down Expand Up @@ -461,6 +461,24 @@ template += `
<label><input id="confirmation" name="confirmation" type="checkbox" value="Yes" required/><b> Please confirm that ALL the named investigators have read AND agreed to be named on this proposal?</b><span class='required-label'>*</span></label>
</div>
<br>
<p><u><b>Data Selected</b></u></p>
<div class="input-group">
<label for="datatitle"><b>Title</b></label>
<input id="datatitle" name="datatitle" type="text" value="${JSON.parse(localStorage.dataSelected).title}" readonly/>
</div>
<div class="input-group">
<label for="datajournal"><b>Journal</b></label>
<input id="datajournal" name="datajournal" type="text" value="${JSON.parse(localStorage.dataSelected).journal}" readonly/>
</div>
<div class="input-group">
<label for="dataauthor"><b>Author of Article</b></label>
<input id="dataauthor" name="dataauthor" type="text" value="${JSON.parse(localStorage.dataSelected).author}" readonly/>
</div>
<div class="input-group">
<label for="datadate"><b>Article Date</b></label>
<input id="datadate" name="datadate" type="text" value="${JSON.parse(localStorage.dataSelected).date}" readonly/>
</div>
<br>
<p><u><b>Project Description</b></u></p>
<div class="input-group">
<p>Please provide a concise description of Background, Aims, and Analysis Plan.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/publicationpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ const renderStudyDescription = (descriptions, pageSize, headers, signedIn) => {
if(signedIn) {
template += `
<div class-"col-md-1">
<button title="Link To Data Access" class="buttonsubmit" onclick="window.location.href = '#data_access/form'"><span class="buttonsubmit__text"> Request Data </span></button>
<button title="Link To Data Access" class="buttonsubmit" data-id='{"title": "${desc["title"]}", "author": "${desc["author"]}", "date": "${desc["date"]}", "journal": "${desc["journal_name"]}"}' onClick="localStorage.setItem('dataSelected', JSON.stringify($(this).data('id'))); window.location.href = '#data_access/form'"><span class="buttonsubmit__text"> Request Data </span></button>
</div>
`
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/uploaddata.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const dataUploadForm = async () => {
</form>
`
document.getElementById("uploadFormView").innerHTML = template;
// document.getElementById("loginERa").addEventListener("click", async function () {
// document.getElementById("logineRA").addEventListener("click", async function () {
// location.href = `https://stsstg.nih.gov/auth/oauth/v2/authorize?response_type=code&client_id=ff775e46-ec74-46a3-b19f-ee2c60e8cf11&redirect_uri=https://episphere.github.io/dataplatform/&state=${config.iniAppLocal.stateIni}`
// });
var currentTab = 0;
Expand Down

0 comments on commit cdaa384

Please sign in to comment.