diff --git a/app/controllers/web_footer_companies_controller.rb b/app/controllers/web_footer_companies_controller.rb index b61a58189..0fa076c2f 100644 --- a/app/controllers/web_footer_companies_controller.rb +++ b/app/controllers/web_footer_companies_controller.rb @@ -10,7 +10,7 @@ class WebFooterCompaniesController < ApplicationController end def new - @company = WebFooterCompany.new + @company ||= WebFooterCompany.new end def create @@ -20,7 +20,11 @@ class WebFooterCompaniesController < ApplicationController redirect_to web_footer_companies_url else flash[:error] = "#{l :web_footer_company_create_fail}: #{@company.errors.full_messages[0]}" - render :action => 'new' + respond_to do |format| + format.html { render :action => 'new'} + format.api { render_validation_errors(@company) } + end + end end diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index 9ed134f1e..36d3ed8e3 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -1,7 +1,7 @@ <%= error_messages_for 'role' %> <% unless @role.anonymous? %> -
<%= f.text_field :name, :required => true %>
<%= f.check_box :assignable %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 33b4035d6..1f53d9903 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1814,12 +1814,23 @@ html>body .tabular p {overflow:hidden;} float: left; text-align: right; /* width of left column */ - margin-left: -150px; + margin-left: -180px; /* width of labels. Should be smaller than left column to create some right margin */ width: 175px; font-size: 12px; } +.role label{ + font-weight: bold; + float: left; + text-align: right; + /* width of left column */ + margin-left: -60px; + /* width of labels. Should be smaller than left column to create some right margin */ + width: 175px; + font-size: 12px; +} + .tabular label.floating{ font-weight: normal; margin-left: 0px;