From 525261a5b5c4c1fc9307b4217db73dc4d71a1a9a Mon Sep 17 00:00:00 2001 From: tomasm- Date: Fri, 6 May 2011 21:55:37 -0700 Subject: [PATCH] Adding missing variable to progressMenu. Adding stepTotal() convenience function to helper. --- views/helpers/wizard.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/views/helpers/wizard.php b/views/helpers/wizard.php index daf464f..8d50bcf 100644 --- a/views/helpers/wizard.php +++ b/views/helpers/wizard.php @@ -73,6 +73,13 @@ function stepNumber($step = null, $shiftIndex = 1) { return false; } } + + function stepTotal() + { + $steps = $this->config('steps'); + return count($steps); + } + /** * Returns a set of html elements containing links for each step in the wizard. * @@ -86,7 +93,8 @@ function stepNumber($step = null, $shiftIndex = 1) { function progressMenu($titles = array(), $attributes = array(), $htmlAttributes = array(), $confirmMessage = false, $escapeTitle = true) { $wizardConfig = $this->config(); extract($wizardConfig); - + $wizardAction = $this->config('wizardAction'); + $attributes = array_merge(array('wrap' => 'div'), $attributes); extract($attributes);