-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add additional email creation (#874)
- Loading branch information
Showing
10 changed files
with
379 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{% extends 'projectroles/base.html' %} | ||
|
||
{% load rules %} | ||
{% load crispy_forms_filters %} | ||
{% load projectroles_tags %} | ||
{% load projectroles_common_tags %} | ||
|
||
{% block title %} | ||
Add Email Address | ||
{% endblock title %} | ||
|
||
{% block head_extend %} | ||
{{ form.media }} | ||
{% endblock head_extend %} | ||
|
||
{% block projectroles %} | ||
|
||
<div class="row sodar-pr-content-title pt-2"> | ||
<h2 class="sodar-pr-content-title">{{ request.user.get_full_name }}</h2> | ||
<div class="sodar-pr-content-title-secondary text-muted">User Profile</div> | ||
</div> | ||
|
||
<div class="row sodar-subtitle-container"> | ||
<h3>Add Email Address</h3> | ||
</div> | ||
|
||
<div class="container-fluid sodar-page-container"> | ||
<form method="post"> | ||
{% csrf_token %} | ||
{{ form | crispy }} | ||
<div class="row"> | ||
<div class="btn-group ml-auto" role="group"> | ||
<a role="button" class="btn btn-secondary" | ||
href="{% url 'userprofile:detail' %}"> | ||
<i class="iconify" data-icon="mdi:arrow-left-circle"></i> Cancel | ||
</a> | ||
<button type="submit" class="btn btn-primary"> | ||
<i class="iconify" data-icon="mdi:plus-thick"></i> Add | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
{% endblock projectroles %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ def test_update_button(self): | |
expected = [(self.local_user, 1), (self.ldap_user, 0)] | ||
self.assert_element_count(expected, self.url, 'sodar-user-btn-update') | ||
|
||
def test_add_email_unset(self): | ||
def test_additional_email_unset(self): | ||
"""Test existence of additional email elements without email""" | ||
self.assert_element_count( | ||
[(self.local_user, 0)], | ||
|
@@ -48,7 +48,7 @@ def test_add_email_unset(self): | |
True, | ||
) | ||
|
||
def test_add_email_set(self): | ||
def test_additional_email_set(self): | ||
"""Test existence of additional email elements with email""" | ||
self.make_email(self.local_user, '[email protected]') | ||
self.make_email(self.local_user, '[email protected]', verified=False) | ||
|
@@ -67,6 +67,16 @@ def test_add_email_set(self): | |
False, | ||
) | ||
|
||
@override_settings(PROJECTROLES_SEND_EMAIL=False) | ||
def test_additional_email_disabled(self): | ||
"""Test existence of email card with PROJECTROLES_SEND_EMAIL=False""" | ||
self.assert_element_exists( | ||
[self.local_user], | ||
self.url, | ||
'sodar-user-email-card', | ||
False, | ||
) | ||
|
||
|
||
class TestUserSettings(UITestBase): | ||
"""Tests for user settings page""" | ||
|
Oops, something went wrong.