Summary: Facelift change charter title page

- Legacy-Id: 8932
This commit is contained in:
Ole Laursen 2015-01-28 09:04:41 +00:00
parent b9206412ee
commit d7b4ef6ac4
2 changed files with 10 additions and 35 deletions
ietf
doc
templates/doc/charter

View file

@ -226,7 +226,7 @@ def change_state(request, name, option=None):
class ChangeTitleForm(forms.Form):
charter_title = forms.CharField(widget=forms.TextInput, label="Charter title", help_text="Enter new charter title", required=True)
message = forms.CharField(widget=forms.Textarea, help_text="Leave blank to change the title without notifying the Secretariat", required=False, label=mark_safe("Message to<br> Secretariat"))
message = forms.CharField(widget=forms.Textarea, help_text="Leave blank to change the title without notifying the Secretariat", required=False, label=mark_safe("Message to Secretariat"))
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the charter history", required=False)
def __init__(self, *args, **kwargs):
charter = kwargs.pop('charter')

View file

@ -1,44 +1,19 @@
{% extends "base.html" %}
{% extends "ietf.html" %}
{% load bootstrap3 %}
{% block title %}{{ title }}{% endblock %}
{% block morecss %}
form.change-title select {
width: 22em;
}
#id_charter_title, #id_message, #id_comment {
width: 40em;
}
form.change-title .actions {
text-align: right;
padding-top: 10px;
}
{% endblock %}
{% block content %}
<h1>{{ title }}</h1>
<form class="change-title" action="" method="post">{% csrf_token %}
<table>
{% for field in form.visible_fields %}
<tr>
<th>{{ field.label_tag }}</th>
<td>{{ field }}
{% if field.help_text %}<div class="help">{{ field.help_text }}</div>{% endif %}
<form class="change-title" method="post">{% csrf_token %}
{% bootstrap_form form %}
{{ field.errors }}
</td>
</tr>
{% endfor %}
<tr>
<td colspan="2" class="actions">
<a href="{% url "doc_view" name=doc.name %}">Back</a>
<input type="submit" value="Save and (possibly) notify Secretariat"/>
</td>
</tr>
</table>
{% buttons %}
<a class="btn btn-default pull-right" href="{% url "doc_view" name=doc.name %}">Back</a>
<button class="btn btn-primary" type="submit">Save and (possibly) notify Secretariat</button>
{% endbuttons %}
</form>
{% endblock %}