mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
fixed the issue
This commit is contained in:
parent
4259fa44f9
commit
ec743a7420
1 changed files with 6 additions and 5 deletions
|
@ -3,12 +3,13 @@
|
|||
remote: true, :html=> { :id => "protocolsio-import-form" }) do |f| %>
|
||||
|
||||
<%= hidden_field_tag :json_object, JSON.generate(@json_object) %>
|
||||
|
||||
<% if URI.parse(request.referrer).query %>
|
||||
<%= hidden_field_tag :type,CGI.parse(URI.parse(request.referrer).query).fetch('type') %>
|
||||
<% else %>
|
||||
<%= hidden_field_tag :type,'public' %>
|
||||
<% byebug %>
|
||||
<% url_query = Rack::Utils.parse_query URI(request.referrer).query %>
|
||||
<% type_privacy = "public" %>
|
||||
<% if url_query.key?("type") && url_query["type"]=="private" %>
|
||||
<% type_privacy = "private" %>
|
||||
<% end %>
|
||||
<%= hidden_field_tag :type, type_privacy %>
|
||||
<!--Get the type of protocol to import (private, public) from the url -->
|
||||
<div
|
||||
id="modal-import-json-protocol-preview"
|
||||
|
|
Loading…
Reference in a new issue