Skip to content
Snippets Groups Projects
Commit 43c1caf3 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Email should not be mandatory according to the form text

parent 02fc6f3c
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<form action="{{ errorReportAddress }}" class="pure-form" method="post"> <form action="{{ errorReportAddress }}" class="pure-form" method="post">
<p>{{ '{errors:report_text}' | trans }}</p> <p>{{ '{errors:report_text}' | trans }}</p>
<label for="email">{{ '{errors:report_email}' | trans }}</label> <label for="email">{{ '{errors:report_email}' | trans }}</label>
<input type="email" name="email" id="email" class="edge" value="{{ email }}" /> <input type="email" name="email" id="email" class="edge" size="50" value="{{ email }}">
<textarea class="text-area edge" name="text" rows="6" cols="50" placeholder="{{ '{errors:report_explain}' | trans }}" required></textarea> <textarea class="text-area edge" name="text" rows="6" cols="50" placeholder="{{ '{errors:report_explain}' | trans }}" required></textarea>
<p class="center"> <p class="center">
......
...@@ -51,7 +51,9 @@ $data['directory'] = dirname(dirname(__FILE__)); ...@@ -51,7 +51,9 @@ $data['directory'] = dirname(dirname(__FILE__));
if ($config->getBoolean('errorreporting', true)) { if ($config->getBoolean('errorreporting', true)) {
$mail = new SimpleSAML\Utils\EMail('SimpleSAMLphp error report from ' . $email); $mail = new SimpleSAML\Utils\EMail('SimpleSAMLphp error report from ' . $email);
$mail->setData($data); $mail->setData($data);
$mail->addReplyTo($email); if ($email) {
$mail->addReplyTo($email);
}
$mail->setText($text); $mail->setText($text);
$mail->send(); $mail->send();
SimpleSAML\Logger::error('Report with id ' . $reportId . ' sent'); SimpleSAML\Logger::error('Report with id ' . $reportId . ' sent');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment