disable category edit from tag form if locked

This commit is contained in:
r888888888
2013-06-20 15:24:10 -07:00
parent 774dadf7a5
commit e955cc6e02

View File

@@ -3,7 +3,9 @@
<h1>Tag: <%= @tag.name %></h1>
<%= simple_form_for(@tag) do |f| %>
<%= f.input :category, :collection => Danbooru.config.canonical_tag_category_mapping.to_a, :include_blank => false %>
<% unless @tag.is_locked? %>
<%= f.input :category, :collection => Danbooru.config.canonical_tag_category_mapping.to_a, :include_blank => false %>
<% end %>
<% if CurrentUser.user.is_janitor? %>
<%= f.input :is_locked, :collection => [["No", "false"], ["Yes", "true"]] %>