You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/views/documents/_form.html.erb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
<%= simple_form_for [@document] do |f| %>
2
2
<%= f.association :service, collection: Service.order('name ASC'), hint: "If your service isn't on the list, please contact the team" %>
3
-
<%= f.input :name, hint: "Name of this document", placeholder: "e.g. \"Privacy Policy\"" %>
3
+
<%= f.input :name, collection: Document::VALID_NAMES, hint: 'Name of the document', selected: 'Privacy Policy'%>
4
4
<%= f.input :url, hint: "Where we should fetch this document", placeholder: "e.g. \"https://www.facebook.com/about/privacy\"" %>
5
5
<%= f.input :xpath, input_html: { value: (f.object.xpath.present?) ? f.object.xpath : '//body' }, placeholder: "e.g. \"//*[@id='content']//div[@class='_5tkp _3m9']\"", hint: "The location of the terms on the page (Using <a href=\"https://en.wikipedia.org/wiki/XPath\" title=\"Wikipedia explanation of XPath\" target=\"_blank\">XPath</a>.)".html_safe %>
6
6
<%= f.input :crawler_server, collection: (Rails.env.development?) ? DocumentsController::DEV_CRAWLERS : DocumentsController::PROD_CRAWLERS, label_method: :second, value_method: :first, hint: "<a href=\"https://to.tosdr.org/U98u1\">Select from which country the crawler should be used, or a specific crawler. Useful if blocked by EU. (Optional)</a>".html_safe, selected: @document.crawler_server || "eu.crawler.api.tosdr.org" %>
0 commit comments