mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 21:48:02 +00:00
Merge branch 'devel' into 'master'
OpenID work (latest devel) and messages See merge request oliver/ivatar!64
This commit is contained in:
@@ -29,7 +29,11 @@
|
|||||||
<label for="id_password">{% trans 'Password' %}:</label>
|
<label for="id_password">{% trans 'Password' %}:</label>
|
||||||
<input type="password" name="password" class="form-control" required id="id_password">
|
<input type="password" name="password" class="form-control" required id="id_password">
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-default">{% trans 'Login' %}</button> or <a href="{% url 'new_account' %}" class="btn btn-default">{% trans 'Create new user' %}</a>
|
<button type="submit" class="btn btn-default">{% trans 'Login' %}</button>
|
||||||
|
or
|
||||||
|
<a href="{% url 'openid-login' %}" class="btn btn-default">{% trans 'Login with OpenID' %}</a>
|
||||||
|
or
|
||||||
|
<a href="{% url 'new_account' %}" class="btn btn-default">{% trans 'Create new user' %}</a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div style="height:40px"></div>
|
<div style="height:40px"></div>
|
||||||
|
|||||||
@@ -526,6 +526,14 @@ class RemoveConfirmedOpenIDView(View):
|
|||||||
try:
|
try:
|
||||||
openid = self.model.objects.get( # pylint: disable=no-member
|
openid = self.model.objects.get( # pylint: disable=no-member
|
||||||
user=request.user, id=kwargs['openid_id'])
|
user=request.user, id=kwargs['openid_id'])
|
||||||
|
try:
|
||||||
|
openidobj = UserOpenID.objects.get( # pylint: disable=no-member
|
||||||
|
user_id=request.user.id,
|
||||||
|
claimed_id=openid.openid)
|
||||||
|
openidobj.delete()
|
||||||
|
except:
|
||||||
|
# Why it is not there?
|
||||||
|
pass
|
||||||
openid.delete()
|
openid.delete()
|
||||||
messages.success(request, _('ID removed'))
|
messages.success(request, _('ID removed'))
|
||||||
except self.model.DoesNotExist: # pylint: disable=no-member
|
except self.model.DoesNotExist: # pylint: disable=no-member
|
||||||
|
|||||||
@@ -72,6 +72,14 @@
|
|||||||
{% autoescape off %}{% endautoescape %}
|
{% autoescape off %}{% endautoescape %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
{% if messages %}
|
||||||
|
{% for message in messages %}
|
||||||
|
<div class="alert alert-{{ message.tags }}" role="alert">
|
||||||
|
{{ message }}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block content %}{% endblock content %}
|
{% block content %}{% endblock content %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,14 @@
|
|||||||
<p><label for="id_openid_identifier">{% trans 'OpenID' %}:</label>
|
<p><label for="id_openid_identifier">{% trans 'OpenID' %}:</label>
|
||||||
<input class="required openid" id="id_openid_identifier" size="70" maxlength="255" name="openid_identifier" value="{{ openid_identifier }}" type="text"></p>
|
<input class="required openid" id="id_openid_identifier" size="70" maxlength="255" name="openid_identifier" value="{{ openid_identifier }}" type="text"></p>
|
||||||
|
|
||||||
<p><input type="submit" value="{% trans 'Login' %}" />
|
<p>
|
||||||
|
<button type="submit" class="btn btn-default">{% trans 'Login' %}</button>
|
||||||
<input type="hidden" name="next" id="next"/>
|
<input type="hidden" name="next" id="next"/>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("next").value = window.location.protocol + '//' + window.location.hostname + "{% url 'profile' %}";
|
document.getElementById("next").value = window.location.protocol + '//' + window.location.hostname + "{% url 'profile' %}";
|
||||||
</script>
|
</script>
|
||||||
<a href="{% url 'home' %}">{% trans 'Cancel' %}</a></p>
|
|
||||||
|
<button type="reset" class="btn btn-default" onclick="window.history.back();">{% trans 'Cancel' %}</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user