Skip to content

Commit

Permalink
Fixed Bootstrap 5 validation classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-vince committed Aug 2, 2023
1 parent bdae9ae commit 26d8bea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 1 addition & 5 deletions components/SmallContactForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,6 @@ public function getFormAttributes(){
$attributes['class'] .= Settings::getTranslated('form_css_class');
}

if( !empty(Input::all()) ) {
$attributes['class'] .= ' was-validated';
}

if( Settings::getTranslated('form_send_confirm_msg') and Settings::getTranslated('form_allow_confirm_msg') ) {

$attributes['data-request-confirm'] = Settings::getTranslated('form_send_confirm_msg');
Expand Down Expand Up @@ -657,7 +653,7 @@ public function getFieldHtmlCode(array $fieldSettings){

// Add wrapper error class if there are any
if(!empty($this->postData[$fieldSettings['name']]['error'])){
$wrapperCss .= ' has-error';
$wrapperCss .= ' is-invalid';
}

$output[] = '<div class="' . $wrapperCss . '">';
Expand Down
4 changes: 3 additions & 1 deletion updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,6 @@
1.63.4:
- Added navigation item counter (thanks @ZhiweiWu0425)
1.63.5:
- Fixed messages counter
- Fixed messages counter
1.63.6:
- Fixed Bootstrap 5 validation classes

0 comments on commit 26d8bea

Please sign in to comment.