Commit ea1a3dc4 by Dudás Ádám

Merge branch 'issue-448' into 'master'

Request fixes

Closes #448

See merge request !370
parents 28154397 70c63620
......@@ -73,8 +73,11 @@ class InitialFromFileMixin(object):
)
def clean_message(self):
def comp(x):
return "".join(x.strip().splitlines())
message = self.cleaned_data['message']
if message.strip() == self.initial['message'].strip():
if comp(message) == comp(self.initial['message']):
raise ValidationError(_("Fill in the message."), code="invalid")
return message.strip()
......
......@@ -38,6 +38,7 @@ class RequestTable(Table):
template_name="request/columns/user.html",
verbose_name=_("User"),
)
created = Column(verbose_name=_("Date"))
type = TemplateColumn(
template_name="request/columns/type.html",
verbose_name=_("Type"),
......@@ -48,7 +49,7 @@ class RequestTable(Table):
template = "django_tables2/with_pagination.html"
attrs = {'class': ('table table-bordered table-striped table-hover'),
'id': "request-list-table"}
fields = ("pk", "status", "type", "user", )
fields = ("pk", "status", "type", "created", "user", )
order_by = ("-pk", )
empty_text = _("No more requests.")
per_page = 10
......
......@@ -38,6 +38,9 @@
<pre>{{ object.message }}</pre>
</p>
<hr />
<div class="pull-right">
<strong>{% trans "Submitted" %}:</strong> {{ object.created }}
</div>
{% if object.type == "lease" %}
<dl>
<dt>{% trans "VM name" %}</dt>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment