-
Notifications
You must be signed in to change notification settings - Fork 356
Expand file tree
/
Copy pathedit_affiliations.html
More file actions
55 lines (55 loc) · 2.16 KB
/
edit_affiliations.html
File metadata and controls
55 lines (55 loc) · 2.16 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
{% extends "base.html" %}
{% load static %}
{% load render_bundle from webpack_loader %}
{% block title %}
<title>Institution Affiliations</title>
{% endblock title %}
{% block content %}
<div class="container-fluid">
<div class="row">
{% if messages %}
<ul>
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div class="row">
<div class="col-md-12 text-center">
<h2>{{ institution.name }}</h2>
</div>
</div>
<div class="row">
<div class="col-md-12">
<form id="add-affiliation-form" action="{% url 'institutions:affiliations' institution.id %}" method="post">
{% csrf_token %}
<label>Add user by guid: </label>
<input type="text" name="add-affiliation-form">
<input type="submit" name="user" value="Add User" class="form-button btn btn-success">
</form>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<form id="remove-affiliation-form" action="{% url 'institutions:remove_affiliations' institution.id %}" method="post">
{% csrf_token %}
<table class="table table-striped">
<th></th>
<th>Name</th>
<th>Username</th>
{% for user in affiliations %}
<tr>
<td><input type='checkbox' name="User-{{user.id}}"></td>
<td>{{ user.fullname }}</td>
<td>{{ user.username }}</td>
</tr>
{% endfor %}
</table>
<input class="form-button btn btn-danger" type="submit" value="Remove affiliation" />
</form>
</div>
</div>
</div>
{% endblock content %}