Files
streamline-emr/docker/streamline-src/resources/views/general_settings/activate_streamline_modules.blade.php
T

100 lines
4.1 KiB
PHP
Executable File

@extends('layouts.main')
@push('styles')
<style>
.no-padding {
padding: 0px;
}
input[type="checkbox"]{
width: 1.5em;
height: 1.5em;
margin-right: 0.65rem;
}
.form-check-label{
padding-left: 2.25rem!important;
vertical-align: -webkit-baseline-middle;
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('general_settings.general_settings') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('general_settings.dashboard') }}</a></li>
<li class="active">{{ __('general_settings.activate_streamline_modules') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('flash::message')
<div class="white-box">
<h3><font color="blue">{{ __('general_settings.activate_streamline_modules') }}</font></h3>
{{ Form::open(['route' => 'streamline_modules.store_activated']) }}
<div class="row">
<div class="col">
<div class="table-responsive">
<table class="table color-table success-table table-sm">
<thead>
<tr>
<th colspan="3">{{ __('general_settings.check_streamline_modules_to_activate') }} <span class="float-right"> <input type="checkbox" id="check-all" class="form-check-input"> <label class="form-check-label" for="check-all">{{ __('roles.check_all') }}</label></span></th>
</tr>
</thead>
<tbody id="streamline_modules_to_activate">
@foreach($permission_categories as $key => $category)
@if ($key % 2 == 0)
<tr>
@endif
<td>
{{ Form::checkbox('permission_category[]', $category->id, $category->is_module_active == 1 ? true : false, ['class' => "permission_category form-check-input", 'id'=>'permission_category_'.$category->id,]) }}
<label class="form-check-label" for="permission_category_{{ $category->id }}">{{ $category->name }}</label>
</td>
@if (($key + 1) % 2 == 0)
</tr>
@endif
@endforeach
@if(count($permission_categories) % 2!= 0)
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
{{ Form::submit(__('general_settings.activate_streamline_modules'), ["class" => "btn btn-success", 'id' => 'activate_streamline'])}}
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script>
$("[id^=check-all]").on('click', function () {
var id = /\d+(?=\D*$)/.exec($(this).attr('id'));
if ($('.permission_category').is(':checked')) {
$('.permission_category').removeAttr('checked');
} else {
$('.permission_category').prop("checked", true);
}
});
$('#activate_streamline').click(function (e){
if (!$('#streamline_modules_to_activate input:checked').length > 0) {
alert("Please check at least one checkbox");
return false;
}
});
</script>
@endpush