90 lines
2.9 KiB
HTML
Executable file
90 lines
2.9 KiB
HTML
Executable file
{% extends "base_site.html" %}
|
|
{% load staticfiles %}
|
|
|
|
{% block title %}Roles{% endblock %}
|
|
|
|
{% block extrahead %}{{ block.super }}
|
|
<link rel="stylesheet" type="text/css" href="{% static 'secr/css/jquery-ui-1.11.4.custom.css' %}" />
|
|
<script type="text/javascript" src="{% static 'secr/js/jquery-ui-1.11.4.custom.min.js' %}"></script>
|
|
<script type="text/javascript" src="{% static 'secr/js/utils.js' %}"></script>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$.ajaxSetup ({
|
|
cache: false
|
|
});
|
|
|
|
$('#id_group').change(function(){
|
|
var loadUrl = "/secr/roles/ajax/get-roles/" + $(this).val() + "/";
|
|
var ajax_load = '<img class="loading" src="{% static "secr/img/ajax-loader.gif" %}" alt="loading..." />';
|
|
var text = $(this).val();
|
|
$("#id_group_acronym").val(text);
|
|
$("#roles-list").html(ajax_load).load(loadUrl);
|
|
});
|
|
|
|
var sel = $('#id_group').val();
|
|
if (sel != '') { $('#id_group').change(); }
|
|
|
|
});
|
|
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block breadcrumbs %}{{ block.super }}
|
|
» Roles
|
|
{% endblock %}
|
|
{% block instructions %}
|
|
<a href="" target="_blank">Instructions</a>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="module interim-container">
|
|
<h2>Role Tool</h2>
|
|
<div class="inline-related">
|
|
<h3><b>Select Group</b></h3>
|
|
<p>Select a Group to change roles.</p>
|
|
<form id="roles-form".>
|
|
{{ group_form.as_p }}
|
|
</form>
|
|
<p><a href="{% url 'ietf.secr.groups.views.add' %}">Add a new group...</a></p>
|
|
</div> <!-- inline-related -->
|
|
<br>
|
|
|
|
<div class="inline-related">
|
|
<h2></h2>
|
|
<h3><b>Role Details</b></h3>
|
|
<div id="roles-list"></div>
|
|
<p></p>
|
|
</div> <!-- inline-related -->
|
|
|
|
<div class="inline-related">
|
|
<h2></h2>
|
|
<h3>Add Role</h3>
|
|
{% with role_form as form %}
|
|
<form id="roles-form" action="" method="post">{% csrf_token %}
|
|
{{ role_form.non_field_errors }}
|
|
<table class="full-width">
|
|
<tr>
|
|
{{ form.group_acronym.errors }}{{ form.group_acronym }}
|
|
<td>{{ form.name.errors }}{{ form.name }}</td>
|
|
<td>{{ form.person.errors }}{{ form.person }}{% if form.person.help_text %}<br>{{ form.person.help_text }}{% endif %}</td>
|
|
<td>{{ form.email.errors }}{{ form.email }}{% if form.email.help_text %}<br>{{ form.email.help_text }}{% endif %}</td>
|
|
<td><input type="submit" name="submit" value="Add" /></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
{% endwith %}
|
|
</div> <!-- inline-related -->
|
|
|
|
<div class="button-group">
|
|
<ul>
|
|
<li><button onclick="window.location='../'">Back</button></li>
|
|
</ul>
|
|
</div> <!-- button-group -->
|
|
|
|
</div> <!-- module -->
|
|
|
|
{% endblock %}
|
|
|