From 160286650489fcc731d09dea9212840f2a4dec33 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Wed, 14 Feb 2018 13:52:03 +0000 Subject: [PATCH] Fix error reporting form and add twig template for error report confirmation. --- templates/error.twig | 10 +++++----- templates/errorreport.twig | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 templates/errorreport.twig diff --git a/templates/error.twig b/templates/error.twig index 5f89fa07e..0f4255880 100644 --- a/templates/error.twig +++ b/templates/error.twig @@ -39,16 +39,16 @@ <h2>{{ '{errors:report_header}' | trans }}</h2> <form action="{{ errorReportAddress }}" class="pure-form" method="post"> <p>{{ '{errors:report_text}' | trans }}</p> - <p>{{ '{errors:report_email}' | trans }} - <input type="email" name="email" class="edge" value="{{ email }}" /> + <label for="email">{{ '{errors:report_email}' | trans }}</label> + <input type="email" name="email" id="email" class="edge" value="{{ email }}" /> </p> - <textarea class="text-area edge" name="text" rows="6" cols="50">{{ '{errors:report_explain}' | trans }}</textarea> - </form> + <textarea class="text-area edge" name="text" rows="6" cols="50" placeholder="{{ '{errors:report_explain}' | trans }}" required></textarea> <p class="center"> <input type="hidden" name="reportId" value="{{ error.reportId }}" /> - <button type="submit" name="send" class="pure-button pure-button-red">{{ '{errors:report_submit}' | trans }}</button> + <input type="submit" name="send" class="pure-button pure-button-red" value="{{ '{errors:report_submit}' | trans }}" /> </p> + </form> {%- endif %} <h2>{{ '{errors:howto_header}' | trans }}</h2> diff --git a/templates/errorreport.twig b/templates/errorreport.twig new file mode 100644 index 000000000..d491aaa8c --- /dev/null +++ b/templates/errorreport.twig @@ -0,0 +1,8 @@ +{% set pagetitle = 'Error report sent'|trans %} +{% extends "base.twig" %} + +{% block content %} + <h2>{{ pagetitle }}</h2> + + <p>{{ 'The error report has been sent to the administrators.' |trans }}</p> +{% endblock %} -- GitLab