From 9c350b60e87a58e4fcf748fe3c9bc1baa5c04655 Mon Sep 17 00:00:00 2001 From: Evelyn Date: Sun, 20 Sep 2015 13:53:53 -0500 Subject: adding ability to disable/enable users by admin --- Gemfile | 1 + Gemfile.lock | 8 ++++++ app/assets/stylesheets/application.scss | 4 +++ app/controllers/sessions_controller.rb | 9 +++++++ app/controllers/users_controller.rb | 6 +++-- app/views/users/index.html.haml | 46 ++++++++++++++++++++++++++++++++- config/locales/en/users.en.yml | 9 ++++++- config/locales/es.yml | 8 ++++++ 8 files changed, 87 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index dd93a3c..cc7563a 100644 --- a/Gemfile +++ b/Gemfile @@ -78,6 +78,7 @@ end group :test, :development do gem 'thin' gem 'i18n-missing_translations' + gem 'pry' end group :production do diff --git a/Gemfile.lock b/Gemfile.lock index a185562..3331a6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,6 +72,7 @@ GEM client_side_validations (~> 3.2.5) simple_form (~> 2.1.0) cliver (0.3.2) + coderay (1.1.0) columnize (0.9.0) couchrest (1.1.3) mime-types (~> 1.15) @@ -151,6 +152,7 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) metaclass (0.0.4) + method_source (0.8.2) mime-types (1.25.1) mini_portile (0.6.1) minitest-stub-const (0.2) @@ -168,6 +170,10 @@ GEM multi_json (~> 1.0) websocket-driver (>= 0.2.0) polyglot (0.3.5) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) quiet_assets (1.0.3) railties (>= 3.1, < 5.0) rack (1.4.5) @@ -220,6 +226,7 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) + slop (3.6.0) sprockets (2.2.3) hike (~> 1.2) multi_json (~> 1.0) @@ -285,6 +292,7 @@ DEPENDENCIES mocha (~> 0.13.0) phantomjs-binaries poltergeist + pry quiet_assets rails (~> 3.2.21) rails-i18n diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 9cd3a55..bb40129 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -26,3 +26,7 @@ // import custom scss, content to be set in deployment. // @import "tail"; + +.modal-footer form{ + margin: 0; +} diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 66eba40..34d4f53 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -32,4 +32,13 @@ class SessionsController < ApplicationController # throw :warden, response.finish #end + Warden::Manager.after_set_user do |user, auth, opts| + scope = opts[:scope] + unless user.enabled? + auth.logout(scope) + throw(:warden, scope: scope, reason: "User not active") + end + end + + end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3943afc..446b726 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -49,13 +49,15 @@ class UsersController < ApplicationController def deactivate @user.enabled = false @user.save - respond_with @user + flash[:notice] = I18n.t("actions.user_disabled_message", username: @user.username) + redirect_to :back end def enable @user.enabled = true @user.save - respond_with @user + flash[:notice] = I18n.t("actions.user_enabled_message", username: @user.username) + redirect_to :back end def destroy diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 3ed8835..268c7d3 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,4 +1,48 @@ - @show_navigation = false = search :users -= table @users, %w(username, created, updated) +%table.table.table-striped.table-bordered + %thead + %tr + %th + = t(:username) + %th + = t(:created) + %th + = t(:updated) + %th + = t("actions.toggle_user") + %tbody + - @users.each do |user| + %tr + %td + = link_to user.username, user + %td + = user.created_at.strftime("%d %b, %Y, %H:%M") + %td + = user.updated_at.strftime("%d %b, %Y, %H:%M") + %td + - if user.enabled + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.disable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_deactivation", username: user.username) + .modal-footer + = form_tag deactivate_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.disable_user")}"} + - else + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.enable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_activation", username: user.username) + .modal-footer + = form_tag enable_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.enable_user")}"} diff --git a/config/locales/en/users.en.yml b/config/locales/en/users.en.yml index 89307dd..3cfaef6 100644 --- a/config/locales/en/users.en.yml +++ b/config/locales/en/users.en.yml @@ -55,6 +55,14 @@ en: tickets: "Create and check support tickets." email: "Modify email settings." account: "Destroy your account." + actions: + toggle_user: "Toggle User" + enable_user: "Enable User" + disable_user: "Disable User" + confirm_user_deactivation: "Are you sure you want to deactive user with username '%{username}'?" + confirm_user_activation: "Are you sure you want to activate user with username '%{username}'?" + user_disabled_message: "User with username '%{username}' has been disabled." + user_enabled_message: "User with username '%{username}' has been enabled." # # rails @@ -76,4 +84,3 @@ en: placeholders: user: email_forward: "my_other_email@domain.net" - diff --git a/config/locales/es.yml b/config/locales/es.yml index 2a36b6e..1081e91 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -110,6 +110,14 @@ es: user: one: Usuario other: '%{count} usuarios' + actions: + toggle_user: "Toggle User" + enable_user: "Enable User" + disable_user: "Disable User" + confirm_user_deactivation: "Are you sure you want to deactive user with username '%{username}'?" + confirm_user_activation: "Are you sure you want to activate user with username '%{username}'?" + user_disabled_message: "User with username '%{username}' has been disabled." + user_enabled_message: "User with username '%{username}' has been enabled." create_new_customer: Crear un nuevo Cliente de Braintree must_create_customer: Tiene que almacenar un cliente en Braintree antes de suscribirse a un plan subscribe: Suscribirse -- cgit v1.2.3 From b40efee0bd29c16c1e50f2672feea612262fd459 Mon Sep 17 00:00:00 2001 From: Evelyn Date: Sun, 20 Sep 2015 18:09:00 -0500 Subject: spanish translations for user actions --- config/locales/es.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/es.yml b/config/locales/es.yml index 1081e91..6247eed 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -114,10 +114,10 @@ es: toggle_user: "Toggle User" enable_user: "Enable User" disable_user: "Disable User" - confirm_user_deactivation: "Are you sure you want to deactive user with username '%{username}'?" - confirm_user_activation: "Are you sure you want to activate user with username '%{username}'?" - user_disabled_message: "User with username '%{username}' has been disabled." - user_enabled_message: "User with username '%{username}' has been enabled." + confirm_user_deactivation: "Estás seguro que quieres desactivar user con username '%{username}'?" + confirm_user_activation: "Estás seguro que quieres activar user con username '%{username}'?" + user_disabled_message: "User con username '%{username}' ha sido desactivado." + user_enabled_message: "User with username '%{username}' ha sido activado." create_new_customer: Crear un nuevo Cliente de Braintree must_create_customer: Tiene que almacenar un cliente en Braintree antes de suscribirse a un plan subscribe: Suscribirse -- cgit v1.2.3 From b9aae16edf42d8fed5bc4df15698a1eed1cc9e3d Mon Sep 17 00:00:00 2001 From: Evelyn Date: Sun, 20 Sep 2015 18:10:42 -0500 Subject: fixing translations --- config/locales/en/users.en.yml | 2 +- config/locales/es.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/en/users.en.yml b/config/locales/en/users.en.yml index 3cfaef6..65014bb 100644 --- a/config/locales/en/users.en.yml +++ b/config/locales/en/users.en.yml @@ -56,7 +56,7 @@ en: email: "Modify email settings." account: "Destroy your account." actions: - toggle_user: "Toggle User" + toggle_user: "Enable / Disable User" enable_user: "Enable User" disable_user: "Disable User" confirm_user_deactivation: "Are you sure you want to deactive user with username '%{username}'?" diff --git a/config/locales/es.yml b/config/locales/es.yml index 6247eed..dbe416a 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -111,7 +111,7 @@ es: one: Usuario other: '%{count} usuarios' actions: - toggle_user: "Toggle User" + toggle_user: "Enable / Disable User" enable_user: "Enable User" disable_user: "Disable User" confirm_user_deactivation: "Estás seguro que quieres desactivar user con username '%{username}'?" -- cgit v1.2.3 From af140de5dd27b93b8cd58dd201fc4c0b1d5a23ec Mon Sep 17 00:00:00 2001 From: Evelyn Date: Mon, 21 Sep 2015 22:56:31 -0500 Subject: test users_controller_test --- config/locales/en/users.en.yml | 16 ++++++++-------- test/functional/users_controller_test.rb | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/config/locales/en/users.en.yml b/config/locales/en/users.en.yml index 65014bb..e2a880c 100644 --- a/config/locales/en/users.en.yml +++ b/config/locales/en/users.en.yml @@ -55,14 +55,14 @@ en: tickets: "Create and check support tickets." email: "Modify email settings." account: "Destroy your account." - actions: - toggle_user: "Enable / Disable User" - enable_user: "Enable User" - disable_user: "Disable User" - confirm_user_deactivation: "Are you sure you want to deactive user with username '%{username}'?" - confirm_user_activation: "Are you sure you want to activate user with username '%{username}'?" - user_disabled_message: "User with username '%{username}' has been disabled." - user_enabled_message: "User with username '%{username}' has been enabled." + actions: + toggle_user: "Enable / Disable User" + enable_user: "Enable User" + disable_user: "Disable User" + confirm_user_deactivation: "Are you sure you want to deactive user with username '%{username}'?" + confirm_user_activation: "Are you sure you want to activate user with username '%{username}'?" + user_disabled_message: "User with username '%{username}' has been disabled." + user_enabled_message: "User with username '%{username}' has been enabled." # # rails diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 7d1745c..70f483e 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -158,6 +158,7 @@ class UsersControllerTest < ActionController::TestCase login :is_admin? => true + @request.env['HTTP_REFERER'] = 'http://test.com/sessions/new' post :deactivate, :id => user.id assert !assigns(:user).enabled? end -- cgit v1.2.3 From 5da852740580ba0e48dbab04c43750de843bf131 Mon Sep 17 00:00:00 2001 From: EvyW Date: Tue, 22 Sep 2015 15:27:13 -0500 Subject: Update leap.scss --- app/assets/stylesheets/leap.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss index dddcc1a..9fe2195 100644 --- a/app/assets/stylesheets/leap.scss +++ b/app/assets/stylesheets/leap.scss @@ -307,3 +307,6 @@ html, body { margin: 0 2px; } } +.modal-footer form{ + margin: 0; +} -- cgit v1.2.3 From 0af541e20e4343d20dd89cb73ef1d2f01f5c55f6 Mon Sep 17 00:00:00 2001 From: EvyW Date: Tue, 22 Sep 2015 15:39:29 -0500 Subject: commit user haml --- app/views/users/_user.html.haml | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/app/views/users/_user.html.haml b/app/views/users/_user.html.haml index 583d22f..2d2f262 100644 --- a/app/views/users/_user.html.haml +++ b/app/views/users/_user.html.haml @@ -1,4 +1,32 @@ -%tr - %td= link_to user.login, user - %td= l(user.created_at, :format => :short) - %td= l(user.updated_at, :format => :short) + %tr + %td + = link_to user.username, user + %td + = user.created_at.strftime("%d %b, %Y, %H:%M") + %td + = user.updated_at.strftime("%d %b, %Y, %H:%M") + %td + - if user.enabled + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.disable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_deactivation", username: user.username) + .modal-footer + = form_tag deactivate_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.disable_user")}"} + - else + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.enable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_activation", username: user.username) + .modal-footer + = form_tag enable_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.enable_user")}"} -- cgit v1.2.3 From 75338e097c964b4287cff7de9e142244f3681a14 Mon Sep 17 00:00:00 2001 From: EvyW Date: Tue, 22 Sep 2015 15:46:48 -0500 Subject: index changes --- app/views/users/index.html.haml | 47 ++--------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 268c7d3..e1136d8 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,48 +1,5 @@ - @show_navigation = false = search :users -%table.table.table-striped.table-bordered - %thead - %tr - %th - = t(:username) - %th - = t(:created) - %th - = t(:updated) - %th - = t("actions.toggle_user") - %tbody - - @users.each do |user| - %tr - %td - = link_to user.username, user - %td - = user.created_at.strftime("%d %b, %Y, %H:%M") - %td - = user.updated_at.strftime("%d %b, %Y, %H:%M") - %td - - if user.enabled - %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} - = t("actions.disable_user") - .modal.fade.hide{:id => "user-form-#{user.id}"} - .modal-dialog - .modal-content - .modal-header - %button.close{:"data-dismiss" => "modal"} × - = t("actions.confirm_user_deactivation", username: user.username) - .modal-footer - = form_tag deactivate_user_path(user) do - %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.disable_user")}"} - - else - %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} - = t("actions.enable_user") - .modal.fade.hide{:id => "user-form-#{user.id}"} - .modal-dialog - .modal-content - .modal-header - %button.close{:"data-dismiss" => "modal"} × - = t("actions.confirm_user_activation", username: user.username) - .modal-footer - = form_tag enable_user_path(user) do - %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.enable_user")}"} += table @users, %w(username, created, updated, actions.toggle_user) + -- cgit v1.2.3 From 9616fb4386729cd65612af1c90b2f19369482b01 Mon Sep 17 00:00:00 2001 From: EvyW Date: Mon, 28 Sep 2015 10:26:07 -0500 Subject: changes style sheets removed the three last lines --- app/assets/stylesheets/application.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index bb40129..9cd3a55 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -26,7 +26,3 @@ // import custom scss, content to be set in deployment. // @import "tail"; - -.modal-footer form{ - margin: 0; -} -- cgit v1.2.3 From d612b1a64aecec0c00557d43ac08d9b93121aa61 Mon Sep 17 00:00:00 2001 From: EvyW Date: Mon, 28 Sep 2015 10:52:27 -0500 Subject: Translation changes From line 114 to line 120 --- config/locales/es.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/locales/es.yml b/config/locales/es.yml index dbe416a..f745257 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -111,13 +111,13 @@ es: one: Usuario other: '%{count} usuarios' actions: - toggle_user: "Enable / Disable User" - enable_user: "Enable User" - disable_user: "Disable User" - confirm_user_deactivation: "Estás seguro que quieres desactivar user con username '%{username}'?" - confirm_user_activation: "Estás seguro que quieres activar user con username '%{username}'?" - user_disabled_message: "User con username '%{username}' ha sido desactivado." - user_enabled_message: "User with username '%{username}' ha sido activado." + toggle_user: "Activar / Desactivar Usuario" + enable_user: "Activar Usuario" + disable_user: "Desactivar Usuario" + confirm_user_deactivation: "Estás seguro que quieres desactivar al usuario con nombre '%{username}'?" + confirm_user_activation: "Estás seguro que quieres activar al usuario con nombre '%{username}'?" + user_disabled_message: "Usuario con nombre '%{username}' ha sido desactivado." + user_enabled_message: "Usuario con nombre '%{username}' ha sido activado." create_new_customer: Crear un nuevo Cliente de Braintree must_create_customer: Tiene que almacenar un cliente en Braintree antes de suscribirse a un plan subscribe: Suscribirse -- cgit v1.2.3 From 289424bda4cabfa682e07059bfdc1a0c7f04c1ef Mon Sep 17 00:00:00 2001 From: EvyW Date: Mon, 28 Sep 2015 16:41:04 -0500 Subject: with out identing --- app/views/users/_user.html.haml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/views/users/_user.html.haml b/app/views/users/_user.html.haml index 2d2f262..c215a91 100644 --- a/app/views/users/_user.html.haml +++ b/app/views/users/_user.html.haml @@ -1,10 +1,7 @@ %tr - %td - = link_to user.username, user - %td - = user.created_at.strftime("%d %b, %Y, %H:%M") - %td - = user.updated_at.strftime("%d %b, %Y, %H:%M") + %td= link_to user.username, user + %td= user.created_at.strftime("%d %b, %Y, %H:%M") + %td= user.updated_at.strftime("%d %b, %Y, %H:%M") %td - if user.enabled %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} -- cgit v1.2.3 From df62d292f5df6dffd8a0e621181632f276c0b304 Mon Sep 17 00:00:00 2001 From: EvyW Date: Thu, 1 Oct 2015 15:12:59 -0500 Subject: Identing first line --- app/views/users/_user.html.haml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/users/_user.html.haml b/app/views/users/_user.html.haml index c215a91..9deb596 100644 --- a/app/views/users/_user.html.haml +++ b/app/views/users/_user.html.haml @@ -1,7 +1,10 @@ - %tr - %td= link_to user.username, user - %td= user.created_at.strftime("%d %b, %Y, %H:%M") - %td= user.updated_at.strftime("%d %b, %Y, %H:%M") +%tr + %td + = link_to user.username, user + %td + = user.created_at.strftime("%d %b, %Y, %H:%M") + %td + = user.updated_at.strftime("%d %b, %Y, %H:%M") %td - if user.enabled %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} -- cgit v1.2.3 From 02c1e607bf8beb1f576307a7ad87f0cdbe3381c0 Mon Sep 17 00:00:00 2001 From: EvyW Date: Thu, 1 Oct 2015 17:15:35 -0500 Subject: identing 2 --- app/views/users/_user.html.haml | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/app/views/users/_user.html.haml b/app/views/users/_user.html.haml index 9deb596..1cabcf5 100644 --- a/app/views/users/_user.html.haml +++ b/app/views/users/_user.html.haml @@ -1,32 +1,32 @@ %tr - %td - = link_to user.username, user - %td - = user.created_at.strftime("%d %b, %Y, %H:%M") - %td - = user.updated_at.strftime("%d %b, %Y, %H:%M") - %td - - if user.enabled - %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} - = t("actions.disable_user") - .modal.fade.hide{:id => "user-form-#{user.id}"} - .modal-dialog - .modal-content - .modal-header - %button.close{:"data-dismiss" => "modal"} × - = t("actions.confirm_user_deactivation", username: user.username) - .modal-footer - = form_tag deactivate_user_path(user) do - %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.disable_user")}"} - - else - %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} - = t("actions.enable_user") - .modal.fade.hide{:id => "user-form-#{user.id}"} - .modal-dialog - .modal-content - .modal-header - %button.close{:"data-dismiss" => "modal"} × - = t("actions.confirm_user_activation", username: user.username) - .modal-footer - = form_tag enable_user_path(user) do - %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.enable_user")}"} + %td + = link_to user.username, user + %td + = user.created_at.strftime("%d %b, %Y, %H:%M") + %td + = user.updated_at.strftime("%d %b, %Y, %H:%M") + %td + - if user.enabled + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.disable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_deactivation", username: user.username) + .modal-footer + = form_tag deactivate_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.disable_user")}"} + - else + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.enable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_activation", username: user.username) + .modal-footer + = form_tag enable_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.enable_user")}"} -- cgit v1.2.3