重新修改编辑角色有label字未显示全问题(前次修改影响了其他地方),新建合作单位,填写字段不正确时不清空用户填写的数据

course_group
z9hang 11 years ago
parent a8bc274621
commit 38345c0c68

@ -10,7 +10,7 @@ class WebFooterCompaniesController < ApplicationController
end end
def new def new
@company = WebFooterCompany.new @company ||= WebFooterCompany.new
end end
def create def create
@ -20,7 +20,11 @@ class WebFooterCompaniesController < ApplicationController
redirect_to web_footer_companies_url redirect_to web_footer_companies_url
else else
flash[:error] = "#{l :web_footer_company_create_fail}: #{@company.errors.full_messages[0]}" 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
end end

@ -1,7 +1,7 @@
<%= error_messages_for 'role' %> <%= error_messages_for 'role' %>
<% unless @role.anonymous? %> <% unless @role.anonymous? %>
<div class="box tabular"> <div class="box role">
<% unless @role.builtin? %> <% unless @role.builtin? %>
<p><%= f.text_field :name, :required => true %></p> <p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :assignable %></p> <p><%= f.check_box :assignable %></p>

@ -1814,7 +1814,18 @@ html>body .tabular p {overflow:hidden;}
float: left; float: left;
text-align: right; text-align: right;
/* width of left column */ /* 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 of labels. Should be smaller than left column to create some right margin */
width: 175px; width: 175px;
font-size: 12px; font-size: 12px;

Loading…
Cancel
Save