app/views/phcscriptcdn/scriptcdn/scripturls/_formpatch.html.erb in phcscriptcdn-0.6.0 vs app/views/phcscriptcdn/scriptcdn/scripturls/_formpatch.html.erb in phcscriptcdn-0.7.0
- old
+ new
@@ -1,8 +1,16 @@
<%= form_for([@scriptcdn_scripturl.script, @scriptcdn_scripturl], url: scriptcdn_script_scripturl_path, method: :patch) do |f| %>
- <!-- PHC-Notifi Render Validation -->
- <%= render 'layouts/phcnotifi/components/validations', :object => @scriptcdn_scripturl %>
+ <% if @scriptcdn_scripturl.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@scriptcdn_scripturl.errors.count, "error") %> prohibited this scriptcdn_scripturl from being saved:</h2>
+ <ul>
+ <% @scriptcdn_scripturl.errors.full_messages.each do |message| %>
+ <li><%= message %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
<div class="field">
<label><%= f.label :scrpturlname, "Script Name" %></label>
<%= f.text_field :scrpturlname, class: "form-control" %>
</div>