1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +02:00

Bootstrap 4 Fixes on Usersettings page.

This commit is contained in:
Cameron
2020-05-13 13:31:43 -07:00
parent e86d6272fa
commit bf00c3ad83
6 changed files with 23 additions and 21 deletions

View File

@@ -328,7 +328,7 @@ class usersettings_shortcodes extends e_shortcode
if (e107::getPref('photo_upload') && FILE_UPLOADS) if (e107::getPref('photo_upload') && FILE_UPLOADS)
{ {
$text .= "<div class='checkbox'>"; $text .= "<div class='checkbox form-check'>";
$text .= e107::getForm()->checkbox('user_delete_photo', 1, false, LAN_USET_16); $text .= e107::getForm()->checkbox('user_delete_photo', 1, false, LAN_USET_16);
$text .= "</div>"; $text .= "</div>";

View File

@@ -52,7 +52,7 @@ $CONTACT_TEMPLATE['menu'] = '
{CONTACT_BODY=rows=5&cols=30} {CONTACT_BODY=rows=5&cols=30}
</div> </div>
<div class="form-group"><label for="gdpr">'.LANCONTACT_24.'</label> <div class="form-group"><label for="gdpr">'.LANCONTACT_24.'</label>
<div class="checkbox"> <div class="checkbox form-check">
<label>{CONTACT_GDPR_CHECK} '.LANCONTACT_21.'</label> <label>{CONTACT_GDPR_CHECK} '.LANCONTACT_21.'</label>
<div class="help-block">{CONTACT_GDPR_LINK}</div> <div class="help-block">{CONTACT_GDPR_LINK}</div>
</div> </div>

View File

@@ -2429,7 +2429,7 @@ class e_form
} }
$labelClass = (!empty($options['inline'])) ? 'checkbox-inline' : 'checkbox'; $labelClass = (!empty($options['inline'])) ? 'checkbox-inline' : 'checkbox form-check';
$labelTitle = ''; $labelTitle = '';
$options = $this->format_options('checkbox', $name, $options); $options = $this->format_options('checkbox', $name, $options);
@@ -2459,7 +2459,7 @@ class e_form
$post = (vartrue($options['label'])) ? "<span>".$options['label']."</span></label>" : ""; $post = (vartrue($options['label'])) ? "<span>".$options['label']."</span></label>" : "";
unset($options['label']); // not to be used as attribute; unset($options['label']); // not to be used as attribute;
$text .= "<input type='checkbox' name='{$name}' value='{$value}'".$this->get_attributes($options, $name, $value)." />"; $text .= "<input class='form-check-input' type='checkbox' name='{$name}' value='{$value}'".$this->get_attributes($options, $name, $value)." />";
return $pre.$text.$post; return $pre.$text.$post;
} }
@@ -2515,13 +2515,13 @@ class e_form
// return print_a($checked,true); // return print_a($checked,true);
if(isset($options['list']) && $options['list']) if(isset($options['list']) && $options['list'])
{ {
return "<ul id='".$id."' class='checkboxes'><li>".implode("</li><li>",$text)."</li></ul>"; return "<ul id='".$id."' class='checkboxes checkbox'><li>".implode("</li><li>",$text)."</li></ul>";
} }
if(!empty($text)) if(!empty($text))
{ {
return "<div id='".$id."' class='checkboxes' style='display:inline-block'>".implode("",$text)."</div>"; return "<div id='".$id."' class='checkboxes checkbox' style='display:inline-block'>".implode("",$text)."</div>";
} }
return $text; return $text;
@@ -2631,14 +2631,14 @@ class e_form
// return print_a($options,true); // return print_a($options,true);
if($labelFound) // Bootstrap compatible markup if($labelFound) // Bootstrap compatible markup
{ {
$defaultClass = (deftrue('BOOTSTRAP')) ? 'radio-inline' : 'radio inline'; $defaultClass = (deftrue('BOOTSTRAP')) ? 'radio-inline form-check-inline' : 'radio inline';
$dis = (!empty($options['disabled'])) ? " disabled" : ""; $dis = (!empty($options['disabled'])) ? " disabled" : "";
$text .= "<label class='{$defaultClass}{$dis}'>"; $text .= "<label class='{$defaultClass}{$dis}'>";
} }
$text .= "<input type='radio' name='{$name}' value='".$value."'".$this->get_attributes($options, $name, $value)." />"; $text .= "<input class='form-check-input' type='radio' name='{$name}' value='".$value."'".$this->get_attributes($options, $name, $value)." />";
if(vartrue($options['help'])) if(vartrue($options['help']))
{ {

File diff suppressed because one or more lines are too long

View File

@@ -180,7 +180,9 @@ table textarea.input-block-level,
input.input-block-level, input.input-block-level,
input.form-control.input-block-level, input.form-control.input-block-level,
select.input-block-level { width: 100% } select.input-block-level { width: 100% }
table label.checkbox { margin-left: 20px } table label.checkbox { /*margin-left: 20px */}
.form-check { padding-bottom: 9px; margin:0 !important }
div.checkboxes { margin:0 }
ul.checkboxes { display: inline-block; list-style: none; margin: 0; padding: 0;} ul.checkboxes { display: inline-block; list-style: none; margin: 0; padding: 0;}
#admin-ui-nav-menu i.fa-chevron-right { margin-left: -10px } #admin-ui-nav-menu i.fa-chevron-right { margin-left: -10px }

View File

@@ -81,10 +81,10 @@ class usersettings_front // Begin Usersettings rewrite.
$usersettings_shortcodes->wrapper('usersettings/edit'); $usersettings_shortcodes->wrapper('usersettings/edit');
e107::css('inline', " /* e107::css('inline', "
.usersettings-form .col-sm-9 .checkboxes { margin-left:20px } .usersettings-form .col-sm-9 .checkboxes { margin-left:20px }
"); ");*/
} }
else else
{ {