Display errors in user form

footer-fixes
Marcin Kulik 10 years ago
parent ace357187c
commit 64c471c2ae

@ -17,7 +17,8 @@ gem 'kaminari', '~> 0.14.1'
gem 'airbrake', '~> 3.1.14'
gem 'draper', '~> 1.2.1'
gem 'fog', '~> 1.9.0'
gem 'simple_form', '~> 3.0.0'
gem 'simple_form', '~> 3.0.2'
gem 'simple_form_bootstrap3', '~> 0.2.6'
gem 'sidekiq', '~> 2.17'
gem 'thin', '~> 1.5.0'
gem 'open4', '~> 1.3.0'

@ -44,6 +44,8 @@ GEM
axiom-types (0.0.5)
descendants_tracker (~> 0.0.1)
ice_nine (~> 0.9)
bootstrap-sass (3.1.1.0)
sass (~> 3.2)
builder (3.1.4)
cane (2.5.2)
parallel
@ -274,9 +276,12 @@ GEM
json
redis (>= 3.0.4)
redis-namespace (>= 1.3.1)
simple_form (3.0.0)
actionpack (>= 4.0.0, < 4.1)
activemodel (>= 4.0.0, < 4.1)
simple_form (3.0.2)
actionpack (~> 4.0)
activemodel (~> 4.0)
simple_form_bootstrap3 (0.2.6)
bootstrap-sass (~> 3.1.1.0)
simple_form (~> 3.0.1)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
@ -383,7 +388,8 @@ DEPENDENCIES
sass-rails (~> 4.0.1)
shoulda-matchers (~> 2.4.0)
sidekiq (~> 2.17)
simple_form (~> 3.0.0)
simple_form (~> 3.0.2)
simple_form_bootstrap3 (~> 0.2.6)
simplecov (~> 0.7.1)
sinatra (~> 1.4.3)
slim (~> 2.0.0)

@ -5,6 +5,12 @@
#user_username
width: 200px
.account-settings
form
.form-group
> div
width: 300px
.returning-user
border-left: 1px solid #bbb
padding-left: 30px

@ -1,20 +1,10 @@
.container
= form_for @user, html: { class: 'form-horizontal' } do |f|
legend Your account
.form-group
= f.label :username, 'Username *', class: 'col-sm-2 control-label'
.col-sm-4 = f.text_field :username, class: 'form-control'
.form-group
= f.label :email, 'E-mail *', class: 'col-sm-2 control-label'
.col-sm-4 = f.email_field :email, class: 'form-control'
.form-group
= f.label :name, 'Real name', class: 'col-sm-2 control-label'
.col-sm-4 = f.text_field :name, class: 'form-control'
.form-group
.col-sm-offset-2.col-sm-4
= f.submit 'Save', class: 'btn btn-primary'
= link_to 'Cancel', profile_path(current_user), class: 'btn'
.container.account-settings
= horizontal_form_for @user do |f|
legend Account settings
= f.input :username
= f.input :email, required: true
= f.input :name, label: 'Real name'
= f.buttons do
= f.button :submit, 'Save', class: 'btn-primary'
= link_to 'Cancel', profile_path(current_user), class: 'btn'

Loading…
Cancel
Save