chaltron 0.3.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -1
  3. data/app/assets/javascripts/chaltron.js +7 -5
  4. data/app/assets/javascripts/chaltron/datatables.js.coffee +2 -2
  5. data/app/assets/javascripts/chaltron/navbar.js.coffee +46 -0
  6. data/app/assets/javascripts/dataTables/dataTables.bootstrap4.min.js +8 -0
  7. data/app/assets/stylesheets/chaltron.scss +9 -9
  8. data/app/assets/stylesheets/chaltron/layout.scss +3 -29
  9. data/app/assets/stylesheets/chaltron/logs.scss +5 -0
  10. data/app/controllers/chaltron/ldap_controller.rb +5 -5
  11. data/app/controllers/chaltron/omniauth_callbacks_controller.rb +0 -1
  12. data/app/controllers/chaltron/sessions_controller.rb +0 -3
  13. data/app/controllers/chaltron/users_controller.rb +1 -3
  14. data/app/datatables/log_datatable.rb +3 -2
  15. data/app/helpers/chaltron/ldap_helper.rb +3 -3
  16. data/app/helpers/chaltron/logs_helper.rb +4 -13
  17. data/app/helpers/chaltron/users_helper.rb +20 -2
  18. data/app/helpers/chaltron_helper.rb +0 -16
  19. data/app/models/authorizable.rb +1 -1
  20. data/app/models/log.rb +10 -12
  21. data/app/models/user.rb +1 -5
  22. data/app/views/chaltron/ldap/multi_create.html.erb +39 -35
  23. data/app/views/chaltron/ldap/multi_new.html.erb +36 -30
  24. data/app/views/chaltron/ldap/search.html.erb +13 -10
  25. data/app/views/chaltron/logs/index.html.erb +22 -28
  26. data/app/views/chaltron/logs/show.html.erb +6 -6
  27. data/app/views/chaltron/users/_form.html.erb +8 -5
  28. data/app/views/chaltron/users/_side_filters.html.erb +10 -26
  29. data/app/views/chaltron/users/edit.html.erb +1 -1
  30. data/app/views/chaltron/users/index.html.erb +29 -31
  31. data/app/views/chaltron/users/new.html.erb +1 -1
  32. data/app/views/chaltron/users/self_edit.html.erb +27 -20
  33. data/app/views/chaltron/users/self_show.html.erb +8 -8
  34. data/app/views/chaltron/users/show.html.erb +10 -10
  35. data/app/views/devise/passwords/edit.html.erb +8 -7
  36. data/app/views/devise/passwords/new.html.erb +10 -7
  37. data/app/views/devise/sessions/_new_ldap.html.erb +17 -14
  38. data/app/views/devise/sessions/_new_local.html.erb +10 -7
  39. data/app/views/devise/sessions/new.html.erb +30 -25
  40. data/app/views/locales/en.yml +4 -4
  41. data/app/views/locales/it.yml +2 -2
  42. data/config/chaltron_navigation.rb +15 -23
  43. data/config/locales/en.yml +1 -6
  44. data/config/locales/it.yml +1 -6
  45. data/config/routes.rb +4 -5
  46. data/lib/chaltron.rb +1 -24
  47. data/lib/chaltron/bootstrap_form.rb +1 -1
  48. data/lib/chaltron/engine.rb +2 -3
  49. data/lib/chaltron/ldap/connection.rb +34 -93
  50. data/lib/chaltron/ldap/person.rb +3 -13
  51. data/lib/chaltron/ldap/user.rb +1 -5
  52. data/lib/chaltron/version.rb +1 -1
  53. data/lib/generators/chaltron/install_generator.rb +9 -3
  54. data/lib/generators/chaltron/templates/app/assets/stylesheets/home.scss +2 -20
  55. data/lib/generators/chaltron/templates/app/views/home/_carousel.html.erb +18 -18
  56. data/lib/generators/chaltron/templates/app/views/home/_faq.html.erb +10 -8
  57. data/lib/generators/chaltron/templates/app/views/home/_panel.html.erb +5 -7
  58. data/lib/generators/chaltron/templates/app/views/home/index.html.erb +12 -10
  59. data/lib/generators/chaltron/templates/app/views/home/test.html.erb +3 -5
  60. data/lib/generators/chaltron/templates/app/views/layouts/_footer.html.erb +7 -9
  61. data/lib/generators/chaltron/templates/app/views/layouts/_navbar.html.erb +8 -15
  62. data/lib/generators/chaltron/templates/config/initializers/chaltron.rb +4 -57
  63. data/lib/generators/chaltron/templates/config/navigation.rb +11 -10
  64. data/lib/templates/erb/scaffold/_form.html.erb +8 -5
  65. data/lib/templates/erb/scaffold/edit.html.erb +8 -8
  66. data/lib/templates/erb/scaffold/index.html.erb +15 -21
  67. data/lib/templates/erb/scaffold/new.html.erb +2 -6
  68. data/lib/templates/erb/scaffold/show.html.erb +9 -9
  69. metadata +24 -25
  70. data/app/assets/javascripts/dataTables/extras/dataTables.select.min.js +0 -23
  71. data/app/assets/stylesheets/dataTables/dataTables.bootstrap.css +0 -167
  72. data/app/assets/stylesheets/dataTables/extras/select.dataTables.css +0 -100
  73. data/app/models/application_record.rb +0 -3
  74. data/app/views/chaltron/logs/_log.html.erb +0 -14
@@ -1,44 +1,48 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t('.title') %></h3>
2
+ <h3 class='pt-4'><%= t('.title') %></h3>
3
+ <div class='row'>
3
4
 
4
- <div class='col-md-3'>
5
- <div class='panel panel-default'>
6
- <div class='panel-heading'><%= t '.result' %></div>
7
- <ul class='list-group'>
8
- <%= content_tag(:li, t('.created', count: @created.size),
9
- class: 'list-group-item') unless @created.empty? %>
10
- <%= content_tag(:li, t('.error', count: @error.size),
11
- class: 'list-group-item') unless @error.empty? %>
12
- </ul>
5
+ <div class='col-md-3'>
6
+ <div class='card'>
7
+ <div class='card-header'><%= t '.result' %></div>
8
+ <ul class='list-group list-group-flush'>
9
+ <%= content_tag(:li, t('.created', count: @created.size),
10
+ class: 'list-group-item') unless @created.empty? %>
11
+ <%= content_tag(:li, t('.error', count: @error.size),
12
+ class: 'list-group-item') unless @error.empty? %>
13
+ </ul>
14
+ </div>
15
+ <hr>
16
+ <%= link_to users_path, class: 'btn btn-primary' do %>
17
+ <%= icon 'arrow-left', t('chaltron.common.back') %>
18
+ <% end %>
13
19
  </div>
14
- <hr>
15
- <%= link_to users_path, class: 'btn btn-primary' do %>
16
- <%= icon 'arrow-left', t('chaltron.common.back') %>
17
- <% end %>
18
- </div>
19
20
 
20
- <div class='col-md-9'>
21
- <% unless @created.empty? %>
22
- <ul class='list-group'>
23
- <% @created.each do |u| %>
24
- <%= content_tag :li, class: 'list-group-item list-group-item-success' do %>
25
- <%= icon :check, u.display_name %>
26
- <% end %>
27
- <% end %>
28
- </ul>
29
- <% end %>
30
- <% unless @error.empty? %>
31
- <div class='panel panel-danger'>
32
- <% @error.each do |u| %>
33
- <div class='panel-heading'><%= u.display_name %></div>
34
- <ul class='list-group'>
35
- <% u.errors.full_messages.each do |message| %>
36
- <%= content_tag :li, message, class: 'list-group-item' %>
21
+ <div class='col-md-9'>
22
+ <% unless @created.empty? %>
23
+ <div class='card mb-4'>
24
+ <ul class='list-group list-group-flush'>
25
+ <% @created.each do |u| %>
26
+ <%= content_tag :li, class: 'list-group-item list-group-item-success' do %>
27
+ <%= icon :check, u.display_name %>
28
+ <% end %>
37
29
  <% end %>
