forked from shaba/openuds
Fixed a bit login form
trying things with services display
This commit is contained in:
parent
5cf101d3c8
commit
5fd0436ab6
@ -85,6 +85,7 @@ footer {
|
||||
}
|
||||
.profile-img
|
||||
{
|
||||
font-size: 96px;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin: 0 auto 10px;
|
||||
|
@ -2,7 +2,20 @@
|
||||
{% load i18n static html5 %}
|
||||
{% block js %}
|
||||
<script>
|
||||
function squarifyMe(element) {
|
||||
squareItUp();
|
||||
window.onresize = function(element) {
|
||||
squareItUp();
|
||||
}
|
||||
|
||||
function squareItUp() {
|
||||
$(element).height($(element).width());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
squarifyMe('.square');
|
||||
|
||||
{% if not java %}
|
||||
$('#jmessage').dialog({
|
||||
autoOpen: false,
|
||||
@ -24,26 +37,32 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="services">
|
||||
<h2>{% trans "Services" %}</h2>
|
||||
<ul>
|
||||
<div class="row">
|
||||
{% for ser in services %}
|
||||
{{ forloop.counter }}
|
||||
{% if forloop.counter0|divisibleby:2 == 1 %}
|
||||
</div><div class="row">
|
||||
{% endif %}
|
||||
{% if ser.transports %}
|
||||
<li>
|
||||
{% with trans=ser.transports|first %}
|
||||
<a{% if not java and trans.needsJava %} class="nojava"{% endif %} href="{% url "uds.web.views.service" idService=ser.id idTransport=trans.id %}">{{ ser.name }}</a>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a class="{% if not java and trans.needsJava %} nojava{% endif %}" href="{% url "uds.web.views.service" idService=ser.id idTransport=trans.id %}">
|
||||
<img src="{% url "uds.web.views.transportIcon" idTrans=trans.id %}" class="" alt="{{ ser.name }}" />
|
||||
<div class="caption">{{ ser.name }}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
<ul>
|
||||
<!--
|
||||
{% for trans in ser.transports %}
|
||||
<li><a{% if not java and trans.needsJava %} class="nojava"{% endif %} href="{% url "uds.web.views.service" idService=ser.id idTransport=trans.id %}"><img src="{% url "uds.web.views.transportIcon" idTrans=trans.id %}" alt="{{ trans.name }}" />{{ trans.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %} -->
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if not java %}
|
||||
<div id="jmessage" title="{% trans "Java not found" %}">
|
||||
<p>{% trans "Java is not available on your browser, and the selected transport needs it." %}</p>
|
||||
|
@ -67,19 +67,19 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
<div class="row" id="login">
|
||||
<div class="col-sm-6 col-md-4 col-md-offset-4">
|
||||
<h1 class="text-center login-title">{% trans 'Welcome to UDS' %}</h1>
|
||||
<div class="account-wall">
|
||||
<span class="fa fa-user profile-img text-info"></span>
|
||||
<form id="loginform" class="form-signin" name="loginform" method="post">
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-dismissable alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{% trans 'invalid credentials'|capfirst %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="container">
|
||||
<div class="row" id="login">
|
||||
<div class="col-sm-6 col-md-4 col-md-offset-4">
|
||||
<h1 class="text-center login-title">{% trans 'Sign in to access UDS' %}</h1>
|
||||
<div class="account-wall">
|
||||
<img class="profile-img" src="{% get_static_prefix %}img/login-img.png" alt="">
|
||||
<form id="loginform" class="form-signin" name="loginform" method="post">
|
||||
{% csrf_token %}
|
||||
{% for hidden in form.hidden_fields %}
|
||||
{{ hidden }}
|
||||
|
@ -51,7 +51,7 @@ class CustomSelect(forms.Select):
|
||||
for choice in self.choices:
|
||||
res += '<option value="{0}">{1}</option>'.format(choice[0], choice[1])
|
||||
res += '</select>'
|
||||
return mark_safe(res)
|
||||
return mark_safe('<div class="form-group"><label>' + unicode(_('authenticator')) + '</label>' + res + '</div>')
|
||||
|
||||
class BaseForm(forms.Form):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user