Fix for switch button

This commit is contained in:
Diego Najar 2019-01-16 12:47:38 +01:00
parent 346d573197
commit 1fa3e28183
3 changed files with 10 additions and 9 deletions

View File

@ -336,6 +336,7 @@ td.child {
img.profilePicture {
width: 30px;
height: 30px;
border-radius: 30px;
border: 1px solid #ccc;
}
@ -344,7 +345,7 @@ img.profilePicture {
.switch {
position: relative;
height: 26px;
width: 120px;
width: 140px;
background: #f3f3f3;
border: 1px solid #ced4d9;
border-radius: 2px;
@ -354,7 +355,7 @@ img.profilePicture {
position: relative;
z-index: 2;
float: left;
width: 58px;
width: 50%;
line-height: 25px;
font-size: 11px;
text-align: center;
@ -393,7 +394,7 @@ img.profilePicture {
top: 2px;
left: 2px;
display: block;
width: 58px;
width: 50%;
height: 21px;
border-radius: 2px;
background-color: #6c757d;

View File

@ -67,11 +67,11 @@ echo Bootstrap::formOpen(array(
<?php endif; ?> -->
<span class="d-inline-block align-middle ml-1">
<div class="switch">
<div class="switch" style="width:<?php echo (Text::length($L->g('Publish')) * 15 ) ?>px">
<input type="radio" class="switch-input" name="switch" value="" id="jsPublishSwitch" <?php echo (!$page->draft()?'checked':'') ?>>
<label for="jsPublishSwitch" class="switch-label switch-label-off">Publish</label>
<label for="jsPublishSwitch" class="switch-label switch-label-off"><?php $L->p('Publish') ?></label>
<input type="radio" class="switch-input" name="switch" value="" id="jsDraftSwitch" <?php echo ($page->draft()?'checked':'') ?>>
<label for="jsDraftSwitch" class="switch-label switch-label-on">Draft</label>
<label for="jsDraftSwitch" class="switch-label switch-label-on"><?php $L->p('Draft') ?></label>
<span class="switch-selection"></span>
</div>
</span>

View File

@ -57,11 +57,11 @@ echo Bootstrap::formOpen(array(
<button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php $L->p('Save') ?></button>
<span class="d-inline-block align-middle ml-1">
<div class="switch">
<div class="switch" style="width:<?php echo (Text::length($L->g('Publish')) * 15 ) ?>px">
<input type="radio" class="switch-input" name="switch" value="" id="jsPublishSwitch" checked>
<label for="jsPublishSwitch" class="switch-label switch-label-off">Publish</label>
<label for="jsPublishSwitch" class="switch-label switch-label-off"><?php $L->p('Publish') ?></label>
<input type="radio" class="switch-input" name="switch" value="" id="jsDraftSwitch">
<label for="jsDraftSwitch" class="switch-label switch-label-on">Draft</label>
<label for="jsDraftSwitch" class="switch-label switch-label-on"><?php $L->p('Draft') ?></label>
<span class="switch-selection"></span>
</div>
</span>