38
30
  </ul>
31
+ </div>
32
+ <% end %>
33
+ <% unless @error.empty? %>
34
+ <% @error.each do |u| %>
35
+ <div class='card text-white bg-danger mb-4'>
36
+ <div class='card-header'><%= u.display_name %></div>
37
+ <ul class='list-group list-group-flush text-danger'>
38
+ <% u.errors.full_messages.each do |message| %>
39
+ <%= content_tag :li, message, class: 'list-group-item' %>
40
+ <% end %>
41
+ </ul>
42
+ </div>
39
43
  <% end %>
40
- </div>
41
- <% end %>
42
- </div>
44
+ <% end %>
45
+ </div>
43
46
 
47
+ </div>
44
48
  </div>
@@ -1,43 +1,49 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t('.title') %></h3>
2
+ <h3 class='pt-4'><%= t('.title') %></h3>
3
3
 
4
4
  <%= content_tag :p, t('.par') %>
5
5
 
6
6
  <%= bootstrap_form_for(User.new, url: ldap_multi_create_path, method: :post,
7
7
  layout: :horizontal, html: {id: 'ldap_create'}) do |f| %>
8
8
 
9
- <%= f.form_group do %>
10
- <%= content_tag 'table', id: 'ldap_create', class: 'table table-striped table-condensed' do %>
11
- <thead>
12
- <tr>
13
- <th></th>
14
- <th class='username'>
15
- <%= User.human_attribute_name(:username) %>
16
- </th>
17
- <th class='fullname'>
18
- <%= User.human_attribute_name(:fullname) %>
19
- </th>
20
- <th class='email'>
21
- <%= User.human_attribute_name(:email) %>
22
- </th>
23
- <th class='department'>
24
- <%= User.human_attribute_name(:department) %>
25
- </th>
26
- </tr>
27
- </thead>
28
- <tbody>
29
- <%= render partial: 'entry', collection: @entries %>
30
- </tbody>
31
- <% end %>
32
- <% end %>
9
+ <div class='form-group row'>
10
+ <div class='col-sm-2'></div>
11
+ <div class='col-sm-10'>
12
+ <%= content_tag 'table', id: 'ldap_create', class: 'table table-striped table-sm' do %>
13
+ <thead>
14
+ <tr>
15
+ <th></th>
16
+ <th class='username'>
17
+ <%= User.human_attribute_name(:username) %>
18
+ </th>
19
+ <th class='fullname'>
20
+ <%= User.human_attribute_name(:fullname) %>
21
+ </th>
22
+ <th class='email'>
23
+ <%= User.human_attribute_name(:email) %>
24
+ </th>
25
+ <th class='department'>
26
+ <%= User.human_attribute_name(:department) %>
27
+ </th>
28
+ </tr>
29
+ </thead>
30
+ <tbody>
31
+ <%= render partial: 'entry', collection: @entries %>
32
+ </tbody>
33
+ <% end %>
34
+ </div>
35
+ </div>
33
36
 
34
37
  <%= f.role_select %>
35
38
 
36
- <%= f.form_group class: 'form-actions' do %>
37
- <%= f.submit t('.submit_text'), class: 'btn btn-primary' %>
38
- <%= back_link class: 'btn btn-default pull-right',
39
- text: t('chaltron.common.cancel'), icon: 'times' %>
40
- <% end %>
39
+ <div class='form-group row'>
40
+ <div class='col-sm-2'></div>
41
+ <div class='col-sm-10'>
42
+ <%= f.submit t('.submit_text'), class: 'btn btn-primary' %>
43
+ <%= back_link class: 'btn btn-default pull-right',
44
+ text: t('chaltron.common.cancel'), icon: 'times' %>
45
+ </div>
46
+ </div>
41
47
 
42
48
  <% end %>
43
49
  </div>
@@ -1,20 +1,23 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t('.title') %></h3>
2
+ <h3 class='pt-4'><%= t('.title') %></h3>
3
3
 
4
- <%= bootstrap_form_tag(url: ldap_multi_new_path, method: :post, layout: :horizontal) do |f| %>
4
+ <%= bootstrap_form_tag(url: ldap_multi_new_path, method: :post, layout: :horizontal,
5
+ label_col: 'col-sm-2', control_col: 'col-sm-10') do |f| %>
5
6
 
6
7
  <%= f.text_field :userid, label: t('.name_label'), help: t('.name_help') %>
7
- <%= f.text_field :lastname, label: t('.lastname_label'), help: t('.lastname_help') %>
8
+ <%= f.text_field :fullname, label: t('.fullname_label'), help: t('.fullname_help') %>
8
9
  <%= f.text_field :department, label: t('.department_label'), help: t('.department_help') %>
9
10
  <%= f.text_field :limit, label: t('.limit_label'), help: t('.limit_help'), value: @limit %>
10
11
 
11
- <%= f.form_group class: 'form-actions' do %>
12
- <%= submit_tag t('.submit_text'), class: 'btn btn-primary' %>
13
- <%= link_to users_path, class: 'btn btn-default pull-right' do %>
14
- <%= icon :times, t('chaltron.common.cancel') %>
15
- <% end %>
16
- <% end %>
17
-
12
+ <div class='form-group row'>
13
+ <div class='col-sm-2'></div>
14
+ <div class='col-sm-10'>
15
+ <%= submit_tag t('.submit_text'), class: 'btn btn-primary' %>
16
+ <%= link_to users_path, class: 'btn btn-link pull-right' do %>
17
+ <%= icon :times, t('chaltron.common.cancel') %>
18
+ <% end %>
19
+ </div>
20
+ </div>
18
21
  <% end %>
19
22
 
20
23
  </div>
@@ -1,34 +1,28 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t '.title' %></h3>
2
+ <h3 class='pt-4'><%= t '.title' %></h3>
3
3
 
4
4
  <div class='row'>
5
- <div class='col-md-12'>
6
- <div class='panel panel-default'>
7
- <div class='panel-body'>
8
- <%= content_tag 'table', id: 'logs', class: 'table table-striped',
9
- data: {source: logs_path(format: :json)} do %>
10
- <thead>
11
- <tr>
12
- <th>
13
- <%= Log.human_attribute_name(:severity) %>
14
- </th>
15
- <th class='timestamp'>
16
- <%= Log.human_attribute_name(:created_at) %>
17
- </th>
18
- <th class='message'>
19
- <%= Log.human_attribute_name(:message) %>
20
- </th>
21
- <th class='category'>
22
- <%= Log.human_attribute_name(:category) %>
23
- </th>
24
- </tr>
25
- </thead>
26
- <tbody>
27
- </tbody>
28
- <% end %>
29
- </div>
30
- </div>
31
- </div>
5
+ <%= content_tag 'table', id: 'logs', class: 'table table-striped',
6
+ data: {source: logs_path(format: :json)} do %>
7
+ <thead>
8
+ <tr>
9
+ <th class='severity'>
10
+ <%= Log.human_attribute_name(:severity) %>
11
+ </th>
12
+ <th class='timestamp'>
13
+ <%= Log.human_attribute_name(:created_at) %>
14
+ </th>
15
+ <th class='message'>
16
+ <%= Log.human_attribute_name(:message) %>
17
+ </th>
18
+ <th class='category'>
19
+ <%= Log.human_attribute_name(:category) %>
20
+ </th>
21
+ </tr>
22
+ </thead>
23
+ <tbody>
24
+ </tbody>
25
+ <% end %>
32
26
  </div>
