<%= form_for [:admin, @content_block], html: {class: "edit_page", data: {watch_changes: true}} do |f| %> <% if @content_block.errors.any? %>
<%= @content_block.errors.count %> <%= t("admin.site_customization.content_blocks.errors.form.error", count: @content_block.errors.count) %>
<% end %>
<%= f.label :name %> <%= f.select :name, options_for_select(valid_blocks, @selected_content_block), label: false %>
<%= f.label :locale %> <%= f.select :locale, I18n.available_locales, label: false %>
<%= f.label :body %> <%= f.text_area :body, label: false, rows: 10 %>
<%= f.submit class: "button success expanded" %>
<% end %>