Commit ffc73c98 authored by Olga Brani's avatar Olga Brani Committed by Giorgos Korfiatis

admin: Don't break hyphen in 'e-mail'

parent 224bcc3c
# Copyright (C) 2010-2014 GRNET S.A. # Copyright (C) 2010-2016 GRNET S.A.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -60,7 +60,7 @@ def generate_actions(): ...@@ -60,7 +60,7 @@ def generate_actions():
actions['reassign'] = IPAction(name='Reassign to project', f=noop, actions['reassign'] = IPAction(name='Reassign to project', f=noop,
karma='neutral', caution_level='dangerous',) karma='neutral', caution_level='dangerous',)
actions['contact'] = IPAction(name='Send e-mail', f=send_admin_email,) actions['contact'] = IPAction(name='Send e‑mail', f=send_admin_email,)
update_actions_rbac(actions) update_actions_rbac(actions)
......
# Copyright (C) 2010-2014 GRNET S.A. # Copyright (C) 2010-2016 GRNET S.A.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -85,7 +85,7 @@ def generate_actions(): ...@@ -85,7 +85,7 @@ def generate_actions():
karma='neutral', karma='neutral',
caution_level='dangerous',) caution_level='dangerous',)
actions['contact'] = NetworkAction(name='Send e-mail', f=send_admin_email, actions['contact'] = NetworkAction(name='Send e‑mail', f=send_admin_email,
c=check_network_action("CONTACT"),) c=check_network_action("CONTACT"),)
update_actions_rbac(actions) update_actions_rbac(actions)
......
# Copyright (C) 2010-2014 GRNET S.A. # Copyright (C) 2010-2016 GRNET S.A.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -107,7 +107,7 @@ def generate_actions(): ...@@ -107,7 +107,7 @@ def generate_actions():
karma='good', karma='good',
caution_level='warning',) caution_level='warning',)
actions['contact'] = ProjectAction(name='Send e-mail', f=send_admin_email,) actions['contact'] = ProjectAction(name='Send e‑mail', f=send_admin_email,)
update_actions_rbac(actions) update_actions_rbac(actions)
......
...@@ -81,9 +81,9 @@ def generate_actions(): ...@@ -81,9 +81,9 @@ def generate_actions():
name='Resend verification', f=users.send_verification_mail, name='Resend verification', f=users.send_verification_mail,
karma='good', c=check_user_action("SEND_VERIFICATION_MAIL"),) karma='good', c=check_user_action("SEND_VERIFICATION_MAIL"),)
actions['contact'] = UserAction(name='Send e-mail', f=send_admin_email,) actions['contact'] = UserAction(name='Send e‑mail', f=send_admin_email,)
actions['modify_email'] = UserAction(name='Change e-mail', actions['modify_email'] = UserAction(name='Change e‑mail',
f=change_user_email, karma='bad', f=change_user_email, karma='bad',
caution_level='dangerous',) caution_level='dangerous',)
......
# Copyright (C) 2010-2014 GRNET S.A. # Copyright (C) 2010-2016 GRNET S.A.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -114,7 +114,7 @@ def generate_actions(): ...@@ -114,7 +114,7 @@ def generate_actions():
karma='neutral', karma='neutral',
caution_level='dangerous',) caution_level='dangerous',)
actions['contact'] = VMAction(name='Send e-mail', f=send_admin_email,) actions['contact'] = VMAction(name='Send e‑mail', f=send_admin_email,)
update_actions_rbac(actions) update_actions_rbac(actions)
......
# Copyright (C) 2010-2014 GRNET S.A. # Copyright (C) 2010-2016 GRNET S.A.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -38,7 +38,7 @@ def generate_actions(): ...@@ -38,7 +38,7 @@ def generate_actions():
"""Create a list of actions on volumes.""" """Create a list of actions on volumes."""
actions = OrderedDict() actions = OrderedDict()
actions['contact'] = VolumeAction(name='Send e-mail', f=send_admin_email,) actions['contact'] = VolumeAction(name='Send e‑mail', f=send_admin_email,)
update_actions_rbac(actions) update_actions_rbac(actions)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="modal-content area"> <div class="modal-content area">
<div class="modal-header"> <div class="modal-header">
<a class="close cancel" data-dismiss="modal">×</a> <a class="close cancel" data-dismiss="modal">×</a>
<h3 class="elem">{{ action.name }}</h3> <h3 class="elem">{{ action.name|safe }}</h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
{% if op == "contact" %} {% if op == "contact" %}
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="form-body form-area"> <div class="form-body form-area">
<label>Body:</label> <label>Body:</label>
<textarea name="text" form="contactForm" class="email-content body">{{ mail.body }}</textarea> <textarea name="text" form="contactForm" class="email-content body">{{ mail.body }}</textarea>
<a data-error="empty-body" data-toggle="popover" data-trigger="hover" class="error-sign snf-exclamation-sign" href="#" rel="tooltip" data-content="Missing the body of the e-mail."></a> <a data-error="empty-body" data-toggle="popover" data-trigger="hover" class="error-sign snf-exclamation-sign" href="#" rel="tooltip" data-content="Missing the body of the e&#8209;mail."></a>
<div class="extra-info"> <div class="extra-info">
<a href="" class="snf-info instructions-icon" data-container="#{{action.target}}-{{ op }}" data-toggle="popover" data-html="true" data-placement="right" data-content=" <a href="" class="snf-info instructions-icon" data-container="#{{action.target}}-{{ op }}" data-toggle="popover" data-html="true" data-placement="right" data-content="
<h2>Legend</h2> <h2>Legend</h2>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
{% endif %} {% endif %}
{# If we are in a details view, then the number of items is just one, so we can get rid of the plural #} {# If we are in a details view, then the number of items is just one, so we can get rid of the plural #}
<div class="summary"> <div class="summary">
<p>You have chosen to <em class="elem lowercase">{{ action.name }}</em> <p>You have chosen to <em class="elem lowercase">{{ action.name|safe }}</em>
{% if op == "contact" %} {% if op == "contact" %}
to to
{% elif op == "modify_email" %} {% elif op == "modify_email" %}
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a href="#" class="custom-btn cancel" data-dismiss="modal"><span>Cancel</span></a> <a href="#" class="custom-btn cancel" data-dismiss="modal"><span>Cancel</span></a>
<a href="#" data-url={% url admin-actions %} data-op={{ op }} data-ids="" data-target={{ action.target }} class="custom-btn apply-action" data-karma={{ action.karma }} data-caution={{ action.caution_level }} data-dismiss="modal"><span>{{ action.name }}</span></a> <a href="#" data-url={% url admin-actions %} data-op={{ op }} data-ids="" data-target={{ action.target }} class="custom-btn apply-action" data-karma={{ action.karma }} data-caution={{ action.caution_level }} data-dismiss="modal"><span>{{ action.name|safe }}</span></a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
<dt>ID</dt><dd>{{ user.id }}</dd> <dt>ID</dt><dd>{{ user.id }}</dd>
<dt>UUID</dt><dd>{{ user.uuid }}</dd> <dt>UUID</dt><dd>{{ user.uuid }}</dd>
<dt>Name</dt><dd>{{ user.realname }}</dd> <dt>Name</dt><dd>{{ user.realname }}</dd>
<dt>E-mail</dt><dd>{{ user.email }}</dd> <dt>E&#8209;mail</dt><dd>{{ user.email }}</dd>
{% if user.accepted_email and user.email != user.accepted_email %} {% if user.accepted_email and user.email != user.accepted_email %}
<dt>Initially accepted e-mail</dt><dd>{{ user.accepted_email }}</dd> <dt>Initially accepted e&#8209;mail</dt><dd>{{ user.accepted_email }}</dd>
{% endif %} {% endif %}
{% if user.email_change_is_pending %} {% if user.email_change_is_pending %}
<dt>E-mail pending verification</dt> <dt>E&#8209;mail pending verification</dt>
<dd>{{ user.emailchanges.all.0.new_email_address }} <dd>{{ user.emailchanges.all.0.new_email_address }}
<dt>E-mail change requested at</dt> <dt>E&#8209;mail change requested at</dt>
<dd>{{ user.emailchanges.all.0.requested_at }} <dd>{{ user.emailchanges.all.0.requested_at }}
{% endif %} {% endif %}
<dt>Status</dt><dd>{{ user.status_display|upper }}</dd> <dt>Status</dt><dd>{{ user.status_display|upper }}</dd>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% for op, action in action_dict.items %} {% for op, action in action_dict.items %}
{% if action|can_apply:item %} {% if action|can_apply:item %}
<a href="" data-target="#{{action.target}}-{{ op }}" data-action="{{ op }}" data-toggle="modal" data-karma="{{ action.karma }}" data-caution="{{ action.caution_level }}" class="custom-btn"> <a href="" data-target="#{{action.target}}-{{ op }}" data-action="{{ op }}" data-toggle="modal" data-karma="{{ action.karma }}" data-caution="{{ action.caution_level }}" class="custom-btn">
<span>{{ action.name }}</span> <span>{{ action.name|safe }}</span>
</a> </a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="btn-group-vertical"> <div class="btn-group-vertical">
{% for op, action in action_dict.items %} {% for op, action in action_dict.items %}
<a href="" data-target="#{{action.target}}-{{ op }}" data-action="{{ op }}" data-toggle="modal" data-karma={{ action.karma }} data-caution="{{ action.caution_level }}" class="disabled custom-btn"> <a href="" data-target="#{{action.target}}-{{ op }}" data-action="{{ op }}" data-toggle="modal" data-karma={{ action.karma }} data-caution="{{ action.caution_level }}" class="disabled custom-btn">
<span>{{ action.name }}</span> <span>{{ action.name|safe }}</span>
</a> </a>
{% endfor %} {% endfor %}
</div> </div>
......
...@@ -417,7 +417,7 @@ def show_auth_providers(user, category): ...@@ -417,7 +417,7 @@ def show_auth_providers(user, category):
@register.filter @register.filter
def can_apply(action, item): def can_apply(action, item):
"""Return if action can apply on item.""" """Return if action can apply on item."""
if action.name == "Send e-mail" and action.target != 'user': if action.name == "Send e&#8209;mail" and action.target != 'user':
return False return False
return action.can_apply(item) return action.can_apply(item)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment