github.com/blystad/deis@v0.11.0/controller/web/templates/account/email.html (about) 1 {% extends "account/base.html" %} 2 3 {% load i18n %} 4 {% load url from future %} 5 6 {% block head_title %}{% trans "Account" %}{% endblock %} 7 8 {% block content %} 9 <h1>{% trans "E-mail Addresses" %}</h1> 10 {% if user.emailaddress_set.all %} 11 <p>{% trans 'The following e-mail addresses are associated with your account:' %}</p> 12 13 <form action="{% url 'account_email' %}" class="email_list" method="post"> 14 {% csrf_token %} 15 <fieldset class="blockLabels"> 16 17 {% for emailaddress in user.emailaddress_set.all %} 18 <div class="ctrlHolder"> 19 <label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}"> 20 21 <input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}"/> 22 23 {{ emailaddress.email }} 24 {% if emailaddress.verified %} 25 <span class="verified">{% trans "Verified" %}</span> 26 {% else %} 27 <span class="unverified">{% trans "Unverified" %}</span> 28 {% endif %} 29 {% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %} 30 </label> 31 </div> 32 {% endfor %} 33 34 <div class="buttonHolder"> 35 <button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button> 36 <button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button> 37 <button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button> 38 </div> 39 40 </fieldset> 41 </form> 42 43 {% else %} 44 <p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p> 45 46 {% endif %} 47 48 49 <h2>{% trans "Add E-mail Address" %}</h2> 50 51 <form method="post" action="" class="add_email uniForm"> 52 {% csrf_token %} 53 {{ form.as_p}} 54 <button name="action_add" type="submit">{% trans "Add E-mail" %}</button> 55 </form> 56 57 {% endblock %} 58 59 60 {% block extra_body %} 61 <script type="text/javascript"> 62 (function() { 63 var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}"; 64 var actions = document.getElementsByName('action_remove'); 65 if (actions.length) { 66 actions[0].addEventListener("click", function(e) { 67 if (! confirm(message)) { 68 e.preventDefault(); 69 } 70 }); 71 } 72 })(); 73 </script> 74 {% endblock %}