]> BookStack Code Mirror - bookstack/commitdiff
Removed old input checks on entity permission checkboxes
authorDan Brown <redacted>
Sun, 3 Apr 2016 09:23:16 +0000 (10:23 +0100)
committerDan Brown <redacted>
Sun, 3 Apr 2016 09:23:16 +0000 (10:23 +0100)
Old input check potentialy causing issues (#89) and is not needed on the pages which it shows.

resources/views/form/restriction-checkbox.blade.php

index a4449ccb887bef7d781212e8c31a35f3ace98b2c..5a8662b56a964430fbdcdc2937264db7b0344bf2 100644 (file)
@@ -1,7 +1,6 @@
 
 <label>
     <input value="true" id="{{$name}}[{{$role->id}}][{{$action}}]" type="checkbox" name="{{$name}}[{{$role->id}}][{{$action}}]"
-           @if(old($name .'.'.$role->id.'.'.$action) || (!old() && isset($model) && $model->hasRestriction($role->id, $action))) checked="checked" @endif
-    >
+           @if(isset($model) && $model->hasRestriction($role->id, $action)) checked="checked" @endif>
     {{ $label }}
 </label>
\ No newline at end of file