Submit application skel, some direct templates and a very basic form. Fixes #575
- Legacy-Id: 2766
This commit is contained in:
parent
443f417ea9
commit
8c5ffce3eb
0
ietf/submit/__init__.py
Normal file
0
ietf/submit/__init__.py
Normal file
49
ietf/submit/forms.py
Normal file
49
ietf/submit/forms.py
Normal file
|
@ -0,0 +1,49 @@
|
|||
import datetime
|
||||
from email.utils import parseaddr
|
||||
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.db.models import Q
|
||||
from django.forms.util import ErrorList
|
||||
from django.forms.fields import email_re
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
from ietf.liaisons.accounts import (can_add_outgoing_liaison, can_add_incoming_liaison,
|
||||
get_person_for_user, is_ietf_liaison_manager)
|
||||
from ietf.liaisons.models import LiaisonDetail, Uploads, OutgoingLiaisonApproval, SDOs
|
||||
from ietf.liaisons.utils import IETFHM
|
||||
from ietf.liaisons.widgets import (FromWidget, ReadOnlyWidget, ButtonWidget,
|
||||
ShowAttachmentsWidget, RelatedLiaisonWidget)
|
||||
|
||||
|
||||
class UploadForm(forms.Form):
|
||||
|
||||
txt = forms.FileField(label=u'.txt format', required=True)
|
||||
xml = forms.FileField(label=u'.xml format', required=False)
|
||||
pdf = forms.FileField(label=u'.pdf format', required=False)
|
||||
ps = forms.FileField(label=u'.ps format', required=False)
|
||||
|
||||
fieldsets = [('Upload a draft', ('txt', 'xml', 'pdf', 'ps'))]
|
||||
|
||||
class Media:
|
||||
css = {'all': ("/css/liaisons.css", )}
|
||||
|
||||
def __unicode__(self):
|
||||
return self.as_div()
|
||||
|
||||
def as_div(self):
|
||||
return render_to_string('submit/submitform.html', {'form': self})
|
||||
|
||||
def get_fieldsets(self):
|
||||
if not self.fieldsets:
|
||||
yield dict(name=None, fields=self)
|
||||
else:
|
||||
for fieldset, fields in self.fieldsets:
|
||||
fieldset_dict = dict(name=fieldset, fields=[])
|
||||
for field_name in fields:
|
||||
if field_name in self.fields.keyOrder:
|
||||
fieldset_dict['fields'].append(self[field_name])
|
||||
if not fieldset_dict['fields']:
|
||||
# if there is no fields in this fieldset, we continue to next fieldset
|
||||
continue
|
||||
yield fieldset_dict
|
22
ietf/submit/urls.py
Normal file
22
ietf/submit/urls.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
from django.conf.urls.defaults import patterns, url
|
||||
from django.db.models import Q
|
||||
from ietf.liaisons.models import LiaisonDetail
|
||||
|
||||
|
||||
urlpatterns = patterns('ietf.submit.views',
|
||||
url(r'^$', 'submit_index', name='submit_index'),
|
||||
url(r'^status/$', 'submit_status', name='submit_status'),
|
||||
)
|
||||
|
||||
urlpatterns += patterns('django.views.generic.simple',
|
||||
url(r'^note-well/$', 'direct_to_template',
|
||||
{'template': 'submit/note_well.html',
|
||||
'extra_context': {'selected': 'notewell'}
|
||||
},
|
||||
name='submit_note_well'),
|
||||
url(r'^tool-instructions/$', 'direct_to_template',
|
||||
{'template': 'submit/tool_instructions.html',
|
||||
'extra_context': {'selected': 'instructions'}
|
||||
},
|
||||
name='submit_tool_instructions'),
|
||||
)
|
30
ietf/submit/views.py
Normal file
30
ietf/submit/views.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Copyright The IETF Trust 2007, All Rights Reserved
|
||||
import datetime
|
||||
from email.utils import parseaddr
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.db.models import Q
|
||||
from django.forms.fields import email_re
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.shortcuts import render_to_response, get_object_or_404
|
||||
from django.template import RequestContext
|
||||
from django.utils import simplejson
|
||||
from django.views.generic.list_detail import object_list, object_detail
|
||||
|
||||
from ietf.submit.forms import UploadForm
|
||||
|
||||
|
||||
def submit_index(request):
|
||||
if request.method == 'POST':
|
||||
form = UploadForm(data=request.POST, files=request.FILES)
|
||||
else:
|
||||
form = UploadForm()
|
||||
return render_to_response('submit/submit_index.html',
|
||||
{'selected': 'index',
|
||||
'form': form},
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
|
||||
def submit_status(request):
|
||||
pass
|
|
@ -64,7 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<li class="sect">Drafts & RFCs</li>
|
||||
<li><a href="/doc/">Search</a></li>
|
||||
<li><form action="/doc/search/" method="post" style="padding-bottom:0;margin-bottom:0;"><input type="text" style="margin-left:10px; width:100px; border:1px solid #89d;" name="name" /><input type="hidden" name="activeDrafts" value="on"/><input type="hidden" name="rfcs" value="on"/></form></li>
|
||||
<li><a href="https://datatracker.ietf.org/idst/upload.cgi">Submit a draft</a></li>
|
||||
<li><a href="{% url submit_index %}">Submit a draft</a></li>
|
||||
|
||||
|
||||
<li class="sect">Meetings</li>
|
||||
|
|
27
ietf/templates/submit/note_well.html
Normal file
27
ietf/templates/submit/note_well.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
{% extends "submit/submit_base.html" %}
|
||||
{% block title %}Note Well{% endblock %}
|
||||
|
||||
{% block submit_content %}
|
||||
<h2>Note Well</h2>
|
||||
<p>Any submission to the IETF intended by the Contributor for publication as all or part of an IETF Internet-Draft or RFC and any statement made within the context of an IETF activity is considered an "IETF Contribution". Such statements include oral statements in IETF sessions, as well as written and electronic communications made at any time or place, which are addressed to:</p>
|
||||
|
||||
<ul>
|
||||
<li>The IETF plenary session</li>
|
||||
<li> The IESG, or any member thereof on behalf of the IESG</li>
|
||||
<li> Any IETF mailing list, including the IETF list itself, any working group
|
||||
or design team list, or any other list functioning under IETF auspices </li>
|
||||
<li> Any IETF working group or portion thereof</li>
|
||||
<li>The IAB or any member thereof on behalf of the IAB</li>
|
||||
<li> The RFC Editor or the Internet-Drafts function</li>
|
||||
</ul>
|
||||
|
||||
<p>All IETF Contributions are subject to the rules of <a href="http://www.ietf.org/rfc/rfc5378.txt">RFC 5378</a> and <a href="http://www.ietf.org/rfc/rfc3979.txt">RFC 3979</a> (updated by <a href="http://www.ietf.org/rfc/rfc4879.txt">RFC 4879</a>). </p>
|
||||
|
||||
<p>Statements made outside of an IETF session, mailing list or other function, that are clearly not intended to be input to an IETF activity, group or function, are not IETF Contributions in the context of this notice.</p>
|
||||
|
||||
<p>Please consult <a href="http://www.ietf.org/rfc/rfc5378.txt">RFC 5378</a> and <a href="http://www.ietf.org/rfc/rfc3979.txt">RFC 3979</a> for details.</p>
|
||||
|
||||
<p>A participant in any IETF activity is deemed to accept all IETF rules of process, as documented in Best Current Practices RFCs and IESG Statements.</p>
|
||||
|
||||
<p>A participant in any IETF activity acknowledges that written, audio and video records of meetings may be made and may be available to the public. </p>
|
||||
{% endblock %}
|
26
ietf/templates/submit/submit_base.html
Normal file
26
ietf/templates/submit/submit_base.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block morecss %}
|
||||
.ietf-navset {
|
||||
background:#214197 url(/images/yui/sprite.png) repeat-x left -1400px;
|
||||
color:white;
|
||||
border:1px solid black;
|
||||
padding:4px;
|
||||
}
|
||||
.ietf-navset .selected { font-weight:bold; padding: 0 3px; }
|
||||
.ietf-navset a, .ietf-navset a:visited { color: white; padding:0 3px; }
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>IETF Internet-Draft Submission </h1>
|
||||
|
||||
<div class="ietf-navset">
|
||||
{% ifequal selected "index" %}<span class="selected">Upload</span>{% else %}<a href="{% url submit_index %}">Upload</a>{% endifequal %} |
|
||||
{% ifequal selected "status" %}<span class="selected">Status</span>{% else %}<a href="{% url submit_status %}">Status</a>{% endifequal %} |
|
||||
{% ifequal selected "instructions" %}<span class="selected">Tool Instructions</span>{% else %}<a href="{% url submit_tool_instructions %}">Tool Instructions</a>{% endifequal %} |
|
||||
{% ifequal selected "notewell" %}<span class="selected">NOTE WELL</span>{% else %}<a href="{% url submit_note_well %}">NOTE WELL</a>{% endifequal %}
|
||||
</div>
|
||||
|
||||
{% block submit_content %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
20
ietf/templates/submit/submit_index.html
Normal file
20
ietf/templates/submit/submit_index.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends "submit/submit_base.html" %}
|
||||
{% block title %}Upload{% endblock %}
|
||||
|
||||
{% block pagehead %}
|
||||
{{ form.media }}
|
||||
{% endblock %}
|
||||
|
||||
{% block submit_content %}
|
||||
<p>This page is used to submit IETF Internet-Drafts to the Internet-Draft repository. The list of current Internet-Drafts can be accessed at <a href="http://www.ietf.org/ietf/1id-abstracts.txt">http://www.ietf.org/ietf/1id-abstracts.txt</a></p>
|
||||
<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.</p>
|
||||
<p>Internet-Drafts are draft documents, and are valid for a maximum of six months. They may be updated, replaced, or obsoleted by other documents at any time.</p>
|
||||
<p>If you run into problems when submitting an Internet-Draft using this and the following pages, you may alternatively submit your draft by email to <a href="mailto:internet-drafts@ietf.org">internet-drafts@ietf.org</a>. However, be advised that manual processing always takes additional time.</p>
|
||||
|
||||
{{ form }}
|
||||
|
||||
<p>
|
||||
The IETF is an organized activity of the <a href="http://www.isoc.org">Internet Society</a>
|
||||
<br>Please send problem reports to <a href="mailto:ietf-action@ietf.org">ietf-action@ietf.org</a>.
|
||||
</p>
|
||||
{% endblock %}
|
50
ietf/templates/submit/submitform.html
Normal file
50
ietf/templates/submit/submitform.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
{% load i18n %}
|
||||
|
||||
<form class="submitform liaisonform" method="post" action="" enctype="multipart/form-data">
|
||||
|
||||
<div class="formconfig" style="display: none;">
|
||||
{% block formconfig %}
|
||||
<span class="info_update_url">{% url get_info %}</span>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="baseform{% if form.edit %} baseformedit{% endif %}">
|
||||
{% if form.errors %}
|
||||
<div class="formErrors">
|
||||
Please correct the errors below.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for fieldset in form.get_fieldsets %}
|
||||
{% if fieldset.name %}
|
||||
<div class="fieldset">
|
||||
<h2>{{ fieldset.name }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% for field in fieldset.fields %}
|
||||
<div id="baseform-fieldname-{{ field.html_name }}"
|
||||
class="{% if field.errors %}fieldError {% endif %}field BaseFormStringWidget{% if field.field.column_style %} {{ field.field.column_style }}{% endif %}">
|
||||
<label for="id_{{ field.html_name }}">{{ field.label }}
|
||||
{% if field.field.required %}
|
||||
<span class="fieldRequired" title="Required">*</span>
|
||||
{% endif %}
|
||||
</label>
|
||||
<div class="fieldWidget">
|
||||
<div id="{{ field.html_name }}_help" class="formHelp"> {{ field.help_text }}</div>
|
||||
{{ field }}
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
<div class="endfield"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if fieldset.name %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="submitrow">
|
||||
<input type="submit" value="Upload" name="upload" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
118
ietf/templates/submit/tool_instructions.html
Normal file
118
ietf/templates/submit/tool_instructions.html
Normal file
|
@ -0,0 +1,118 @@
|
|||
{% extends "submit/submit_base.html" %}
|
||||
{% block title %}Note Well{% endblock %}
|
||||
|
||||
{% block submit_content %}
|
||||
<h2>I-D Submission Tool Instructions</h2>
|
||||
<h3>Tool URL: <a href="{% url submit_index %}">http://datatracker.ietf.org/{% url submit_index %}</a></h3>
|
||||
This page will explain the purpose and content of each screen in the I-D Submission Tool, and the actions that result by clicking the form buttons on each screen.<br>
|
||||
|
||||
The specification for this tool can be found in <a href="http://www.ietf.org/rfc/rfc4228.txt?number=4228">RFC 4228</a>.
|
||||
<OL>
|
||||
<li>
|
||||
<b>Upload Screen</b>
|
||||
<p>
|
||||
The Upload screen is the first screen that a user will see when he or she starts the I-D submission process. A user can submit four different formats of an I-D, plain text, XML, PDF, and postscript, at the same time. Failure to submit a plain-text version will cause an error, and an error screen will be displayed.
|
||||
</p>
|
||||
<p>
|
||||
<u>Form buttons and resulting actions</u>:
|
||||
<table border="0">
|
||||
<tr valign="top">
|
||||
<td width="80"><i>.txt format: </i></td><td>Button to select a plain-text file of an I-D from a user's local file system. A plain-text version is mandatory and leaving the field blank will cause an error.</td>
|
||||
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><i>.xml format: </i></td><td>Button to select an XML file of an I-D from a user's local file system. </td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><i>.pdf format: </i></td><td>Button to select a PDF file of an I-D from a user's local file system. </td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><i>.ps format: </i></td><td>Button to select a postscript file of an I-D from a user's local file system. </td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
|
||||
<td><i>Upload:</i></td><td>Button to upload the document(s). The tool will begin parsing the plain-text document and validate the document. The parsed meta-data will be displayed for user confirmation along with the validation results.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<b>Validation Screen</b>
|
||||
<p>
|
||||
After a user uploads a plain-text version, or multiple versions of an I-D, the tool will parse the plain-text version, validate the I-D, and display the validation results with option(s) for next steps. The validation includes: checking for all IPR-related notices and I-D boilerplate described in <a href="http://www.ietf.org/ietf/1id-guidelines.html">Guidelines to Authors of Internet-Drafts</a>; the required sections described in <a href="http://www.ietf.org/ID-Checklist.html">the I-D Check List</a>; the version number; and the creation date.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
If the submission does not have any validation errors, then the user will be allowed to proceed with the automated posting process. This process will begin with submitter authentication, which will be done by e-mail.
|
||||
</p>
|
||||
<p>
|
||||
A user must carefully examine the meta-data that are displayed on this screen, and make sure that these data were extracted correctly. If the data were not extracted correctly, then the user can correct the errors via the Adjust page. In such a case, the user will pass the draft to the Secretariat for manual posting.
|
||||
</p>
|
||||
<u>Form buttons and resulting actions:</u><br>
|
||||
<table border="0">
|
||||
<tr valign="top">
|
||||
<td width="120"><i>Adjust Meta-Data: </i></td><td>Button to proceed to a screen with editable form fields for correcting the meta-data. A user can use this button to request manual posting by the Secretariat.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><i>Cancel: </i></td><td>Button to cancel the current submission. A user will be prompted for a confirmation before the submission is canceled. Once confirmed, the current submission will be canceled, the uploaded document(s) will be deleted permanently from the server, and a notification message will be sent to all authors with the IP address of the user who just canceled the submission.</td>
|
||||
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2"><br></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2">When no meta-data error is detected:<br><br></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><i>Button(s) with Author's name(s): </i></td><td>Button(s) to automatically fill out the given name, family name, and email address of the authors. If the submitter is one of the authors, then the submitter's information will be automatically inserted in the appropriate fields. If the submitter is not one of the authors, then the submitter will need to manually fill out these fields.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><i>Post Now: </i></td><td>Button to start the automated posting process with submitter authentication. Once clicked, an email message will be sent to the submitter whose email address was provided within the form. The submitter will need to open the email message via his or her email application, and click the link provided in the message body.
|
||||
<br><br>
|
||||
|
||||
Once a link in the email body is clicked, the document gets pushed to the IETF Web and FTP sites, a notification is sent to the authors of the document, and an I-D Action announcement will be sent out within the next 15 minutes.
|
||||
<br><br>
|
||||
If the document requires an additional approval from a chair of a working group, i.e., for submission of a 00 version of a working group document, then a message will be sent to the chairs of the working group for the approval. Once approved, the document will be immediately announced and available via the IETF Web and FTP sites.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<b>Adjust Screen</b>
|
||||
<p>
|
||||
This is the screen where a user can adjust any meta-data that could have been incorrectly parsed from the submitted document. The document with adjusted meta-data will be submitted to the Secretariat for manual posting.
|
||||
</p>
|
||||
<u>Form buttons and resulting actions:</u><br>
|
||||
<table border="0">
|
||||
<tr valign="top">
|
||||
|
||||
<td><i>Button(s) with Author's name(s): </i></td><td>Button(s) to automatically fill out the given name, family name, and email address of the authors. If the submitter is one of the authors, then the submitter's information will be automatically inserted in the appropriate fields. If the submitter is not one of the authors, then the submitter will need to manually fill out these fields.</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="200"><i>Submit for manual posting: </i></td><td>Button to send a manual posting request to the Secretariat including any corrected meta-data and comments for the Secretariat. Once clicked, a notification message will be sent to the Secretariat, and a receipt page will be displayed.
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><i>Cancel: </i></td><td>Button to cancel the current submission. A user will be prompted for a confirmation before the submission is canceled. Once confirmed, the current submission will be canceled, the uploaded document(s) will be deleted permanently from the server, and a notification message will be sent to all authors with the IP address of the user who just canceled the submission.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<b>Status Screen</b>
|
||||
<p>
|
||||
The Status screen is the screen where a user can view the current status of a document that has just been submitted by the user, or a document that was submitted previously via the tool. If a link 'Status' is clicked from the tool's first page, then a form field will be provided for a user to look up a document by filename.
|
||||
</p>
|
||||
<u>Form buttons and resulting actions:</u><br>
|
||||
<table border="0">
|
||||
<tr valign="top">
|
||||
<td><i>Cancel: </i></td><td>Button to cancel the current submission. This button will be displayed only when the document is in the process of being submitted. A user will be prompted for a confirmation before the submission is canceled. Once confirmed, the current submission will be canceled, the uploaded document(s) will be deleted permanently from the server, and a notification message will be sent to all authors with the IP address of the user who just canceled the submission.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<b>Problem Report</b>
|
||||
|
||||
<p>
|
||||
Please send problem reports to <a href="mailto:ietf-action@ietf.org">ietf-action@ietf.org</a>.
|
||||
</p>
|
||||
</li>
|
||||
</OL>
|
||||
{% endblock %}
|
|
@ -55,6 +55,7 @@ urlpatterns = patterns('',
|
|||
(r'^accounts/', include('ietf.ietfauth.urls')),
|
||||
(r'^doc/', include('ietf.idrfc.urls')),
|
||||
(r'^wg/', include('ietf.wginfo.urls')),
|
||||
(r'^submit/', include('ietf.submit.urls')),
|
||||
|
||||
(r'^$', 'ietf.idrfc.views.main'),
|
||||
('^admin/', include(admin.site.urls)),
|
||||
|
|
Loading…
Reference in a new issue