diff --git a/README.md b/README.md
index 83d0f04..9f406e8 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ Once the extension is installed, simply use it in your code by :
$wizard_config = [
'id' => 'stepwizard',
'steps' => [
- [
+ 1 => [
'title' => 'Step 1',
'icon' => 'glyphicon glyphicon-cloud-download',
'content' => '
';
@@ -110,17 +110,22 @@ public function run() {
$first = false;
}
+
// Add a completed step if defined
if ($this->complete_content) {
- $wizard_line .= '
'.
- Html::a('', '#complete', [
- 'data-toggle' => 'tab',
- 'aria-controls' => 'complete',
- 'role' => 'tab',
- 'title' => 'Complete',
- ]).
- '';
- $tab_content .= '
'.$this->complete_content.'
';
+ // Check if completed tab is set as start_step
+ if ($this->start_step == 'completed') {
+ $class = 'active';
+ }
+ $wizard_line .= '
'.
+ Html::a('', '#complete', [
+ 'data-toggle' => 'tab',
+ 'aria-controls' => 'complete',
+ 'role' => 'tab',
+ 'title' => 'Complete',
+ ]).
+ '';
+ $tab_content .= '
'.$this->complete_content.'
';
}
// Start widget
@@ -151,7 +156,7 @@ public function run() {
* @return string
*/
protected function navButton($button_type, $step, $button_id) {
- // Always setup an id
+ // Setup a unique button id
$options = ['id' => $button_id.$button_type];
// Apply default button configuration if defined