From 8a7040e155cb2f56661d6695422e6ccac88a7bdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 1 Oct 2009 18:02:08 +0000 Subject: [PATCH] Set title/h1 to something sensible when granting/revoking roles --- app/views/user_roles/grant.html.erb | 2 ++ app/views/user_roles/revoke.html.erb | 2 ++ config/locales/en.yml | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/app/views/user_roles/grant.html.erb b/app/views/user_roles/grant.html.erb index ca45266d6..f9e54fd1c 100644 --- a/app/views/user_roles/grant.html.erb +++ b/app/views/user_roles/grant.html.erb @@ -1,5 +1,7 @@ <% form_tag request.request_uri do %> <%= hidden_field_tag 'nonce', @nonce %> +<% @title = t('user_role.grant.heading') %> +

<%= t('user_role.grant.heading') %>

<%= t('user_role.grant.are_you_sure', :name => params[:display_name], :role => params[:role]) %>

<%= submit_tag t'user_role.grant.confirm' %>

<% end %> diff --git a/app/views/user_roles/revoke.html.erb b/app/views/user_roles/revoke.html.erb index 17219d9c7..e5aadeae0 100644 --- a/app/views/user_roles/revoke.html.erb +++ b/app/views/user_roles/revoke.html.erb @@ -1,5 +1,7 @@ <% form_tag request.request_uri do %> <%= hidden_field_tag 'nonce', @nonce %> +<% @title = t('user_role.revoke.heading') %> +

<%= t('user_role.revoke.heading') %>

<%= t('user_role.revoke.are_you_sure', :name => params[:display_name], :role => params[:role]) %>

<%= submit_tag t'user_role.revoke.confirm' %>

<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8d53dcdf3..9105a2d42 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1013,10 +1013,14 @@ en: already_has_role: "The user already has role {{role}}." doesnt_have_role: "The user does not have role {{role}}." grant: + title: Confirm role granting + heading: Confirm role granting are_you_sure: "Are you sure you want to grant the role `{{role}}' to the user `{{name}}'?" confirm: "Confirm" fail: "Couldn't grant role `{{role}}' to user `{{name}}'. Please check that the user and role are both valid." revoke: + title: Confirm role revoking + heading: Confirm role revoking are_you_sure: "Are you sure you want to revoke the role `{{role}}' from the user `{{name}}'?" confirm: "Confirm" fail: "Couldn't revoke role `{{role}}' from user `{{name}}'. Please check that the user and role are both valid." -- 2.39.5