43 $scheme = isset($this->form->url[
'scheme']) ? $this->form->url[
'scheme'] .
'://' :
'';
44 $host = isset($this->form->url[
'host']) ? $this->form->url[
'host'] :
'';
45 $port = isset($this->form->url[
'port']) ?
':' . $this->form->url[
'port'] :
'';
46 $path = isset($this->form->url[
'path']) ? $this->form->url[
'path'] :
'';
47 $baseUrl =
"$scheme$host$port$path";
50 $currentStepId = $this->form->getCurrentStepId();
51 $firstInvalidStep = $this->form->getFirstInvalidStep();
53 $htmlString =
"<ol class=\"stepnav\">";
54 foreach ($this->form->getSteps() as $stepNum => $step) {
56 $class =
"step-$stepNum";
57 $label = $step->htmlLabel();
60 if ($stepNum <= $firstInvalidStep && $stepNum != $currentStepId) {
61 $link =
"href=\"" . htmlspecialchars($baseUrl . $this->form->buildUrlQuery(array(
'step' => $stepNum))) .
"\"";
65 if ($stepNum < $currentStepId) {
66 $class .= $step->validate() ?
" valid" :
" invalid";
69 if ($stepNum == $currentStepId) {
70 $htmlString .=
"<li class=\"current-step $class\"><a $link><strong>$label</strong></a></li>";
72 $htmlString .=
"<li class=\"$class\"><a $link>$label</a></li>";
75 $htmlString .=
"</ol>";