-
Notifications
You must be signed in to change notification settings - Fork 27
/
talk_form.html
56 lines (56 loc) · 1.85 KB
/
talk_form.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
{% extends 'wafer/base_form.html' %}
{% load i18n %}
{% load crispy_forms_tags %}
{% load static %}
{% block content %}
<section class="wafer wafer-talk-edit">
{% block heading %}
{% if can_edit %}
<h1>{% trans "Edit Talk" %}</h1>
{% with corresponding_author_name=object.corresponding_author.userprofile.display_name %}
{% url 'wafer_user_profile' username=object.corresponding_author.username as corresponding_author_url %}
{% blocktrans trimmed %}
<p>Submitted by <a href="{{ corresponding_author_url }}">{{ corresponding_author_name }}</a>.</p>
{% endblocktrans %}
{% endwith %}
{% else %}
<h1>{% trans "Talk Submission" %}</h1>
{% endif %}
{% endblock heading %}
{% if not can_edit and not can_submit %}
{% block talks_closed %}
{% blocktrans trimmed %}
<em>Talk submission is closed</em>
{% endblocktrans %}
{% endblock talks_closed %}
{% else %}
{% block form_preamble %}
{% url 'wafer_user_edit_profile' form.user as edit_bio_url %}
{% if form.user.userprofile.bio %}
<div>
<label for="bio" class="col-form-label">
{% trans "Your Biography" %}
<a href="{{ edit_bio_url }}">{% trans "Edit" %}</a>
</label>
<div id="bio" class="card card-body">
{{ form.user.userprofile.bio|linebreaks }}
</div>
</div>
{% else %}
<div class="alert alert-primary">
{% blocktrans trimmed %}
Please
<a href="{{ edit_bio_url }}">add a speaker biography</a>
before submitting a talk.
{% endblocktrans %}
</div>
{% endif %}
{% endblock form_preamble %}
{% block talkform %}
<form method="post">
{% crispy form %}
</form>
{% endblock talkform %}
{% endif %}
</section>
{% endblock %}