33
27
 
34
28
  </div>
@@ -1,12 +1,13 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t ("chaltron.logs.severity.#{@log.severity}") %></h3>
2
+ <h3 class='pt-4'><%= t ("chaltron.logs.severity.#{@log.severity}") %></h3>
3
3
  <div class='row'>
4
-
5
4
  <div class='col-md-12'>
6
- <%= display_panel(@log) do %>
7
- <div class='panel-heading'><%= t '.headers.details' %></div>
5
+ <%= content_tag :div, class: "card border-#{bootstrap_severity(@log.severity)}" do %>
6
+ <%= content_tag :div, class: "card-header text-white bg-#{bootstrap_severity(@log.severity)}" do %>
7
+ <%= t '.headers.details' %>
8
+ <% end %>
8
9
 
9
- <ul class='list-group'>
10
+ <ul class='list-group list-group-flush'>
10
11
  <li class='list-group-item'>
11
12
  <span><%= Log.human_attribute_name(:created_at) %>: </span>
12
13
  <strong><%= l(@log.created_at, format: :short) %></strong>
@@ -23,7 +24,6 @@
23
24
  <% end %>
24
25
  </div>
25
26
 
26
-
27
27
  </div>
28
28
 
29
29
 
@@ -1,4 +1,4 @@
1
- <%= bootstrap_form_for(@user, layout: :horizontal) do |f| %>
1
+ <%= bootstrap_form_for(@user, layout: :horizontal, label_col: 'col-sm-2', control_col: 'col-sm-10') do |f| %>
2
2
 
3
3
  <% if context == :create %>
4
4
  <%= f.text_field :username %>
@@ -15,9 +15,12 @@
15
15
  <% end %>
16
16
  <% end %>
17
17
 
18
- <%= f.form_group class: 'form-actions' do %>
19
- <%= f.submit submit_text, class: 'btn btn-primary' %>
20
- <%= back_link class: 'btn btn-default pull-right', text: t('.cancel_text'), icon: 'times' %>
21
- <% end %>
18
+ <div class='form-group row'>
19
+ <div class='col-sm-2'></div>
20
+ <div class='col-sm-10'>
21
+ <%= f.submit submit_text, class: 'btn btn-primary' %>
22
+ <%= back_link class: 'btn btn-link pull-right', text: t('.cancel_text'), icon: 'times' %>
23
+ </div>
24
+ </div>
22
25
 
23
26
  <% end %>
@@ -1,35 +1,19 @@
1
1
  <% if ldap_enabled? %>
2
2
  <div class='list-group'>
3
- <%= link_to users_path(filters: filters.merge(provider: nil).to_h),
4
- class: (filters[:provider].blank? ? 'list-group-item active': 'list-group-item') do %>
5
- <span class='badge pull-right'><%= User.count %></span>
6
- <%= t '.provider.all' %>
7
- <% end %>
8
-
9
- <%= link_to users_path(filters: filters.merge(provider: 'local').to_h),
10
- class: (filters[:provider] == 'local' ? 'list-group-item active': 'list-group-item') do %>
11
- <span class='badge pull-right'><%= User.where(provider: nil).count %></span>
12
- <%= t '.provider.local' %>
13
- <% end %>
14
-
15
- <%= link_to users_path(filters: filters.merge(provider: 'ldap').to_h),
16
- class: (filters[:provider] == 'ldap' ? 'list-group-item active': 'list-group-item') do %>
17
- <span class='badge pull-right'><%= User.where(provider: :ldap).count %></span>
18
- <%= t '.provider.ldap' %>
19
- <% end %>
3
+ <%= display_side_filter_link(users_path(filters: filters.merge(provider: nil).to_h),
4
+ filters[:provider].blank?, t('.provider.all'), User.count) %>
5
+ <%= display_side_filter_link(users_path(filters: filters.merge(provider: 'local').to_h),
6
+ (filters[:provider] == 'local'), t('.provider.local'), User.where(provider: nil).count) %>
7
+ <%= display_side_filter_link(users_path(filters: filters.merge(provider: 'ldap').to_h),
8
+ (filters[:provider] == 'ldap'), t('.provider.ldap'), User.where(provider: 'ldap').count) %>
20
9
  </div>
