artists: fix edit form fields not being prefilled.
* Fix the artist URLs field not being prefilled when clicking "Create new artist" in the "Fetch source data" box. * Fix the artist name field not being prefilled when clicking "Create new artist entry" on the /artists/show_or_new?name=<name> page.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<%= f.input :other_names_comma, :hint => "Separate with commas", :as => :text, :label => "Other names" %>
|
||||
<%= f.input :group_name %>
|
||||
<%= f.input :url_string, :label => "URLs", :as => :text, :input_html => {:size => "50x5", :value => @artist.url_array.join("\n")} %>
|
||||
<%= f.input :url_string, :label => "URLs", :as => :text, :input_html => {:size => "50x5", :value => params.dig(:artist, :url_string) || @artist.url_array.join("\n")} %>
|
||||
|
||||
<%= dtext_field "artist", "notes" %>
|
||||
<%= f.button :submit, "Submit" %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= render layout: "show" do %>
|
||||
<div>
|
||||
<p>This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(name: params[:name]) %>.</p>
|
||||
<p>This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(artist: { name: params[:name] }) %>.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user