重新修改编辑角色有label字未显示全问题(前次修改影响了其他地方),新建合作单位,填写字段不正确时不清空用户填写的数据
This commit is contained in:
parent
a8bc274621
commit
38345c0c68
|
@ -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
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= error_messages_for 'role' %>
|
||||
|
||||
<% unless @role.anonymous? %>
|
||||
<div class="box tabular">
|
||||
<div class="box role">
|
||||
<% unless @role.builtin? %>
|
||||
<p><%= f.text_field :name, :required => true %></p>
|
||||
<p><%= f.check_box :assignable %></p>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue