Commit 04df82f7 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Added realms in admin view with full functionality

parent 38f2278d
......@@ -19,6 +19,11 @@ class InstServerForm(forms.ModelForm):
class Meta:
model = InstServer
class InstRealmForm(forms.ModelForm):
class Meta:
model = InstRealm
class ServiceLocForm(forms.ModelForm):
class Meta:
......
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'InstRealm.priority'
db.delete_column('edumanage_instrealm', 'priority')
# Deleting field 'InstRealm.realmexpr'
db.delete_column('edumanage_instrealm', 'realmexpr')
# Adding field 'InstRealm.realm'
db.add_column('edumanage_instrealm', 'realm', self.gf('django.db.models.fields.CharField')(default='', max_length=160), keep_default=False)
def backwards(self, orm):
# Adding field 'InstRealm.priority'
db.add_column('edumanage_instrealm', 'priority', self.gf('django.db.models.fields.PositiveIntegerField')(default='', max_length=3), keep_default=False)
# Adding field 'InstRealm.realmexpr'
db.add_column('edumanage_instrealm', 'realmexpr', self.gf('django.db.models.fields.CharField')(default='', max_length=20), keep_default=False)
# Deleting field 'InstRealm.realm'
db.delete_column('edumanage_instrealm', 'realm')
models = {
'contenttypes.contenttype': {
'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'edumanage.contact': {
'Meta': {'object_name': 'Contact'},
'email': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_email'"}),
'firstname': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_firstname'"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lastname': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_lastname'"}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_phone'"})
},
'edumanage.institution': {
'Meta': {'object_name': 'Institution'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'realmid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Realm']"})
},
'edumanage.institutioncontactpool': {
'Meta': {'object_name': 'InstitutionContactPool'},
'contact': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Contact']", 'unique': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institution': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"})
},
'edumanage.institutiondetails': {
'Meta': {'object_name': 'InstitutionDetails'},
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '96'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.Contact']", 'symmetrical': 'False'}),
'ertype': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '1', 'db_column': "'type'"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institution': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Institution']", 'unique': 'True'}),
'number_id': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '6'}),
'number_user': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '6'}),
'oper_name': ('django.db.models.fields.CharField', [], {'max_length': '24'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.instrealm': {
'Meta': {'object_name': 'InstRealm'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'proxyto': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.InstServer']", 'symmetrical': 'False'}),
'realm': ('django.db.models.fields.CharField', [], {'max_length': '160'})
},
'edumanage.instrealmmon': {
'Meta': {'object_name': 'InstRealmMon'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'mon_type': ('django.db.models.fields.CharField', [], {'max_length': '8'}),
'realm': ('django.db.models.fields.CharField', [], {'max_length': '20'})
},
'edumanage.instserver': {
'Meta': {'object_name': 'InstServer'},
'acct_port': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'ertype': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '1', 'db_column': "'type'"}),
'host': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'port': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'proto': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
'retry': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '2'}),
'secret': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'status_server': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'timeout': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '2'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.monlocaleapoldata': {
'Meta': {'object_name': 'MonLocalEAPOLData'},
'cert': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'eap_method': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'exp_response': ('django.db.models.fields.CharField', [], {'max_length': '6'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrealmmonid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.InstRealmMon']"}),
'passwp': ('django.db.models.fields.CharField', [], {'max_length': '24', 'db_column': "'pass'"}),
'phase2': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'username': ('django.db.models.fields.CharField', [], {'max_length': '24'})
},
'edumanage.monproxybackclient': {
'Meta': {'object_name': 'MonProxybackClient'},
'host': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrealmmonid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.InstRealmMon']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'proto': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
'secret': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'status_server': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.name_i18n': {
'Meta': {'object_name': 'Name_i18n'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lang': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
},
'edumanage.realm': {
'Meta': {'object_name': 'Realm'},
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '24'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.Contact']", 'symmetrical': 'False'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'stype': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'max_length': '1'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.realmdata': {
'Meta': {'object_name': 'RealmData'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'number_IdP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_IdPSP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_SP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_id': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '9'}),
'number_inst': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_user': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '9'}),
'realmid': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Realm']", 'unique': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {})
},
'edumanage.serviceloc': {
'AP_no': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '3'}),
'IPv6': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'Meta': {'object_name': 'ServiceLoc'},
'NAT': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'SSID': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '96'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.Contact']", 'symmetrical': 'False'}),
'enc_level': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institutionid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'latitude': ('django.db.models.fields.DecimalField', [], {'max_digits': '8', 'decimal_places': '6'}),
'longitude': ('django.db.models.fields.DecimalField', [], {'max_digits': '8', 'decimal_places': '6'}),
'port_restrict': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'transp_proxy': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'wired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
},
'edumanage.url_i18n': {
'Meta': {'object_name': 'URL_i18n'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lang': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '180', 'db_column': "'URL'"}),
'urltype': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'type'"})
}
}
complete_apps = ['edumanage']
......@@ -93,19 +93,18 @@ class InstRealm(models.Model):
Realm (including wildcards) of an IdP Institution
'''
realmexpr = models.CharField(max_length=20)
priority = models.PositiveIntegerField(max_length=3)
realm = models.CharField(max_length=160)
instid = models.ForeignKey("Institution")
# accept if instid.ertype: 1 (idp) or 3 (idpsp)
proxyto = models.ManyToManyField("InstServer")
def __unicode__(self):
return _('Institution: %(inst)s, Realm: %(realmexpr)s, Priority: %(priority)s') % {
# but name is many-to-many from institution
'inst': self.instid.name,
'realmexpr': self.realmexpr,
'priority': self.priority,
}
return 'Realm: %s' % self.realm
def get_servers(self):
return ",".join(["%s"%x for x in self.proxyto.all()])
class InstServer(models.Model):
'''
......@@ -135,9 +134,9 @@ class InstServer(models.Model):
ts = models.DateTimeField(auto_now=True)
def __unicode__(self):
return _('Institution: %(inst)s, Server: %(servername)s, Type: %(ertype)s') % {
return _('Server: %(servername)s, Type: %(ertype)s') % {
# but name is many-to-many from institution
'inst': self.instid,
#'inst': self.instid,
'servername': self.name,
# the human-readable name would be nice here
'ertype': self.ertype,
......
......@@ -341,22 +341,100 @@ def add_server(request, server_pk):
return HttpResponseRedirect(reverse("servers"))
else:
form.fields['instid'] = forms.ModelChoiceField(queryset=Institution.objects.filter(pk=inst.pk), empty_label=None)
print form.errors
return render_to_response('edumanage/servers_edit.html', { 'institution': inst, 'form': form},
context_instance=RequestContext(request, base_response(request)))
@login_required
def realms(request):
user = request.user
servers = False
try:
profile = user.get_profile()
inst = profile.institution
except UserProfile.DoesNotExist:
inst = False
if inst:
realms = InstRealm.objects.filter(instid=inst)
return render_to_response('edumanage/realms.html', { 'realms': realms},
context_instance=RequestContext(request, base_response(request)))
@login_required
def add_realm(request, realm_pk):
user = request.user
server = False
try:
profile = user.get_profile()
inst = profile.institution
except UserProfile.DoesNotExist:
inst = False
if request.method == "GET":
# Determine add or edit
try:
realm = InstRealm.objects.get(instid=inst, pk=realm_pk)
form = InstRealmForm(instance=realm)
except InstRealm.DoesNotExist:
form = InstRealmForm()
form.fields['instid'] = forms.ModelChoiceField(queryset=Institution.objects.filter(pk=inst.pk), empty_label=None)
form.fields['proxyto'] = forms.ModelMultipleChoiceField(queryset=InstServer.objects.filter(pk__in=getInstServers(inst)))
return render_to_response('edumanage/realms_edit.html', { 'form': form},
context_instance=RequestContext(request, base_response(request)))
elif request.method == 'POST':
request_data = request.POST.copy()
try:
realm = InstRealm.objects.get(instid=inst, pk=realm_pk)
form = InstRealmForm(request_data, instance=realm)
except InstRealm.DoesNotExist:
form = InstRealmForm(request_data)
if form.is_valid():
instserverf = form.save()
return HttpResponseRedirect(reverse("realms"))
else:
form.fields['instid'] = forms.ModelChoiceField(queryset=Institution.objects.filter(pk=inst.pk), empty_label=None)
form.fields['proxyto'] = forms.ModelMultipleChoiceField(queryset=InstServer.objects.filter(pk__in=getInstServers(inst)))
return render_to_response('edumanage/realms_edit.html', { 'institution': inst, 'form': form},
context_instance=RequestContext(request, base_response(request)))
@login_required
def del_realm(request):
if request.method == 'GET':
user = request.user
req_data = request.GET.copy()
realm_pk = req_data['realm_pk']
profile = user.get_profile()
institution = profile.institution
resp = {}
try:
realm = InstRealm.objects.get(instid=institution, pk=realm_pk)
except InstRealm.DoesNotExist:
resp['error'] = "Could not get realm or you have no rights to delete"
return HttpResponse(json.dumps(resp), mimetype='application/json')
try:
realm.delete()
except:
resp['error'] = "Could not delete realm"
return HttpResponse(json.dumps(resp), mimetype='application/json')
resp['success'] = "Realm successfully deleted"
return HttpResponse(json.dumps(resp), mimetype='application/json')
@login_required
def base_response(request):
user = request.user
inst = []
server = []
services = []
instrealms = []
try:
profile = user.get_profile()
institution = profile.institution
inst.append(institution)
server = InstServer.objects.filter(instid=institution)
services = ServiceLoc.objects.filter(institutionid=institution)
instrealms = InstRealm.objects.filter(instid=institution)
except UserProfile.DoesNotExist:
pass
......@@ -364,6 +442,7 @@ def base_response(request):
'inst_num': len(inst),
'servers_num': len(server),
'services_num': len(services),
'realms_num': len(instrealms),
}
......@@ -461,5 +540,13 @@ def getInstContacts(inst):
contact_pks.append(contact.contact.pk)
return list(set(contact_pks))
def getInstServers(inst):
servers = InstServer.objects.filter(instid=inst)
server_pks = []
for server in servers:
server_pks.append(server.pk)
return list(set(server_pks))
def rad(x):
return x*math.pi/180
\ No newline at end of file
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li class="active">Realms</li>
{% endblock %}
{% load i18n %}
{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/js/datatables_bootstrap.js"></script>
<script type="text/javascript">
$(document).ready(function(){
{% if realms %}
var oTable = $('#table').dataTable({
"sPaginationType": "bootstrap",
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"aoColumns": [{
"bSearchable": true,
"bSortable": true
}, {
"bSearchable": true,
"bSortable": true
}, {
"bVisible": true,
"bSearchable": false,
"bSortable": false
}],
"aaSorting": [[0, 'desc']],
"iDisplayLength": 25,
"oSearch": {"bSmart": false, "bRegex":true},
"oLanguage": {
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "realms" %}',
"sProcessing": "Processing...",
"sZeroRecords": '{% trans "No records to display" %}',
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}",
"sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "",
"sSearch": '{% trans "Search:" %}',
"sUrl": "",
"oPaginate": {
"sFirst": '{% trans "First" %}',
"sPrevious": '{% trans "Previous" %}',
"sNext": '{% trans "Next" %}',
"sLast": '{% trans "Last" %}'
}
}
});
oTable.fnDraw();
$('[id^=del_realm_]').click(function(){
realm_id = (this.id).replace("del_realm_", '');
name = this.getAttribute("data-realmname");
$("#mymodalbody").html("You are about to delete realm: <b>"+name+"</b><br>Press Delete to proceed or Cancel to cancel deletion");
$("#myModalLabel").html("Delete Realm "+name);
$('#myModal').modal('show');
$(".modal-footer").show();
$("#realm_name_del").html(name)
return false;
});
$("#delrealmSubmit").click(function(){
$.ajax({
url:"{% url del-realm %}/?realm_pk="+realm_id,
type: "GET",
success: function(data){
if (data.error){
$(".modal-footer").hide();
$("#mymodalbody").html("<font style='color:#B94A48'>"+data.error+"</font>");
}
if (data.success){
$(".modal-footer").hide();
$("#mymodalbody").html("Realm "+name+" successfully deleted");
window.setTimeout('location.reload()', 1000);
}
}
});
});
{% endif %}
});
</script>
{% endblock %}
{% block navbar %}
{% endblock %}
{% block homeactive %}{% endblock %}
{% block realmsactive %}class="active"{% endblock %}
{% block subcontent %}
<h4>Realms</h4>
<hr>
<div><a href="{% url edit-realms %}" class="btn btn-primary">Add new realm</a></div>
<div class="span10"></div>
{% if realms %}
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
<thead>
<tr>
<th>Realm</th>
<th>Server(s)</th>
<th style="text-align: center;">Action</th>
</tr>
</thead>
<tbody>
{% for realm in realms %}
<tr class="GradeC">
<td>{{realm.realm}}</td>
<td>{{realm.get_servers}}</td>
<td style="text-align: center;"><a href="{% url edit-realms realm.pk %}" class="btn btn-small">edit</a> <a href="#" id="del_realm_{{realm.pk}}" data-realmname="{{realm.realm}}" class="btn btn-small btn-warning">delete</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div>No realms defined yet (<a href="{% url edit-realms %}">add</a>)</div>
{% endif %}
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Delete Realm</h3>
</div>
<div class="modal-body" id="mymodalbody">
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
<a class="btn btn-warning" id="delrealmSubmit" href="#">Delete</a>
</div>
</div>
{% endblock %}
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li><a href="{% url realms %}">Realms</a><span class="divider">/</span></li>
<li class="active">Add-Edit</li>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block realmsactive %}class="active"{% endblock %}
{% block subcontent %} <h4>Realms Add/Edit</h4>
<hr>
<form method="POST" class="form-horizontal">
{% csrf_token %}
{% if form.non_field_errors %}
<p class="error">
{{ form.non_field_errors}}
</p>
{% endif %}
<div style="display: none">
{{form.instid}}
</div>
<div class="control-group {% if form.realm.errors %} error {% endif %}">
<label class="control-label" for="id_realm"><b>Realm</b></label>
<div class="controls">
{{ form.realm }}
{% if form.realm.errors %} <span class="help-inline"> {{ form.realm.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.realm.help_text }}</span>
</div>
</div>
<div class="control-group {% if form.proxyto.errors %} error {% endif %}">
<label class="control-label" for="id_proxyto"><b>Proxy to Servers</b></label>
<div class="controls">
{{ form.proxyto }}
{% if form.proxyto.errors %} <span class="help-inline"> {{ form.proxyto.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.proxyto.help_text }}</span>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" id="applybutton" value="Apply" class="btn btn-large btn-primary"/>
Apply</button>
</div>
</div>
</form>
{% endblock %}
......@@ -192,6 +192,9 @@ $.get("{% url get-service-points %}", function(data){
<li {% block serversactive %}{% endblock %}>
<a href="{% url servers %}">Servers ({{servers_num}})</a>
</li>
<li {% block realmsactive %}{% endblock %}>
<a href="{% url realms %}">Realms ({{realms_num}})</a>
</li>
</ul>
</div><!--/.well -->
</div><!--/span-->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment