add more intelligent js for artist forms

This commit is contained in:
Albert Yi
2016-10-18 14:53:44 -07:00
parent 2424f24fcd
commit 2a5343b8cf
7 changed files with 45 additions and 37 deletions

View File

@@ -3,13 +3,13 @@
<label for="artist_name">Name</label>
<% if @artist.new_record? %>
<%= text_field "artist", "name" %>
[<%= link_to "check", "#", :id => "check-name-link" %>]
<span id="check-name-result"></span>
<% elsif CurrentUser.user.is_builder? %>
<%= text_field "artist", "name" %>
[<%= link_to "check", "#", :id => "check-name-link" %>]
<span id="check-name-result"></span>
<span class="hint">Change to rename this artist entry and its wiki page</span>
<% else %>
<p><%= @artist.name %></p>
<% end %>