app/views/publishers/new.html.haml
.container.content
%nav.breadcrumb
%ul
%li
%a{ :href => "/" } 首页
%li
注册
%article.main-section.edit
= form_for @publisher, :url => { :action => 'create' } do |f|
%section
%h3 用户注册
%p
所有选项都为
%b 必填项
%fieldset
= label_tag 'publisher[email]', 'Email'
= f.email_field :email, :placeholder => '填写你的电子邮件...', :required => true
= error_message_on @publisher, :email
= label_tag 'publisher[alternative_name]', '用户名(不超过50字)'
= f.text_field :alternative_name, :placeholder => '留下在页面上显示的名字...', :required => true, :maxlength => 50
= error_message_on @publisher, :alternative_name
%label 密码(不超过50字母)
= f.password_field :password, :size => 20, :placeholder => '设置密码...', :required => true
= label_tag 'publisher[password]', '确认密码'
= f.password_field :password_confirmation, :size => 20, :placeholder => '再次输入确认密码...', :required => true
= error_message_on @publisher, :password
%p
= f.submit '保存', :class => 'btn btn-primary'