chaltron 0.3.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -1
- data/app/assets/javascripts/chaltron.js +7 -5
- data/app/assets/javascripts/chaltron/datatables.js.coffee +2 -2
- data/app/assets/javascripts/chaltron/navbar.js.coffee +46 -0
- data/app/assets/javascripts/dataTables/dataTables.bootstrap4.min.js +8 -0
- data/app/assets/stylesheets/chaltron.scss +9 -9
- data/app/assets/stylesheets/chaltron/layout.scss +3 -29
- data/app/assets/stylesheets/chaltron/logs.scss +5 -0
- data/app/controllers/chaltron/ldap_controller.rb +5 -5
- data/app/controllers/chaltron/omniauth_callbacks_controller.rb +0 -1
- data/app/controllers/chaltron/sessions_controller.rb +0 -3
- data/app/controllers/chaltron/users_controller.rb +1 -3
- data/app/datatables/log_datatable.rb +3 -2
- data/app/helpers/chaltron/ldap_helper.rb +3 -3
- data/app/helpers/chaltron/logs_helper.rb +4 -13
- data/app/helpers/chaltron/users_helper.rb +20 -2
- data/app/helpers/chaltron_helper.rb +0 -16
- data/app/models/authorizable.rb +1 -1
- data/app/models/log.rb +10 -12
- data/app/models/user.rb +1 -5
- data/app/views/chaltron/ldap/multi_create.html.erb +39 -35
- data/app/views/chaltron/ldap/multi_new.html.erb +36 -30
- data/app/views/chaltron/ldap/search.html.erb +13 -10
- data/app/views/chaltron/logs/index.html.erb +22 -28
- data/app/views/chaltron/logs/show.html.erb +6 -6
- data/app/views/chaltron/users/_form.html.erb +8 -5
- data/app/views/chaltron/users/_side_filters.html.erb +10 -26
- data/app/views/chaltron/users/edit.html.erb +1 -1
- data/app/views/chaltron/users/index.html.erb +29 -31
- data/app/views/chaltron/users/new.html.erb +1 -1
- data/app/views/chaltron/users/self_edit.html.erb +27 -20
- data/app/views/chaltron/users/self_show.html.erb +8 -8
- data/app/views/chaltron/users/show.html.erb +10 -10
- data/app/views/devise/passwords/edit.html.erb +8 -7
- data/app/views/devise/passwords/new.html.erb +10 -7
- data/app/views/devise/sessions/_new_ldap.html.erb +17 -14
- data/app/views/devise/sessions/_new_local.html.erb +10 -7
- data/app/views/devise/sessions/new.html.erb +30 -25
- data/app/views/locales/en.yml +4 -4
- data/app/views/locales/it.yml +2 -2
- data/config/chaltron_navigation.rb +15 -23
- data/config/locales/en.yml +1 -6
- data/config/locales/it.yml +1 -6
- data/config/routes.rb +4 -5
- data/lib/chaltron.rb +1 -24
- data/lib/chaltron/bootstrap_form.rb +1 -1
- data/lib/chaltron/engine.rb +2 -3
- data/lib/chaltron/ldap/connection.rb +34 -93
- data/lib/chaltron/ldap/person.rb +3 -13
- data/lib/chaltron/ldap/user.rb +1 -5
- data/lib/chaltron/version.rb +1 -1
- data/lib/generators/chaltron/install_generator.rb +9 -3
- data/lib/generators/chaltron/templates/app/assets/stylesheets/home.scss +2 -20
- data/lib/generators/chaltron/templates/app/views/home/_carousel.html.erb +18 -18
- data/lib/generators/chaltron/templates/app/views/home/_faq.html.erb +10 -8
- data/lib/generators/chaltron/templates/app/views/home/_panel.html.erb +5 -7
- data/lib/generators/chaltron/templates/app/views/home/index.html.erb +12 -10
- data/lib/generators/chaltron/templates/app/views/home/test.html.erb +3 -5
- data/lib/generators/chaltron/templates/app/views/layouts/_footer.html.erb +7 -9
- data/lib/generators/chaltron/templates/app/views/layouts/_navbar.html.erb +8 -15
- data/lib/generators/chaltron/templates/config/initializers/chaltron.rb +4 -57
- data/lib/generators/chaltron/templates/config/navigation.rb +11 -10
- data/lib/templates/erb/scaffold/_form.html.erb +8 -5
- data/lib/templates/erb/scaffold/edit.html.erb +8 -8
- data/lib/templates/erb/scaffold/index.html.erb +15 -21
- data/lib/templates/erb/scaffold/new.html.erb +2 -6
- data/lib/templates/erb/scaffold/show.html.erb +9 -9
- metadata +24 -25
- data/app/assets/javascripts/dataTables/extras/dataTables.select.min.js +0 -23
- data/app/assets/stylesheets/dataTables/dataTables.bootstrap.css +0 -167
- data/app/assets/stylesheets/dataTables/extras/select.dataTables.css +0 -100
- data/app/models/application_record.rb +0 -3
- data/app/views/chaltron/logs/_log.html.erb +0 -14
@@ -1,44 +1,48 @@
|
|
1
1
|
<div class='container-fluid'>
|
2
|
-
<h3 class='
|
2
|
+
<h3 class='pt-4'><%= t('.title') %></h3>
|
3
|
+
<div class='row'>
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
41
|
-
|
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='
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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='
|
2
|
+
<h3 class='pt-4'><%= t('.title') %></h3>
|
3
3
|
|
4
|
-
<%= bootstrap_form_tag(url: ldap_multi_new_path, method: :post, layout: :horizontal
|
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 :
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<%=
|
15
|
-
|
16
|
-
|
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='
|
2
|
+
<h3 class='pt-4'><%= t '.title' %></h3>
|
3
3
|
|
4
4
|
<div class='row'>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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='
|
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
|
-
<%=
|
7
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
-
<%=
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
25
|
-
|
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,21 +1,21 @@
|
|
1
1
|
<div class='container-fluid'>
|
2
|
-
<h3 class='
|
2
|
+
<h3 class='pt-4'><%= t '.title' %></h3>
|
3
3
|
<div class='row'>
|
4
|
-
<div class='col-md-3
|
4
|
+
<div class='col-md-3'>
|
5
5
|
<%= render partial: 'side_filters', locals: { filters: @filters } %>
|
6
6
|
<hr>
|
7
7
|
|
8
|
-
<% if ldap_enabled?
|
9
|
-
<div class='
|
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') %>
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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='
|
29
|
-
|
30
|
-
|
31
|
-
<
|
32
|
-
<
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
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,24 +1,31 @@
|
|
1
1
|
<div class='container-fluid'>
|
2
|
-
<
|
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
|
-
|
23
|
-
|
29
|
+
</div>
|
30
|
+
</div>
|
24
31
|
</div>
|