Browse Source

Move hidden input outside of sliding checkbox to fix edge

pull/21/head
Chris 7 years ago
parent
commit
ee089d0761
  1. 4
      resources/views/items/form.blade.php
  2. 2
      resources/views/supportedapps/pihole.blade.php

4
resources/views/items/form.blade.php

@ -21,13 +21,13 @@
{!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
<hr />
<label>{{ __('app.apps.pinned') }}</label>
{!! Form::hidden('pinned', '0') !!}
<label class="switch">
<?php
$checked = false;
if(isset($item->pinned) && (bool)$item->pinned === true) $checked = true;
$set_checked = ($checked) ? ' checked="checked"' : '';
?>
{!! Form::hidden('pinned', '0') !!}
?>
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
<span class="slider round"></span>
</label>

2
resources/views/supportedapps/pihole.blade.php

@ -4,13 +4,13 @@
<input type="hidden" data-config="dataonly" class="config-item" name="config[dataonly]" value="1" />
<div class="input">
<label>{{ __('app.apps.enable') }}</label>
{!! Form::hidden('config[enabled]', '0') !!}
<label class="switch">
<?php
$checked = false;
if(isset($item->config->enabled) && (bool)$item->config->enabled === true) $checked = true;
$set_checked = ($checked) ? ' checked="checked"' : '';
?>
{!! Form::hidden('config[enabled]', '0') !!}
<input type="checkbox" name="config[enabled]" value="1"<?php echo $set_checked;?> />
<span class="slider round"></span>
</label>

Loading…
Cancel
Save