e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
322 stars 214 forks source link

checkboxes and bootstrap3 #4331

Closed Jimmi08 closed 3 years ago

Jimmi08 commented 3 years ago

Hi, I am fixing frontend checkboxes...

List of existing checkboxes on frontend:

How it should works:

I run to a problem I need to discuss with the bootstrap3 theme.
With changing shortcodes I need to be sure that the final result is not changed.

There are options:

  1. not use checkbox snippet for bootstrap3 at all. - it fails on rememberme button (checkbox in form) image
    • it influences almost each theme

2. add snippet according boostrap specs This one:

<div class="checkbox"><label>
<input id='{id}' class='{class}' type='checkbox' {attributes} />
{label}</label></div>

image image

3. add stripped snippet , just input field

<label>
<input id='{id}' class='{class}' type='checkbox' {attributes} />
{label}</label>

For bootstrap3 it is correct, but it will cause problem later image

My opinion is to fix everything the correct way and let theme authors fix possible issues. So it means to fix usersettings and gdpr too.

For your imagination, these are examples for other bootstrap versions: Bt4

<div class="form-check">
    <input class="form-check-input" type="checkbox" id="{id}" {attributes} >
    <label class="form-check-label" for="{id}">
        {label}
    </label>
  </div>

MDB4: (custom bootstrap4)

<div class="custom-control custom-checkbox">
    <input type="checkbox" class="custom-control-input" id="{id}" {attributes}>
    <label class="custom-control-label" for="{id}">{label}</label>
</div>

MDB5 (standard)

<div class="form-check">
    <input type="checkbox" class="form-check-input" id="{id}" {attributes}>
    <label class="form-check-label" for="{id}">{label}</label>
</div>

PS. form-group element is part of template/wrapper.

Any ideas?

Jimmi08 commented 3 years ago

Fixed with this: https://github.com/e107inc/e107/commit/8871cdd097e4eef56008925e8ff847a6c79873ec

Recapitulation: