Browse Source

Fix after-login redirects for users landing in the "Add Pushover" page

pull/211/head
Pēteris Caune 6 years ago
parent
commit
b081631e90
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 4 additions and 20 deletions
  1. +2
    -1
      hc/accounts/views.py
  2. +2
    -19
      templates/integrations/add_pushover.html

+ 2
- 1
hc/accounts/views.py View File

@ -26,7 +26,8 @@ from hc.lib.badges import get_badge_url
from hc.payments.models import Subscription from hc.payments.models import Subscription
NEXT_WHITELIST = ("/checks/", NEXT_WHITELIST = ("/checks/",
"/integrations/add_slack/")
"/integrations/add_slack/",
"/integrations/add_pushover/")
def _make_user(email): def _make_user(email):


+ 2
- 19
templates/integrations/add_pushover.html View File

@ -24,25 +24,8 @@
{% site_name %}:</p> {% site_name %}:</p>
<div class="text-center"> <div class="text-center">
<form class="form-inline" action="{% url 'hc-login' %}" method="post">
{% csrf_token %}
<div class="form-group">
<div class="input-group input-group-lg">
<div class="input-group-addon">@</div>
<input
type="email"
class="form-control"
name="email"
autocomplete="email"
placeholder="Email">
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-lg btn-primary pull-right">
Log In
</button>
</div>
</form>
<a href="{% url 'hc-login' %}?next={% url 'hc-add-pushover' %}"
class="btn btn-primary btn-lg">Sign In</a>
</div> </div>
{% endif %} {% endif %}
</div> </div>


Loading…
Cancel
Save