Summary: Facelift change charter title page
- Legacy-Id: 8932
This commit is contained in:
parent
b9206412ee
commit
d7b4ef6ac4
ietf
|
@ -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')
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue