[#4567] Replace inline errors with regular Redmine error messages
This commit is contained in:
@@ -8,7 +8,9 @@ class ContractsController < InheritedResources::Base
|
||||
before_filter :require_admin, :only => :destroy
|
||||
|
||||
def create
|
||||
create! { contract_url(@project, resource) }
|
||||
create! do |success, failure|
|
||||
success.html { redirect_to contract_url(@project, resource) }
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
<%= content_tag(:h2, h(l(:text_edit_contract_name, :name => resource.name))) %>
|
||||
|
||||
<%= error_messages_for 'contract' %>
|
||||
|
||||
<% semantic_form_for resource, :url => contract_path(@project, resource), :html => {:class => 'tabular'} do |form| %>
|
||||
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, resource)} %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<%= content_tag(:h2, l(:text_new_contract)) %>
|
||||
|
||||
<%= error_messages_for 'contract' %>
|
||||
|
||||
<% semantic_form_for resource, :html => {:class => 'tabular'} do |form| %>
|
||||
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contracts_path} %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
<%= content_tag(:h2, h(l(:text_edit_deliverable_title, :title => resource.title))) %>
|
||||
|
||||
<%= error_messages_for 'deliverable' %>
|
||||
|
||||
<% semantic_form_for [@project, @contract, setup_nested_deliverable_records(resource)], :url => contract_deliverable_path(@project, @contract, resource), :html => {:class => 'deliverable tabular'} do |form| %>
|
||||
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, @contract)} %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
<%= content_tag(:h2, l(:text_new_deliverable)) %>
|
||||
|
||||
<%= error_messages_for 'deliverable' %>
|
||||
|
||||
<% semantic_form_for [@project, @contract, setup_nested_deliverable_records(resource)], :url => contract_deliverables_path(@project, @contract), :html => {:class => 'deliverable tabular'} do |form| %>
|
||||
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, @contract)} %>
|
||||
<% end %>
|
||||
|
||||
1
init.rb
1
init.rb
@@ -77,6 +77,7 @@ Dispatcher.to_prepare :redmine_contracts do
|
||||
|
||||
Formtastic::SemanticFormBuilder.all_fields_required_by_default = false
|
||||
Formtastic::SemanticFormBuilder.required_string = "<span class='required'> *</span>"
|
||||
Formtastic::SemanticFormBuilder.inline_errors = :none
|
||||
|
||||
require_dependency 'payment_term' # Load so Enumeration will pick up the subclass in dev
|
||||
|
||||
|
||||
Reference in New Issue
Block a user