diff --git a/controllers/EditAlbum.php b/controllers/EditAlbum.php index 26e2c6a3..58888763 100644 --- a/controllers/EditAlbum.php +++ b/controllers/EditAlbum.php @@ -123,7 +123,7 @@ class EditAlbum extends HTMLController // Anything missing? if (!empty($form->getMissing())) - return $formview->adopt(new Alert('Some data missing', 'Please fill out the following fields: ' . implode(', ', $form->getMissing()), 'error')); + return $formview->adopt(new Alert('Some data missing', 'Please fill out the following fields: ' . implode(', ', $form->getMissing()), 'danger')); $data = $form->getData(); @@ -140,7 +140,7 @@ class EditAlbum extends HTMLController $data['kind'] = 'Album'; $newTag = Tag::createNew($data); if ($newTag === false) - return $formview->adopt(new Alert('Cannot create this album', 'Something went wrong while creating the album...', 'error')); + return $formview->adopt(new Alert('Cannot create this album', 'Something went wrong while creating the album...', 'danger')); if (isset($_POST['submit_and_new'])) { diff --git a/controllers/EditTag.php b/controllers/EditTag.php index 24126c31..4b429267 100644 --- a/controllers/EditTag.php +++ b/controllers/EditTag.php @@ -115,7 +115,7 @@ class EditTag extends HTMLController // Anything missing? if (!empty($form->getMissing())) - return $formview->adopt(new Alert('Some data missing', 'Please fill out the following fields: ' . implode(', ', $form->getMissing()), 'error')); + return $formview->adopt(new Alert('Some data missing', 'Please fill out the following fields: ' . implode(', ', $form->getMissing()), 'danger')); $data = $form->getData(); @@ -127,7 +127,7 @@ class EditTag extends HTMLController { $return = Tag::createNew($data); if ($return === false) - return $formview->adopt(new Alert('Cannot create this tag', 'Something went wrong while creating the tag...', 'error')); + return $formview->adopt(new Alert('Cannot create this tag', 'Something went wrong while creating the tag...', 'danger')); if (isset($_POST['submit_and_new'])) { diff --git a/controllers/EditUser.php b/controllers/EditUser.php index bbce589f..c5f65784 100644 --- a/controllers/EditUser.php +++ b/controllers/EditUser.php @@ -129,7 +129,7 @@ class EditUser extends HTMLController // Anything missing? if (!empty($form->getMissing())) - return $formview->adopt(new Alert('Some data missing', 'Please fill out the following fields: ' . implode(', ', $form->getMissing()), 'error')); + return $formview->adopt(new Alert('Some data missing', 'Please fill out the following fields: ' . implode(', ', $form->getMissing()), 'danger')); $data = $form->getData(); @@ -150,18 +150,18 @@ class EditUser extends HTMLController // If it looks like an e-mail address... if (!empty($data['emailaddress']) && !preg_match('~^[^ ]+@[^ ]+\.[a-z]+$~', $data['emailaddress'])) - return $formview->adopt(new Alert('Email addresses invalid', 'The email address you entered is not a valid email address.', 'error')); + return $formview->adopt(new Alert('Email addresses invalid', 'The email address you entered is not a valid email address.', 'danger')); // Check whether email address is already linked to an account in the database -- just not to the account we happen to be editing, of course. elseif (!empty($data['emailaddress']) && Member::exists($data['emailaddress']) && !($id_user && $user->getEmailAddress() == $data['emailaddress'])) - return $formview->adopt(new Alert('Email address already in use', 'Another account is already using the e-mail address you entered.', 'error')); + return $formview->adopt(new Alert('Email address already in use', 'Another account is already using the e-mail address you entered.', 'danger')); // Setting passwords? We'll need two! if (!$id_user || !empty($data['password1']) && !empty($data['password2'])) { if (strlen($data['password1']) < 6 || !preg_match('~[^A-z]~', $data['password1'])) - return $formview->adopt(new Alert('Password not acceptable', 'Please fill in a password that is at least six characters long and contains at least one non-alphabetic character (e.g. a number or symbol).', 'error')); + return $formview->adopt(new Alert('Password not acceptable', 'Please fill in a password that is at least six characters long and contains at least one non-alphabetic character (e.g. a number or symbol).', 'danger')); elseif ($data['password1'] !== $data['password2']) - return $formview->adopt(new Alert('Passwords do not match', 'The passwords you entered do not match. Please try again.', 'error')); + return $formview->adopt(new Alert('Passwords do not match', 'The passwords you entered do not match. Please try again.', 'danger')); else $data['password'] = $data['password1']; @@ -173,7 +173,7 @@ class EditUser extends HTMLController { $return = Member::createNew($data); if ($return === false) - return $formview->adopt(new Alert('Cannot create this user', 'Something went wrong while creating the user...', 'error')); + return $formview->adopt(new Alert('Cannot create this user', 'Something went wrong while creating the user...', 'danger')); if (isset($_POST['submit_and_new'])) { diff --git a/controllers/Login.php b/controllers/Login.php index 46e5da6f..d91785db 100644 --- a/controllers/Login.php +++ b/controllers/Login.php @@ -44,7 +44,7 @@ class Login extends HTMLController parent::__construct('Log in - ' . SITE_TITLE); $form = new LogInForm('Log in'); if ($login_error) - $form->adopt(new Alert('', 'Invalid email address or password.', 'error')); + $form->adopt(new Alert('', 'Invalid email address or password.', 'danger')); // Tried anything? Be helpful, at least. if (isset($_POST['emailaddress'])) diff --git a/controllers/ResetPassword.php b/controllers/ResetPassword.php index 7153498b..24fa7b64 100644 --- a/controllers/ResetPassword.php +++ b/controllers/ResetPassword.php @@ -48,7 +48,7 @@ class ResetPassword extends HTMLController exit; } else - $form->adopt(new Alert('Some fields require your attention', '