datatracker/ietf/templates/liaisons/edit.html
Lars Eggert 5598762608
fix: add more HTML validation & fixes (#3891)
* Update vnu.jar

* Fix py2 -> py3 issue

* Run pyupgrade

* test: Add default-jdk to images

* test: Add option to also validate HTML with vnu.jar

Since it's already installed in bin. Don't do this by default, since it
increases the time needed for tests by ~50%.

* fix: Stop the urlizer from urlizing in linkified mailto: text

* More HTML fixes

* More HTML validation fixes

* And more HTML fixes

* Fix floating badge

* Ignore unicode errors

* Only URLize docs that are existing

* Final fixes

* Don't URLize everything during test-crawl

* Feed HTML into vnu using python rather than Java to speed things up

* Allow test-crawl to start vnu on a different port

* Increase retry count to vnu. Restore batch size to 30.

* More HTML validation fixes

* Use urllib3 to make requests to vnu, since overriding requests_mock is tricky

* Undo commit of unmodified file

* Also urlize ftp links

* Fix matching of file name

* More HTML fixes

* Add `is_valid_url` filter

* weekday -> data-weekday

* urlencode URLs

* Add and use vnu_fmt_message. Bump vnu max buffer.

* Simplify doc_exists

* Don't add tab link to mail archive if the URL is invalid

* Run urlize_ietf_docs before linkify

Reduces the possibility of generating incorrect HTML

* Undo superfluous change

* Runner fixes

* Consolidate vnu message filtering into vnu_filter_message

* Correctly handle multiple persons with same name

* Minimze diff

* Fix HTML nits

* Print source snippet in vnu_fmt_message

* Only escape if there is something to escape

* Fix snippet

* Skip crufty old IPR declarations

* Only include modal when needed. Add handles.

* Fix wordwrap+linkification

* Update ietf/doc/templatetags/ietf_filters.py

* Update ietf/doc/templatetags/tests_ietf_filters.py

* Don't right-align second column
2022-05-03 13:55:48 -05:00

81 lines
3 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load ietf_filters %}
{% load django_bootstrap5 widget_tweaks %}
{% block title %}
{% if liaison %}
Edit liaison: {{ liaison }}
{% else %}
Send Liaison Statement
{% endif %}
{% endblock %}
{% block pagehead %}
{{ form.media.css }}
<link rel="stylesheet" href="{% static 'ietf/css/liaisons.css' %}">
{% endblock %}
{% block content %}
{% origin %}
<h1 class="mb-3">
{% if liaison %}
Edit liaison<br><small class="text-muted">{{ liaison }}</small>
{% else %}
Send Liaison Statement
{% endif %}
</h1>
{% if form.errors %}
<div class="alert alert-danger my-3">
There were errors in the submitted form -- see below. Please correct these and resubmit.
</div>
{% endif %}
{% bootstrap_form_errors form %}
{% if not liaison %}
<p>
If you wish to submit your liaison statement by e-mail, then please send it to
<a href="mailto:statements@ietf.org">statements@ietf.org</a>
</p>
<p>
Fields marked with
<span class="required"><label></label></span>
are required. For detailed descriptions of the fields see the
<a href="{% url 'liaison-help-fields' %}">field help</a>.
</p>
{% endif %}
<form
class="liaisons-form form-horizontal show-required"
method="post"
enctype="multipart/form-data"
data-edit-form="{{ form.edit }}"
data-ajax-info-url="{% url "ietf.liaisons.views.ajax_get_liaison_info" %}">
{% csrf_token %}
{% for fieldset in form.fieldsets %}
<h2>{{ fieldset.name }}</h2>
{% for field in fieldset %}
{% if field.id_for_label != "id_attachments" %}
{% bootstrap_field field layout="horizontal" %}
{% else %}
<div class="row mb-3">
<p class="col-md-2 fw-bold col-form-label">{{ field.label }}</p>
<div class="col-md-10">{{ field }}</div>
</div>
{% endif %}
{% endfor %}
{% endfor %}
<a class="btn btn-danger float-end"
href="{% if liaison %}{% url 'ietf.liaisons.views.liaison_detail' object_id=liaison.pk %}{% else %}{% url 'ietf.liaisons.views.liaison_list' %}{% endif %}">
Cancel
</a>
{% if not liaison %}
<button name="send" type="submit" class="btn btn-primary">Send and post</button>
<button name="post_only" type="submit" class="btn btn-primary">Post only</button>
{% else %}
<button name="save" type="submit" class="btn btn-primary">Save</button>
{% endif %}
</form>
{% endblock %}
{% block js %}
{{ form.media.js }}
<script src="{% static 'ietf/js/liaisons.js' %}"></script>
{% endblock %}