Commit 68910dd6 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Rolled back 0ba3870e because it's a syntax

error, and I can't quite figure out what it _should_ do
parent e1b682d6
......@@ -556,17 +556,7 @@ class Pieform {
// Submit the form if things went OK
if ($this->submit && !$this->has_errors()) {
foreach ($this->get_elements() as $element) {
// @todo Rename 'ajaxmessages' to 'submitelement'
if ($element['ajaxmessages'] == true && isset($values[$element['name']])) {
$function = "{$this->name}_submit_{$element['name']}";
if (function_exists($function)) {
$function($values);
break;
}
}
}
else if (function_exists($this->submitfunction)) {
if (function_exists($this->submitfunction)) {
$function = $this->submitfunction;
// Call the user defined function for processing a submit
// This function should really redirect/exit after it has
......
......@@ -42,8 +42,6 @@ function pieform_render_submitcancel($element, Pieform $form) {
}
function pieform_render_submitcancel_set_attributes($element) {
// @todo change to 'submitelement' => true, more generic and can be used
// for working out which submit button was pressed
$element['ajaxmessages'] = true;
return $element;
}
......
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