Commit 7e8a413b authored by Anders Damsgaard's avatar Anders Damsgaard

improve grammar in error message, decrease header size above form

parent bcf49cd4
......@@ -2,8 +2,8 @@
<div class="container">
<br><br>
<!-- page header -->
<h1 class="header center orange-text">Calculate Exposure and Erosion
History</h1>
<h2 class="header center orange-text">Calculate Exposure and Erosion
History</h2>
<div class="row">
......
......@@ -31,6 +31,8 @@ if (count($missing_fields) > 0) {
// generate comma-separated list of missing field names
for ($i = 0; $i < count($missing_fields); $i++) {
// text before list of field names
if ($i == 0 && count($missing_fields) == 1) {
$error_msg .= '<p>The following value is missing: <b>';
} elseif ($i == 0) {
......@@ -41,6 +43,8 @@ if (count($missing_fields) > 0) {
$error_msg .= $missing_fields[$i];
} elseif ($i + 1 == count($missing_fields)) { // no comma for last word
$error_msg .= ' and ' . $missing_fields[$i];
} elseif ($i + 2 == count($missing_fields)) { // no oxford comma
$error_msg .= $missing_fields[$i] . ' ';
} else {
$error_msg .= $missing_fields[$i] . ', ';
}
......
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 to comment