Skip to content

Commit

Permalink
Merge branch 'release-branch'
Browse files Browse the repository at this point in the history
  • Loading branch information
buttflattery committed Feb 10, 2020
2 parents c39c5a2 + 992435c commit 1d35576
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 52 deletions.
30 changes: 19 additions & 11 deletions src/FormWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,17 @@ class FormWizard extends Widget
const BS_4 = 4;

/**
* ICONS
* TEXT LABELS CONSTANTS
* */
const DEFAULT_FORM_INFO_TEXT = 'Add details below';
const DEFAULT_STEP_DESCRIPTION = 'Description';
const PREVIEW_TITLE = 'Final Preview';
const PREVIEW_DESCRIPTION = 'Final Preview of all Steps';
const PREVIEW_FORM_INFO_TEXT = 'Review information below and click to change';

/**
* ICONS
* */
const ICON_NEXT = '<i class="formwizard-arrow-right-alt1-ico"></i>';
const ICON_PREV = '<i class="formwizard-arrow-left-alt1-ico"></i>';
const ICON_FINISH = '<i class="formwizard-check-alt-ico"></i>';
Expand Down Expand Up @@ -502,8 +510,8 @@ private function _setDefaults()
$this->_bsVersion = $this->forceBsVersion;
} else {
//is bs4 version
$isBs4 = class_exists(Bs4Assets::class);
$this->_bsVersion = $isBs4 ? self::BS_3 : self::BS_4;
$isBs4 = class_exists(BS4ActiveForm::class);
$this->_bsVersion = !$isBs4 ? self::BS_3 : self::BS_4;
}

}
Expand Down Expand Up @@ -649,9 +657,9 @@ public function createFormWizard()
[
[
'type' => self::STEP_TYPE_PREVIEW,
'title' => 'Final Preview',
'description' => 'Final Preview of all Steps',
'formInfoText' => 'Click any of the steps below to edit them',
'title' => self::PREVIEW_TITLE,
'description' => self::PREVIEW_DESCRIPTION,
'formInfoText' => self::PREVIEW_FORM_INFO_TEXT,
],
]
);
Expand Down Expand Up @@ -693,10 +701,10 @@ public function createStep($index, $step)
$stepTitle = ArrayHelper::getValue($step, 'title', 'Step-' . ($index + 1));

//step description
$stepDescription = ArrayHelper::getValue($step, 'description', 'Description');
$stepDescription = ArrayHelper::getValue($step, 'description', self::DEFAULT_STEP_DESCRIPTION);

//form body info text
$formInfoText = ArrayHelper::getValue($step, 'formInfoText', 'Add details below');
$formInfoText = ArrayHelper::getValue($step, 'formInfoText', self::DEFAULT_FORM_INFO_TEXT);

//get html tabs
$htmlTabs = $this->createTabs($index, $stepDescription, $stepTitle);
Expand Down Expand Up @@ -755,7 +763,7 @@ public function createBody($index, $formInfoText, $step)
$isSkipable = ArrayHelper::getValue($step, 'isSkipable', false);

//check if tabular step
$isTabularStep = $stepType == self::STEP_TYPE_TABULAR;
$isTabularStep = $stepType === self::STEP_TYPE_TABULAR;

//tabular rows limit
$limitRows = ArrayHelper::getValue($step, 'limitRows', self::ROWS_UNLIMITED);
Expand Down Expand Up @@ -982,8 +990,8 @@ public function registerScripts($pluginOptions, $isBs3, $jsOptionsPersistence)

//is supported theme
if (in_array($themeSelected, array_keys($this->themesSupported))) {
$themeAsset = __NAMESPACE__ . '\assetbundles\bs' .
$this->_bsVersion . '\Theme' .
$themeAsset = __NAMESPACE__ . '\\assetbundles\\bs' .
$this->_bsVersion . '\\Theme' .
$this->themesSupported[$themeSelected] . 'Asset';

$themeAsset::register($view);
Expand Down
4 changes: 2 additions & 2 deletions src/assetbundles/bs3/FormWizardAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class FormWizardAsset extends ThemeBase
];

public $css = [
'css/animate.css',
'css/shake.css',
'css/animate.min.css',
'css/shake.min.css',
'css/smart_wizard.min.css',
'css/icons-theme.min.css',
];
Expand Down
8 changes: 8 additions & 0 deletions src/assets/css/animate.min.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/assets/css/shake.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/assets/css/smart_wizard.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@
cursor: not-allowed;
}

.notify-target {
box-shadow: 0 0 5px rgba(81, 203, 238, 1);
padding: 3px 0px 3px 3px;
margin: 5px 1px 3px 0px;
border: 1px solid rgba(81, 203, 238, 1);
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
}

@media screen and (max-width: 768px) {
.sw-theme-default>.nav-tabs>li {
float: none !important;
Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/smart_wizard.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1d35576

Please sign in to comment.