summaryrefslogtreecommitdiff
path: root/templates/apps/name/addace.html
blob: 17d83623787719688a737dc5e69c3a4301b1e817 (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
{% extends "edit_fieldsets.html" %}
{% load permdisplay %}
{% block widgets %}
   	$('#wizard').formwizard({
    	validationEnabled: true,
    	focusFirstInput: true,
    	textSubmit: "Finish",
    	validationOptions: {
    		rules: {
    			subject_label: 'required'
    		}
    	}
    });
    $('#id_subject').autocomplete({
    		source: "/name/search.json",
    		focus: function(event, ui) {
                $('#id_subject').val(ui.item.label);
                return false;
            },
            select: function(event, ui) {
                $('#id_subject').val(ui.item.label);
                $('#id_dst').val(ui.item.value);
                return false;
            },
			minLength: 2,
			open: function() {
				$( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
			},
			close: function() {
				$( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
			}
    });
{% endblock %}
{% block beforeform %}
<h1>Permissions on {{name.short}}</h1>
<div id="acl" style="margin-bottom: 20px;">
{% for ace in acl %}
<div id="{{acc.id}}">
   <h3 class="listheader">Permissions for {{ace.dst|acldstdisplay}}</h3>
   <div>
      <div>{{ace.dst|acldstdisplay}} {{ace.data|permdisplay}}.</div>
      <div class="rlist button">
         <ul>
            <li><a href="/namelink/{{ace.id}}/remove">Remove</a></li>
         </ul>
      </div>
   </div>
</div>
{% endfor %}
</div>
{% endblock %}