21
-
22
10
  <% end %>
23
-
24
- <div class='list-group'>
25
- <%= link_to users_path(filters: filters.merge(activity: 'no_login').to_h),
26
- class: (filters[:activity] == 'no_login' ? 'list-group-item active': 'list-group-item') do %>
27
- <span class='badge pull-right'><%= User.where(sign_in_count: 0).count %></span>
28
- <%= t '.activity.no_login' %>
29
- <% end %>
11
+ <div class='list-group mt-4'>
12
+ <%= display_side_filter_link(users_path(filters: filters.merge(activity: 'no_login').to_h),
13
+ (filters[:activity] == 'no_login'), t('.activity.no_login'), User.where(sign_in_count: 0).count) %>
30
14
  </div>
31
15
 
32
- <fieldset>
16
+ <fieldset class='mt-4'>
33
17
  <%= link_to nil, class: 'pull-right' do %>
34
18
  <strong><%= icon :remove, t('chaltron.common.clear_filter') %></strong>
35
19
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <% title = t('.title', user: @user.username) %>
2
2
  <div class='container-fluid'>
3
- <h3 class='page-header'><%= title %></h3>
3
+ <h3 class='pt-4'><%= title %></h3>
4
4
  <%= render partial: 'form', locals: {submit_text: title, context: :update} %>
5
5
  </div>
@@ -1,21 +1,21 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t '.title' %></h3>
2
+ <h3 class='pt-4'><%= t '.title' %></h3>
3
3
  <div class='row'>
4
- <div class='col-md-3 side-filters'>
4
+ <div class='col-md-3'>
5
5
  <%= render partial: 'side_filters', locals: { filters: @filters } %>
6
6
  <hr>
7
7
 
8
- <% if ldap_enabled? and !Chaltron.ldap_allow_all %>
9
- <div class='btn-group'>
8
+ <% if ldap_enabled? %>
9
+ <div class='dropdown pull-right'>
10
10
  <%= content_tag :button, type: 'button', class: 'btn btn-primary dropdown-toggle',
11
- data: {toggle: 'dropdown'}, aria: {expanded: false} do %>
12
- <%= icon :plus, t('.new_user') %> <span class="caret"></span>
11
+ data: {toggle: 'dropdown'}, aria: {expanded: false, haspopup: true}, id: 'new_user_button' do %>
12
+ <%= icon :plus, t('.new_user') %>
13
13
  <% end %>
14
14
 
15
- <ul class='dropdown-menu' role='menu'>
16
- <li><%= link_to t('.new_ldap_user'), ldap_search_path %></li>
17
- <li><%= link_to t('.new_local_user'), new_user_path %></li>
18
- </ul>
15
+ <%= content_tag :div, class: 'dropdown-menu', aria: {labelledby: 'new_user_button'} do %>
16
+ <%= link_to t('.new_ldap_user'), ldap_search_path, class: 'dropdown-item' %>
17
+ <%= link_to t('.new_local_user'), new_user_path, class: 'dropdown-item' %>
18
+ <% end %>
19
19
  </div>
20
20
  <% else %>
21
21
  <%= link_to new_user_path, class: 'btn btn-primary pull-right' do %>
@@ -25,27 +25,25 @@
25
25
 
26
26
  </div>
27
27
  <div class='col-md-9'>
