Fix require-email setting, #308

This commit is contained in:
Pelle Nilsson 2017-03-19 18:42:03 +01:00
parent b5e7c78dcc
commit 45a481daeb

View File

@ -35,8 +35,8 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n",
// email is not optional if this config parameter is set // email is not optional if this config parameter is set
if (config["require-email"]) { if (config["require-email"]) {
$("[name='email']", el).placeholder = $("[name='email']", el).setAttribute("placeholder",
$("[name='email']", el).placeholder.replace(/ \(.*\)/, ""); $("[name='email']", el).getAttribute("placeholder").replace(/ \(.*\)/, ""));
} }
// submit form, initialize optional fields with `null` and reset form. // submit form, initialize optional fields with `null` and reset form.