From 8d93736482606aede2fcde4b9d5640680fc96a94 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 14 May 2008 10:40:19 +0000 Subject: [PATCH] Fall back to using the class name if there is no title property set --- code/MultiForm.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/MultiForm.php b/code/MultiForm.php index 5581669..f26c931 100644 --- a/code/MultiForm.php +++ b/code/MultiForm.php @@ -449,7 +449,7 @@ abstract class MultiForm extends Form { $templateData = array( 'ID' => $firstStep->ID, 'ClassName' => $firstStep->class, - 'Title' => $firstStep->getTitle(), + 'Title' => $firstStep->title ? $firstStep->title : $firstStep->class, 'SessionID' => ($this->stat('url_type') == 'ID') ? $this->session->ID : $this->session->Hash, 'LinkingMode' => ($firstStep->ID == $this->getCurrentStep()->ID) ? 'current' : 'link' ); @@ -478,7 +478,7 @@ abstract class MultiForm extends Form { $record = array( 'ID' => $nextStep->ID, 'ClassName' => $nextStep->class, - 'Title' => $nextStep->getTitle(), + 'Title' => $nextStep->title ? $nextStep->title : $nextStep->class, 'SessionID' => ($this->stat('url_type') == 'ID') ? $this->session->ID : $this->session->Hash, 'LinkingMode' => ($nextStep->ID == $this->getCurrentStep()->ID) ? 'current' : 'link' ); @@ -487,7 +487,7 @@ abstract class MultiForm extends Form { $nextStep = singleton($step->getNextStep()); $record = array( 'ClassName' => $nextStep->class, - 'Title' => $nextStep->getTitle() + 'Title' => $nextStep->title ? $nextStep->title : $nextStep->class ); } // Add the array data, and do a callback