28
- <div class='panel panel-default'>
29
- <div class='panel-body'>
30
- <%= content_tag 'table', id: 'users', class: 'table table-striped table-responsive' do %>
31
- <thead>
32
- <tr>
33
- <th class='username'>
34
- <%= User.human_attribute_name(:username) %>
35
- </th>
36
- <th class='fullname'>
37
- <%= User.human_attribute_name(:fullname) %>
38
- </th>
39
- <th class='email'>
40
- <%= User.human_attribute_name(:email) %>
41
- </th>
42
- </tr>
43
- </thead>
44
- <tbody>
45
- <%= render @users %>
46
- </tbody>
47
- <% end %>
48
- </div>
28
+ <div class='table-responsive'>
29
+ <%= content_tag 'table', id: 'users', class: 'table table-striped' do %>
30
+ <thead>
31
+ <tr>
32
+ <th class='username'>
33
+ <%= User.human_attribute_name(:username) %>
34
+ </th>
35
+ <th class='fullname'>
36
+ <%= User.human_attribute_name(:fullname) %>
37
+ </th>
38
+ <th class='email'>
39
+ <%= User.human_attribute_name(:email) %>
40
+ </th>
41
+ </tr>
42
+ </thead>
43
+ <tbody>
44
+ <%= render @users %>
45
+ </tbody>
46
+ <% end %>
49
47
  </div>
50
48
  </div>
51
49
  </div>
@@ -1,4 +1,4 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t '.title' %></h3>
2
+ <h3 class='pt-4'><%= t '.title' %></h3>
3
3
  <%= render partial: 'form', locals: {submit_text: t('.submit_text'), context: :create} %>
4
4
  </div>
@@ -1,24 +1,31 @@
1
1
  <div class='container-fluid'>
2
- <h3 class='page-header'><%= t('.title') %></h3>
2
+ <div class='row'>
3
+ <div class='col-md-12'>
4
+ <h3 class='pt-4'><%= t('.title') %></h3>
5
+
6
+ <%= bootstrap_form_for(current_user, as: :user, url: self_update_users_path,
7
+ layout: :horizontal, label_col: 'col-sm-2', control_col: 'col-sm-10') do |f| %>
8
+ <%= f.text_field :fullname %>
9
+ <%= f.email_field :email %>
10
+ <% if current_user.provider.nil? %>
11
+ <fieldset>
12
+ <legend>Password</legend>
13
+ <%= f.password_field :password %>
14
+ <%= f.password_field :password_confirmation %>
15
+ </fieldset>
16
+ <% end %>
17
+
18
+ <div class='form-group row'>
19
+ <div class='col-sm-2'></div>
20
+ <div class='col-sm-10'>
21
+ <%= f.submit t('.submit'), class: 'btn btn-primary' %>
22
+ <%= link_to self_show_users_path, class: 'btn btn-link pull-right' do %>
23
+ <%= icon :times, t('chaltron.common.cancel') %>
24
+ <% end %>
25
+ </div>
26
+ </div>
3
27
 
4
- <%= bootstrap_form_for(current_user, as: :user, url: self_update_users_path,
5
- layout: :horizontal) do |f| %>
6
- <%= f.text_field :fullname %>
7
- <% if current_user.provider.nil? %>
8
- <%= f.email_field :email %>
9
- <fieldset>
10
- <legend>Password</legend>
11
- <%= f.password_field :password %>
12
- <%= f.password_field :password_confirmation %>
13
- </fieldset>
14
- <% else %>
15
- <%= f.email_field :email, disabled: true %>
16
- <% end %>
17
- <%= f.form_group class: 'form-actions' do %>
18
- <%= f.submit t('.submit'), class: 'btn btn-primary' %>
19
- <%= link_to self_show_users_path, class: 'btn btn-default pull-right' do %>
20
- <%= icon :times, t('chaltron.common.cancel') %>
21
28
  <% end %>
22
- <% end %>
23
- <% end %>
29
+ </div>
30
+ </div>
24
31
  </div>