fixes #1128
This commit is contained in:
@@ -22,6 +22,10 @@ class UserNameChangeRequest < ActiveRecord::Base
|
|||||||
status == "rejected"
|
status == "rejected"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def approved?
|
||||||
|
status == "approved"
|
||||||
|
end
|
||||||
|
|
||||||
def normalize_name
|
def normalize_name
|
||||||
self.desired_name = desired_name.strip.gsub(/ /, "_")
|
self.desired_name = desired_name.strip.gsub(/ /, "_")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -37,6 +37,12 @@
|
|||||||
<section>
|
<section>
|
||||||
<h2>Request was rejected</h2>
|
<h2>Request was rejected</h2>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<% elsif @change_request.approved? %>
|
||||||
|
<section>
|
||||||
|
<h2>Request was approved by <%= @change_request.approver.name %></h2>
|
||||||
|
</section>
|
||||||
|
|
||||||
<% elsif CurrentUser.user.is_admin? %>
|
<% elsif CurrentUser.user.is_admin? %>
|
||||||
<section>
|
<section>
|
||||||
<h2>Options</h2>
|
<h2>Options</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user