forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
executable file
·88 lines (72 loc) · 2.85 KB
/
main.html
File metadata and controls
executable file
·88 lines (72 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{% 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>
</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 %}