Commit 6750fd37 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Fix form submission for no-reply email setting (Bug #946880)"

parents a824c9eb 1a83b282
......@@ -931,10 +931,17 @@ function auth_check_required_fields() {
'name' => 'requiredfields',
'method' => 'post',
'action' => '',
'elements' => $elements
'elements' => $elements,
'dieaftersubmit' => FALSE,
'backoutaftersubmit' => TRUE,
));
}
// Has the form been successfully submitted? Back out and let the requested URL continue.
if ($form === FALSE) {
return;
}
$smarty = smarty();
if ($USER->get('parentuser')) {
$smarty->assign('loginasoverridepasswordchange',
......@@ -1103,6 +1110,10 @@ function requiredfields_submit(Pieform $form, $values) {
}
}
if ($form->get_property('backoutaftersubmit')) {
return;
}
redirect();
}
......
......@@ -160,7 +160,12 @@ class Pieform {/*{{{*/
*/
public static function process($data) {/*{{{*/
$form = new Pieform($data);
if ($form->get_property('backingout')) {
return FALSE;
}
else {
return $form->build();
}
}/*}}}*/
/**
......@@ -536,6 +541,9 @@ class Pieform {/*{{{*/
}
else {
// Successful submission, and the user doesn't care about replying, so...
if (isset($this->data['backoutaftersubmit'])) {
$this->data['backingout'] = TRUE;
}
return;
}
}
......
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