/
case_update.html
86 lines (74 loc) · 2.83 KB
/
case_update.html
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
{% extends 'projectroles/base.html' %}
{% load rules %}
{% load crispy_forms_filters %}
{% load projectroles_tags %}
{% load projectroles_common_tags %}
{% load dict %}
{% block title %}
Update Case {{ case.name }}
{% endblock title %}
{% block head_extend %}
{{ form.media }}
{% endblock head_extend %}
{% block navi_sub_project_extend %}
<li class="breadcrumb-item"><a href="{% url "variants:case-list" project=project.sodar_uuid %}">Cases</a></li>
<li class="breadcrumb-item"><a href="{% url "variants:case-detail" project=project.sodar_uuid case=object.sodar_uuid %}">{{ object.name }}</a></li>
<li class="breadcrumb-item active">Update</li>
{% endblock %}
{% block projectroles %}
{% get_app_setting 'userprofile' 'enable_project_uuid_copy' user=request.user as enable_uuid_copy %}
<div class="row sodar-subtitle-container">
<h3>Update Case {{ object.name }}</h3>
<a role="submit" class="btn btn-link mr-2 sodar-pr-btn-title sodar-pr-btn-copy-uuid sodar-copy-btn"
id="sodar-pr-btn-copy-uuid"
data-clipboard-text="{{ object.sodar_uuid }}"
title="Copy UUID to clipboard" data-toggle="tooltip" data-placement="top">
<i class="fa fa-clipboard text-muted" aria-hidden="true"></i>
</a>
</div>
<div class="container-fluid sodar-page-container">
<form method="post">
{% csrf_token %}
{{ form.name|as_crispy_field }}
{{ form.index|as_crispy_field }}
<table class="table table-striped table-hover sodar-card-table compact-form-groups mb-3">
<thead>
<tr>
<th class="text-muted" style="width: 10px">#</th>
<th style="width: 200px;">Name</th>
<th style="width: 200px;">Father</th>
<th style="width: 200px;">Mother</th>
<th style="width: 100px;">Sex</th>
<th>Affected</th>
</tr>
</thead>
<tbody>
{% for item in form.instance.pedigree %}
<tr>
<td class="text-right text-muted">{{ forloop.counter }}</td>
{% for key in form.col_names %}
<td>
{% with field_name=form.ped_field_names|keyvalue:forloop.parentloop.counter0|keyvalue:key %}
{{ form|keyvalue:field_name }}
{% endwith %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<div class="row">
<div class="btn-group ml-auto" role="group">
<a role="button" class="btn btn-secondary"
href="{{ request.session.real_referer }}">
<i class="fa fa-arrow-circle-left"></i> Cancel
</a>
<button type="submit" class="btn btn-primary">
<i class="fa fa-check"></i>
Update
</button>
</div>
</div>
</form>
</div>
{% endblock projectroles %}