From a2599f0e4ba7bcf7d4ad5c96a7e07582e631537e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 23 Oct 2005 19:40:40 +0000 Subject: [PATCH] - Changed page_confirm() to produce a more elegant display - row_submit() now prints the extra even if there is no reset --- printer.php | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/printer.php b/printer.php index 7306389..573f85b 100644 --- a/printer.php +++ b/printer.php @@ -213,16 +213,30 @@ EOD; /** * Produces an entire page layout that asks the user whether or not they want to perform X action and provides - * a link to the YES action + * a link to the YES and NO action * * @param string Message that asks if they want to do X * @param string Location to go for YES + * @param string DO action to pass + * @param array Hidden parameters to pass to the next page */ - function page_confirm($message, $location) + function page_confirm($message, $location, $action, $params) { $this->page_start($this->registry->modules['localize']->string('Confirm')); - $this->page_message($this->registry->modules['localize']->string('Confirm'), $message . '

'); + $this->form_start($location, $action); + foreach ($params AS $key => $value) + { + $this->form_hidden_field($key, $value); + } + + $this->table_start(true, '75%'); + $this->table_head($this->registry->modules['localize']->string('Confirm'), 1); + $this->row_span("

$message
", ':swap:', 'left', 1); + $this->row_submit('', $this->registry->modules['localize']->string('Yes'), ''); + $this->table_end(); + + $this->form_end(); $this->page_end(); } @@ -535,7 +549,9 @@ EOD; } $output = "\n\t\t"; - $output .= (($reset) ? "\n\t\t $extra\n\t" : ''); + $output .= ($reset ? "\n\t\t" : ''); + $output .= ($extra ? "\n\t\t$extra" : ''); + $output .= "\n\t"; $this->row_tfoot($output); } -- 2.43.5