From 68d374208b3b0de28b18f9389aa29240c37ec848 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Tue, 12 Sep 2017 10:09:24 +1200 Subject: [PATCH] Use MultiFormStep::Link to generate href --- src/Models/MultiFormStep.php | 10 +++++----- templates/Includes/MultiFormProgressList.ss | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Models/MultiFormStep.php b/src/Models/MultiFormStep.php index f02e54d..5b001b8 100644 --- a/src/Models/MultiFormStep.php +++ b/src/Models/MultiFormStep.php @@ -145,19 +145,19 @@ class MultiFormStep extends DataObject } /** - * Gets a direct link to this step (only works - * if you're allowed to skip steps, or this step - * has already been saved to the database - * for the current {@link MultiFormSession}). + * Gets a direct link to this step (only works if you're allowed to skip + * steps, or this step has already been saved to the database for the + * current {@link MultiFormSession}). * * @return string Relative URL to this step */ public function Link() { $form = $this->form; + return Controller::join_links( $form->getDisplayLink(), - "?{$form->getGetVar()}={$this->getSession()->Hash}" + sprintf("?%s=%s&StepID=%s", $form->getGetVar(), $this->getSession()->Hash, $this->ID) ); } diff --git a/templates/Includes/MultiFormProgressList.ss b/templates/Includes/MultiFormProgressList.ss index a183150..9b00904 100644 --- a/templates/Includes/MultiFormProgressList.ss +++ b/templates/Includes/MultiFormProgressList.ss @@ -4,7 +4,7 @@ <% if $LinkingMode = current %> <% else %> <% if $ID %> - + <% end_if %> <% end_if %>