Commit 49d71e1d authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Display stopdate fields which have errors in them (bug #894592)



When you get an 'end date in the past' error from the view access page,
the offending record is not displayed because the form removes stale
records as it pulls them out of the database.  However, when we're just
validating a bad stop date entered by the user, we need to make sure
it's still displayed to avoid confusion over the error.

Change-Id: I22c8876a599a2f00280058f32b4757d8eb523ea0
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent b7c12cc1
......@@ -80,7 +80,7 @@ function pieform_element_viewacl(Pieform $form, $element) {
$item['shortname'] = str_shorten_text($item['name'], 30, true);
}
// only show access that is still current. Expired access will be deleted if the form is saved
if (empty($item['stopdate']) || (time() <= strtotime($item['stopdate']))) {
if ($form->is_submitted() || empty($item['stopdate']) || (time() <= strtotime($item['stopdate']))) {
$accesslist[] = $item;
}
}
......
Supports Markdown
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