Commit cba87af3 authored by Nicolas Widart's avatar Nicolas Widart

First step towards selecting permissions

parent fb586783
.switchery{background-color:#fff;border:1px solid #dfdfdf;border-radius:20px;cursor:pointer;display:inline-block;height:30px;position:relative;vertical-align:middle;width:50px;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.switchery>small{background:#fff;border-radius:100%;box-shadow:0 1px 3px rgba(0,0,0,0.4);height:30px;position:absolute;top:0;width:30px}
\ No newline at end of file
This diff is collapsed.
......@@ -11,6 +11,10 @@
</ol>
@stop
@section('styles')
<link href="{{{ user_asset('css/vendor/switchery.min.css') }}}" rel="stylesheet" type="text/css" />
@stop
@section('content')
<div class="row">
<div class="col-md-12">
......@@ -48,6 +52,17 @@
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6">
<?php foreach($role->permissions as $name => $value): ?>
<div class="checkbox">
<label for="perm1">
{{ $name }}<input id="perm1" type="checkbox" class="simple" <?php echo $value ? 'checked' : '' ?> />
</label>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">Update</button>
......@@ -58,3 +73,18 @@
</div>
</div>
@stop
@section('scripts')
<script src="{{{ user_asset('js/vendor/switchery.min.js') }}}" type="text/javascript"></script>
<script>
$( document ).ready(function() {
//Flat red color scheme for iCheck
$('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
checkboxClass: 'icheckbox_flat-red',
radioClass: 'iradio_flat-red'
});
var elem = $('.js-switch');
var init = new Switchery(elem, { disabled: true, disabledOpacity: 0.75 });
});
</script>
@stop
\ No newline at end of file
<?php
if (!function_exists('user_asset')) {
function user_asset($url, array $attributes = [], $secure = false)
{
return Module::asset('user', $url, $attributes, $secure);
}
}
\ No newline at end of file
......@@ -26,4 +26,5 @@ Config::addNamespace('user', __DIR__ . '/Config/');
*/
require __DIR__ . '/Http/routes.php';
require __DIR__ . '/composers.php';
\ No newline at end of file
require __DIR__ . '/composers.php';
require __DIR__ . '/helpers.php';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment