From fe23b7896a04a50980c28a8b66c08ce2885ad0d3 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 17 Oct 2012 12:40:12 +0200 Subject: complete signup, login, logout workflow --- users/app/views/users/new.html.haml | 2 -- 1 file changed, 2 deletions(-) (limited to 'users/app/views') diff --git a/users/app/views/users/new.html.haml b/users/app/views/users/new.html.haml index f6ece3a..af53331 100644 --- a/users/app/views/users/new.html.haml +++ b/users/app/views/users/new.html.haml @@ -4,7 +4,5 @@ = f.input :login, :input_html => { :id => :srp_username } = f.input :password, :required => true, :input_html => { :id => :srp_password } = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } - = f.input :password_verifier, :as => :hidden, :input_html => { :id => :srp_password_verifier } - = f.input :password_salt, :as => :hidden, :input_html => { :id => :srp_salt } = f.button :submit, :value => t(:signup), :class => 'btn-primary' = link_to t(:cancel), root_url, :class => :btn -- cgit v1.2.3 From dc0584f7d993ef7c75fbdd9d341ebb3337f3448d Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 17 Oct 2012 15:19:09 +0200 Subject: UI tweaks including newer version of bootstrap --- users/app/views/sessions/new.html.haml | 15 ++++++++------- users/app/views/users/new.html.haml | 17 +++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'users/app/views') diff --git a/users/app/views/sessions/new.html.haml b/users/app/views/sessions/new.html.haml index 39ee7bf..c91d3f2 100644 --- a/users/app/views/sessions/new.html.haml +++ b/users/app/views/sessions/new.html.haml @@ -1,7 +1,8 @@ -%h2=t :login -= simple_form_for :session, :url => sessions_path, :html => { :id => :new_session } do |f| - %legend=t :login_message - = f.input :login, :input_html => { :id => :srp_username } - = f.input :password, :required => true, :input_html => { :id => :srp_password } - = f.button :submit, :value => t(:login), :class => 'btn-primary' - = link_to t(:cancel), root_url, :class => :btn +.span8.offset2 + %h2=t :login + = simple_form_for :session, :url => sessions_path, :html => { :id => :new_session, :class => 'form-horizontal' } do |f| + %legend=t :login_message + = f.input :login, :input_html => { :id => :srp_username } + = f.input :password, :required => true, :input_html => { :id => :srp_password } + = f.button :submit, :value => t(:login), :class => 'btn-primary' + = link_to t(:cancel), root_url, :class => :btn diff --git a/users/app/views/users/new.html.haml b/users/app/views/users/new.html.haml index af53331..835e99a 100644 --- a/users/app/views/users/new.html.haml +++ b/users/app/views/users/new.html.haml @@ -1,8 +1,9 @@ -%h2=t :signup -= simple_form_for @user do |f| - %legend=t :signup_message - = f.input :login, :input_html => { :id => :srp_username } - = f.input :password, :required => true, :input_html => { :id => :srp_password } - = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } - = f.button :submit, :value => t(:signup), :class => 'btn-primary' - = link_to t(:cancel), root_url, :class => :btn +.span8.offset2 + %h2=t :signup + = simple_form_for @user, :html => {:class => 'form-horizontal'} do |f| + %legend=t :signup_message + = f.input :login, :input_html => { :id => :srp_username } + = f.input :password, :required => true, :input_html => { :id => :srp_password } + = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } + = f.button :submit, :value => t(:signup), :class => 'btn-primary' + = link_to t(:cancel), root_url, :class => :btn -- cgit v1.2.3 From 93974e99296641822c734a3c192cc6c550efc696 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 19 Oct 2012 12:09:59 +0200 Subject: moved login navigation to the right --- users/app/views/sessions/_nav.html.haml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 users/app/views/sessions/_nav.html.haml (limited to 'users/app/views') diff --git a/users/app/views/sessions/_nav.html.haml b/users/app/views/sessions/_nav.html.haml new file mode 100644 index 0000000..a5397bd --- /dev/null +++ b/users/app/views/sessions/_nav.html.haml @@ -0,0 +1,8 @@ +- if current_user + %li + = link_to t(:logout), logout_path +- else + %li + = link_to t(:login), login_path + %li + = link_to t(:signup), signup_path -- cgit v1.2.3 From b92d418ebec6486a9e728c57f38f82d4c3343341 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 31 Oct 2012 10:40:51 +0100 Subject: using json template for rendering the warden failures --- users/app/views/sessions/new.json.erb | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 users/app/views/sessions/new.json.erb (limited to 'users/app/views') diff --git a/users/app/views/sessions/new.json.erb b/users/app/views/sessions/new.json.erb new file mode 100644 index 0000000..36154b8 --- /dev/null +++ b/users/app/views/sessions/new.json.erb @@ -0,0 +1,3 @@ +{ +"errors": <%= raw @errors.to_json %> +} -- cgit v1.2.3 From 6c60b179a09030da985462d15dbdf076367b5ea4 Mon Sep 17 00:00:00 2001 From: jessib Date: Wed, 31 Oct 2012 12:10:07 -0700 Subject: Code to check administration (and ugly test display.) This includes example config file. --- users/app/views/sessions/_nav.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/sessions/_nav.html.haml b/users/app/views/sessions/_nav.html.haml index a5397bd..204ba88 100644 --- a/users/app/views/sessions/_nav.html.haml +++ b/users/app/views/sessions/_nav.html.haml @@ -1,6 +1,9 @@ -- if current_user +- if logged_in? %li + = 'logged in as ' + current_user.login = link_to t(:logout), logout_path + - if admin? + = 'ADMIN' # obviously not like this - else %li = link_to t(:login), login_path -- cgit v1.2.3 From 05ea71016fd54a14159c72299c25efbdc2f177bc Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 12 Nov 2012 19:16:19 +0100 Subject: adding client side validations to the mix --- users/app/views/users/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/users/new.html.haml b/users/app/views/users/new.html.haml index 835e99a..3e7d06d 100644 --- a/users/app/views/users/new.html.haml +++ b/users/app/views/users/new.html.haml @@ -1,6 +1,6 @@ .span8.offset2 %h2=t :signup - = simple_form_for @user, :html => {:class => 'form-horizontal'} do |f| + = simple_form_for @user, :validate => true, :html => {:class => 'form-horizontal'} do |f| %legend=t :signup_message = f.input :login, :input_html => { :id => :srp_username } = f.input :password, :required => true, :input_html => { :id => :srp_password } -- cgit v1.2.3 From 6ba3366f778340ebeaa73fd53372368b16de6c98 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 13 Nov 2012 12:00:13 +0100 Subject: using client side validations during signup --- users/app/views/users/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/users/new.html.haml b/users/app/views/users/new.html.haml index 3e7d06d..be14c52 100644 --- a/users/app/views/users/new.html.haml +++ b/users/app/views/users/new.html.haml @@ -3,7 +3,7 @@ = simple_form_for @user, :validate => true, :html => {:class => 'form-horizontal'} do |f| %legend=t :signup_message = f.input :login, :input_html => { :id => :srp_username } - = f.input :password, :required => true, :input_html => { :id => :srp_password } + = f.input :password, :required => true, :validate => true, :input_html => { :id => :srp_password } = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } = f.button :submit, :value => t(:signup), :class => 'btn-primary' = link_to t(:cancel), root_url, :class => :btn -- cgit v1.2.3 From 13f53593551549d8e95e382fd42a92efc170943d Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 20 Nov 2012 10:34:13 +0100 Subject: ui tweaks to the menu --- users/app/views/sessions/_nav.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/sessions/_nav.html.haml b/users/app/views/sessions/_nav.html.haml index 204ba88..b738504 100644 --- a/users/app/views/sessions/_nav.html.haml +++ b/users/app/views/sessions/_nav.html.haml @@ -1,8 +1,10 @@ - if logged_in? %li = 'logged in as ' + current_user.login + %li = link_to t(:logout), logout_path - - if admin? + - if admin? + %li = 'ADMIN' # obviously not like this - else %li -- cgit v1.2.3 From cec9ad7c514f2f3c767bd12bfc3df28db4d1a98b Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 22 Nov 2012 11:36:25 +0100 Subject: using client side validations for login --- users/app/views/sessions/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/sessions/new.html.haml b/users/app/views/sessions/new.html.haml index c91d3f2..a04f584 100644 --- a/users/app/views/sessions/new.html.haml +++ b/users/app/views/sessions/new.html.haml @@ -1,6 +1,6 @@ .span8.offset2 %h2=t :login - = simple_form_for :session, :url => sessions_path, :html => { :id => :new_session, :class => 'form-horizontal' } do |f| + = simple_form_for @session, :validate => true, :html => { :id => :new_session, :class => 'form-horizontal' } do |f| %legend=t :login_message = f.input :login, :input_html => { :id => :srp_username } = f.input :password, :required => true, :input_html => { :id => :srp_password } -- cgit v1.2.3 From 33c124aa67788d5c64906f7b3e21ad383577b2a8 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 22 Nov 2012 17:31:18 +0100 Subject: basic user edit form and actions --- users/app/views/sessions/_nav.html.haml | 2 +- users/app/views/users/_form.html.haml | 8 ++++++++ users/app/views/users/edit.html.haml | 3 +++ users/app/views/users/new.html.haml | 8 +------- 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 users/app/views/users/_form.html.haml create mode 100644 users/app/views/users/edit.html.haml (limited to 'users/app/views') diff --git a/users/app/views/sessions/_nav.html.haml b/users/app/views/sessions/_nav.html.haml index b738504..dab865e 100644 --- a/users/app/views/sessions/_nav.html.haml +++ b/users/app/views/sessions/_nav.html.haml @@ -1,6 +1,6 @@ - if logged_in? %li - = 'logged in as ' + current_user.login + = link_to current_user.login, edit_user_path(current_user) %li = link_to t(:logout), logout_path - if admin? diff --git a/users/app/views/users/_form.html.haml b/users/app/views/users/_form.html.haml new file mode 100644 index 0000000..8914241 --- /dev/null +++ b/users/app/views/users/_form.html.haml @@ -0,0 +1,8 @@ += simple_form_for @user, :validate => true, :html => {:class => 'form-horizontal'} do |f| + %legend + = @user.new_record? ? t(:signup_message) : t(:edit_settings) + = f.input :login, :input_html => { :id => :srp_username } + = f.input :password, :required => true, :validate => true, :input_html => { :id => :srp_password } + = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } + = f.button :submit, :class => 'btn-primary' + = link_to t(:cancel), root_url, :class => :btn diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml new file mode 100644 index 0000000..8298443 --- /dev/null +++ b/users/app/views/users/edit.html.haml @@ -0,0 +1,3 @@ +.span8.offset2 + %h2=t :settings + = render 'form' diff --git a/users/app/views/users/new.html.haml b/users/app/views/users/new.html.haml index be14c52..c1c4208 100644 --- a/users/app/views/users/new.html.haml +++ b/users/app/views/users/new.html.haml @@ -1,9 +1,3 @@ .span8.offset2 %h2=t :signup - = simple_form_for @user, :validate => true, :html => {:class => 'form-horizontal'} do |f| - %legend=t :signup_message - = f.input :login, :input_html => { :id => :srp_username } - = f.input :password, :required => true, :validate => true, :input_html => { :id => :srp_password } - = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } - = f.button :submit, :value => t(:signup), :class => 'btn-primary' - = link_to t(:cancel), root_url, :class => :btn + = render 'form' -- cgit v1.2.3 From 76a3b91ad78d12ef82a0c01ca702720a510f1e22 Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 25 Nov 2012 13:21:23 +0100 Subject: basic changing of password and login working --- users/app/views/users/_form.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/users/_form.html.haml b/users/app/views/users/_form.html.haml index 8914241..d26d17d 100644 --- a/users/app/views/users/_form.html.haml +++ b/users/app/views/users/_form.html.haml @@ -1,4 +1,5 @@ -= simple_form_for @user, :validate => true, :html => {:class => 'form-horizontal'} do |f| +- html = {:class => 'form-horizontal user form ' + (@user.new_record? ? 'new' : 'edit')} += simple_form_for @user, :validate => true, :html => html do |f| %legend = @user.new_record? ? t(:signup_message) : t(:edit_settings) = f.input :login, :input_html => { :id => :srp_username } -- cgit v1.2.3 From ce0999ead0d61db1f6534ee9d8114c4551542e80 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 26 Nov 2012 10:59:50 +0100 Subject: minor: client side validations fixed + .json request --- users/app/views/users/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/users/_form.html.haml b/users/app/views/users/_form.html.haml index d26d17d..fc835af 100644 --- a/users/app/views/users/_form.html.haml +++ b/users/app/views/users/_form.html.haml @@ -1,5 +1,5 @@ - html = {:class => 'form-horizontal user form ' + (@user.new_record? ? 'new' : 'edit')} -= simple_form_for @user, :validate => true, :html => html do |f| += simple_form_for @user, :validate => true, :format => :json, :html => html do |f| %legend = @user.new_record? ? t(:signup_message) : t(:edit_settings) = f.input :login, :input_html => { :id => :srp_username } -- cgit v1.2.3 From bf74255d1530fe5852dc6e6c27ef975ce9aa8d3c Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 26 Nov 2012 14:32:50 +0100 Subject: added admin menu and user index action --- users/app/views/sessions/_admin_nav.html.haml | 6 ++++++ users/app/views/sessions/_nav.html.haml | 6 +++--- users/app/views/users/index.html.haml | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 users/app/views/sessions/_admin_nav.html.haml create mode 100644 users/app/views/users/index.html.haml (limited to 'users/app/views') diff --git a/users/app/views/sessions/_admin_nav.html.haml b/users/app/views/sessions/_admin_nav.html.haml new file mode 100644 index 0000000..14dfbdc --- /dev/null +++ b/users/app/views/sessions/_admin_nav.html.haml @@ -0,0 +1,6 @@ +%a#admin-menu{"data-toggle" => "dropdown", :role => :button} + Admin +%ul.dropdown-menu{:role => "menu", "aria-labelledby" => "admin-menu"} + %li + = link_to Ticket.model_name.human(:count => ""), tickets_path, {:tabindex => -1} + = link_to User.model_name.human(:count => ""), users_path, {:tabindex => -1} diff --git a/users/app/views/sessions/_nav.html.haml b/users/app/views/sessions/_nav.html.haml index dab865e..5306d0e 100644 --- a/users/app/views/sessions/_nav.html.haml +++ b/users/app/views/sessions/_nav.html.haml @@ -1,11 +1,11 @@ - if logged_in? + - if admin? + %li.dropdown + = render 'sessions/admin_nav' %li = link_to current_user.login, edit_user_path(current_user) %li = link_to t(:logout), logout_path - - if admin? - %li - = 'ADMIN' # obviously not like this - else %li = link_to t(:login), login_path diff --git a/users/app/views/users/index.html.haml b/users/app/views/users/index.html.haml new file mode 100644 index 0000000..7db6038 --- /dev/null +++ b/users/app/views/users/index.html.haml @@ -0,0 +1 @@ +%h1= User.model_name.human(:count =>@users.count) -- cgit v1.2.3 From 51ba799f98113b7112f2968fc80e4d291924b3bf Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 26 Nov 2012 16:34:46 +0100 Subject: basic users index with typeahead search --- users/app/views/users/index.html.haml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'users/app/views') diff --git a/users/app/views/users/index.html.haml b/users/app/views/users/index.html.haml index 7db6038..65e99af 100644 --- a/users/app/views/users/index.html.haml +++ b/users/app/views/users/index.html.haml @@ -1 +1,17 @@ -%h1= User.model_name.human(:count =>@users.count) +.page-header + %h1= User.model_name.human(:count =>User.count) +.row + .span8 + %h2 Last users who signed up + %table.table.table-hover + %tr + %th Login + %th Created + %th Action + = render @users.all + .span4 + %h4 Find user + %form.form-search + .input-append + %input.user.typeahead.span2.search-query{:type => :text} + %button.btn{:type => :submit} Search -- cgit v1.2.3 From a941c89293bcbb067c6152b63765ead38a484b81 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 26 Nov 2012 18:06:21 +0100 Subject: basic typeahead and user querying working --- users/app/views/users/index.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'users/app/views') diff --git a/users/app/views/users/index.html.haml b/users/app/views/users/index.html.haml index 65e99af..9e6a179 100644 --- a/users/app/views/users/index.html.haml +++ b/users/app/views/users/index.html.haml @@ -2,7 +2,7 @@ %h1= User.model_name.human(:count =>User.count) .row .span8 - %h2 Last users who signed up + %h2= params[:query] ? "Users starting with '#{params[:query]}'" : "Last users who signed up" %table.table.table-hover %tr %th Login @@ -11,7 +11,7 @@ = render @users.all .span4 %h4 Find user - %form.form-search + = form_tag users_path, :method => :get, :class => "form-search" do .input-append - %input.user.typeahead.span2.search-query{:type => :text} - %button.btn{:type => :submit} Search + = text_field_tag :query, "", :class => "user typeahead span2 search-query", :autocomplete => :off + %button.btn{:type => :submit} Search -- cgit v1.2.3 From 1d7ea661ca0cc03ffb10026e306d4e451e085cfa Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 26 Nov 2012 19:25:59 +0100 Subject: forgot the user partial --- users/app/views/users/_user.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 users/app/views/users/_user.html.haml (limited to 'users/app/views') diff --git a/users/app/views/users/_user.html.haml b/users/app/views/users/_user.html.haml new file mode 100644 index 0000000..5eb7941 --- /dev/null +++ b/users/app/views/users/_user.html.haml @@ -0,0 +1,7 @@ +%tr + %td= user.login + %td= time_ago_in_words(user.created_at) + " ago" + %td + = link_to user_path(user), :method => :delete, :class => "btn btn-danger btn-mini" do + %i.icon-remove.icon-white + Remove -- cgit v1.2.3 From 1de597b338f0622a7732676907365de673c34dfb Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 3 Dec 2012 10:24:49 +0100 Subject: enable admin to edit users --- users/app/views/users/_user.html.haml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'users/app/views') diff --git a/users/app/views/users/_user.html.haml b/users/app/views/users/_user.html.haml index 5eb7941..7db0041 100644 --- a/users/app/views/users/_user.html.haml +++ b/users/app/views/users/_user.html.haml @@ -2,6 +2,9 @@ %td= user.login %td= time_ago_in_words(user.created_at) + " ago" %td + = link_to edit_user_path(user), :class => "btn btn-mini btn-primary" do + %i.icon-edit.icon-white + Edit = link_to user_path(user), :method => :delete, :class => "btn btn-danger btn-mini" do %i.icon-remove.icon-white Remove -- cgit v1.2.3 From 2a928455f9dcefa465b80b79768ba1d1a423e6e9 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 3 Dec 2012 10:52:01 +0100 Subject: enable users to cancel their account --- users/app/views/users/edit.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'users/app/views') diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml index 8298443..cfcf220 100644 --- a/users/app/views/users/edit.html.haml +++ b/users/app/views/users/edit.html.haml @@ -1,3 +1,10 @@ .span8.offset2 %h2=t :settings = render 'form' + - if @user == current_user + %legend + =t :cancel_account + %small You will not be able to login anymore. + = link_to user_path(@user), :method => :delete, :class => "btn btn-danger" do + %i.icon-remove.icon-white + Remove my Account -- cgit v1.2.3 From 059b6fca8468e7b9a2507f24b84e09ce4b8c3ddd Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 6 Dec 2012 16:03:59 +0100 Subject: seperated login and password changes in settings --- users/app/views/users/_form.html.haml | 18 ++++++++++++------ users/app/views/users/edit.html.haml | 11 +++-------- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'users/app/views') diff --git a/users/app/views/users/_form.html.haml b/users/app/views/users/_form.html.haml index fc835af..39e26a6 100644 --- a/users/app/views/users/_form.html.haml +++ b/users/app/views/users/_form.html.haml @@ -1,9 +1,15 @@ +- only = local_assigns[:only] - html = {:class => 'form-horizontal user form ' + (@user.new_record? ? 'new' : 'edit')} = simple_form_for @user, :validate => true, :format => :json, :html => html do |f| %legend - = @user.new_record? ? t(:signup_message) : t(:edit_settings) - = f.input :login, :input_html => { :id => :srp_username } - = f.input :password, :required => true, :validate => true, :input_html => { :id => :srp_password } - = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } - = f.button :submit, :class => 'btn-primary' - = link_to t(:cancel), root_url, :class => :btn + = t(only || :signup_message) + - if !only || only == :change_login + = f.input :login, :input_html => { :id => :srp_username } + - if !only || only == :change_password + = f.input :password, :required => true, :validate => true, :input_html => { :id => :srp_password } + = f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } + .pull-right + = f.button :submit, :class => 'btn-primary' + - unless only + = link_to t(:cancel), root_url, :class => :btn + .clearfix diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml index cfcf220..25da71a 100644 --- a/users/app/views/users/edit.html.haml +++ b/users/app/views/users/edit.html.haml @@ -1,10 +1,5 @@ .span8.offset2 %h2=t :settings - = render 'form' - - if @user == current_user - %legend - =t :cancel_account - %small You will not be able to login anymore. - = link_to user_path(@user), :method => :delete, :class => "btn btn-danger" do - %i.icon-remove.icon-white - Remove my Account + = render :partial => 'form', :locals => {:only => :change_login} + = render :partial => 'form', :locals => {:only => :change_password} + = render 'cancel_account' if @user == current_user -- cgit v1.2.3 From f65b0bc32fd2785458d4076faf89683effca5031 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 6 Dec 2012 17:00:53 +0100 Subject: forgot to add new partial --- users/app/views/users/_cancel_account.html.haml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 users/app/views/users/_cancel_account.html.haml (limited to 'users/app/views') diff --git a/users/app/views/users/_cancel_account.html.haml b/users/app/views/users/_cancel_account.html.haml new file mode 100644 index 0000000..41580b0 --- /dev/null +++ b/users/app/views/users/_cancel_account.html.haml @@ -0,0 +1,6 @@ +%legend + =t :cancel_account + %small You will not be able to login anymore. += link_to user_path(@user), :method => :delete, :class => "btn btn-danger" do + %i.icon-remove.icon-white + Remove my Account -- cgit v1.2.3