Position <span class="hint"> elements to the right of normal <input> elements and underneath <textarea> elements. Fixes form hints being badly positioned on some pages.
18 lines
1022 B
Plaintext
18 lines
1022 B
Plaintext
<%= simple_form_for(@artist) do |f| %>
|
|
<% if @artist.new_record? %>
|
|
<%= f.input :name, as: :string, input_html: { data: { autocomplete: "tag" } } %>
|
|
<% elsif CurrentUser.user.is_builder? %>
|
|
<%= f.input :name, as: :string, input_html: { data: { autocomplete: "tag" } }, hint: "Change to rename this artist entry and its wiki page" %>
|
|
<% else %>
|
|
<p><%= @artist.name %></p>
|
|
<% end %>
|
|
|
|
<%= f.input :other_names_string, label: "Other names", as: :text, input_html: { size: "50x1" }, hint: '<b style="color: red;">NEW</b> Separate names with spaces, not commas. Use underscores for spaces inside names.'.html_safe %>
|
|
<%= f.input :group_name %>
|
|
<%= f.input :url_string, :label => "URLs", :as => :text, :input_html => {:size => "50x5", :value => params.dig(:artist, :url_string) || @artist.urls.join("\n")}, :hint => "You can prefix a URL with - to mark it as dead." %>
|
|
|
|
<%= dtext_field "artist", "notes" %>
|
|
<%= f.button :submit, "Submit" %>
|
|
<%= dtext_preview_button "artist", "notes" %>
|
|
<% end %>
|