Open "buy credits" link in new tab in creating listings (#3506)

* open in new tab

* add no opener and no referrer rel to links opening in new tab
This commit is contained in:
Mario See 2019-07-22 11:08:36 -04:00 committed by Ben Halpern
parent 95a9e13922
commit ed35ab71a5

View file

@ -78,7 +78,7 @@
<h3>Listings Require Credits</h3>
<% end %>
<div class="listings-current-credits-inner">
You have <%= pluralize @credits.size, "credit" %> available — <a href="/credits/purchase" data-no-instant>Buy More</a>
You have <%= pluralize @credits.size, "credit" %> available — <a target="_blank" rel="noopener noreferrer" href="/credits/purchase" data-no-instant>Buy More</a>
</div>
<% if @organizations.present? %>
<div class="listings-current-credits-inner">
@ -88,7 +88,7 @@
<% end %>
</select>
has <span id="org-credits-number"><%= @organizations.first.unspent_credits_count %></span> credits -
<a id="org-credits-purchase-link" href="/credits/purchase?organization_id=<%= @organizations.first.id %>" data-no-instant>Buy More</a>
<a id="org-credits-purchase-link" target="_blank" rel="noopener noreferrer" href="/credits/purchase?organization_id=<%= @organizations.first.id %>" data-no-instant>Buy More</a>
</div>
<%= javascript_pack_tag "orgCreditsSelector", defer: true %>
<% end %>