blob: 1bd0294e51681f36fa4b48cd38dcb3bf4a925188 (
plain)
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 "admin/base_site.html" %}
{% load i18n admin_modify adminmedia %}
{% block title %}Send project credentials{{ block.super }}{% endblock %}
{% block extrahead %}
{{ block.super }}
{{ media }}
<script type="text/javascript" src="/media/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/media/admin/js/jquery.init.js"></script>
<script type="text/javascript" src="/media/dashboard/js/django-admin.multiselect.js"></script>
<link rel="stylesheet" type="text/css" href="/media/dashboard/css/django-admin-widgets.css" />
<script type="text/javascript" charset="utf-8">
django.jQuery(function(){
django.jQuery.each(django.jQuery("#send_credentials select"), function () {
// "Locations" can be any label you want
SelectFilter.init(this.id, "Users", 0, "/media/admin/");
});
})
</script>
<style type="text/css" media="screen">
.errorlist, .successlist {background:#fcc;border:1px solid #c66;color:#600;list-style:none; padding: 10px 5px; margin: 25px 0 25px 0; float: left; width: 100%;}
.successlist {background: #CBFBD7; color: #1E5024; border-color: #6FBA5C;}
</style>
{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="/admin">Home</a> ›
<a href="{% url admin_projects %}">Projects</a> ›
<a href="{% url admin_project project.projectname %}">{{project.projectname}}</a> ›
Send Credentials
</div>
{% endblock %}
{% block content %}
<div id="content-main">
{% if not success %}
<h1>Send Credentials</h1>
<h3>Select which users you would like to send credentials to from the '{{ project.projectname }}' project.</h3>
{% else %}
<h1>Credentials sent successfully</h1>
{% endif %}
<div class="status">
{% if error %}
<span class="errorlist">{{ error }}</span>
{% endif %}
{% if success %}
<span class="successlist">{{ success }}</span>
{% endif %}
</div>
{% if not success %}
<form id="send_credentials" action="{% url admin_project_sendcredentials project.projectname %}" method="post">
{% csrf_token %}
<fieldset class="module aligned">
{% for field in form.visible_fields %}
<div class="form-row">
{{ field.errors }}
{{ field }}
{% if field.field.help_text %}<p class="help">{{ field.field.help_text|safe }}</p>{% endif %}
</div>
{% endfor %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
</fieldset>
<div class="submit-row">
<input style="margin-top:20px; margin-left:10px;" type="submit" value="Send Credentials" />
</div>
</form>
{% endif %}
</div>
{% endblock %}
|