Skip to content

Commit

Permalink
JS fix, cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
machinehum committed Oct 31, 2023
1 parent cf4eaab commit 48fdce3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
4 changes: 3 additions & 1 deletion app/views/admin/system/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,12 @@
if(window.localStorage.getItem('utm_source')) {
campaignElement.value = window.localStorage.getItem('utm_source');
}
var formElement = document.getElementById('edit_study_finder_system_info_1');
var formElement = document.getElementById('edit_system_info_1');
formElement.addEventListener('submit', function (evt) {
evt.preventDefault();
window.localStorage.setItem('utm_source', campaignElement.value);
this.submit();
}, false);
});

</script>
25 changes: 11 additions & 14 deletions app/views/themed/_home_lower_right.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<h2 class="mt-3">Join a national registry!</h2>
<div class="row5">
<div class="col-md-12">
<%= link_to "https://researchmatch.org?rm=<%= @system_info.research_match_campaign" do %>
<%= image_tag "rsm-large.jpg", class: 'img-fluid', style: 'width: 50%;' %>
<% end %>
</div>
<div >

<!-- <a href="https://researchmatch.org?rm=<%= @system_info.research_match_campaign %>" target:"_blank">
<h3 class="hyperlink-header">ResearchMatch</h3>
</a> -->
<p>ResearchMatch.org connects volunteers with research studies across the country. Volunteers of any age, race, ethnicity, or health status are invited to join. Log on, register, and receive emails when studies might be a good fit for you.</p>
</div>
</div>
<div class="row5">
<div class="col-md-12">
<%= link_to "https://researchmatch.org?rm=<%= @system_info.research_match_campaign" do %>
<%= image_tag "rsm-large.jpg", class: 'img-fluid', style: 'width: 50%;' %>
<% end %>
</div>
<div >

<p>ResearchMatch.org connects volunteers with research studies across the country. Volunteers of any age, race, ethnicity, or health status are invited to join. Log on, register, and receive emails when studies might be a good fit for you.</p>
</div>
</div>

0 comments on commit 48fdce3

Please sign in to comment.