1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 09:02:28 +01:00

Add subuser list and new subuser views

Holy 🐄 translations are annoying to implement for these views.
This commit is contained in:
Dane Everitt 2017-01-20 23:39:37 -05:00
parent 994588c82d
commit 3d2278ba3e
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
6 changed files with 668 additions and 1 deletions

View File

@ -55,7 +55,7 @@ class SubuserController extends Controller
return view('server.users.index', [
'server' => $server,
'node' => Models\Node::find($server->node),
'subusers' => Models\Subuser::select('subusers.*', 'users.email as a_userEmail')
'subusers' => Models\Subuser::select('subusers.*', 'users.email', 'users.username')
->join('users', 'users.id', '=', 'subusers.user_id')
->where('server_id', $server->id)
->get(),

View File

@ -113,3 +113,11 @@ td.has-progress {
color: #cccccc;
height: 0;
}
.box-header > .form-group {
margin-bottom: 0;
}
.box-header > .form-group > div > p.small {
margin: 0;
}

View File

@ -6,6 +6,166 @@ return [
'header' => 'Server Console',
'header_sub' => 'Control your server in real time.',
],
'users' => [
'header' => 'Manage Users',
'header_sub' => 'Control who can access your server.',
'configure' => 'Configure Permissions',
'list' => 'Accounts with Access',
'add' => 'Add New Subuser',
'new' => [
'header' => 'Add New User',
'header_sub' => 'Add a new user with permissions to this server.',
'email' => 'Email Address',
'email_help' => 'Enter the email address for the user you wish to invite to manage this server.',
'power_header' => 'Power Management',
'file_header' => 'File Management',
'subuser_header' => 'Subuser Management',
'server_header' => 'Server Management',
'task_header' => 'Task Management',
'sftp_header' => 'SFTP Management',
'db_header' => 'Database Management',
'start' => [
'title' => 'Start Server',
'description' => 'Allows user to start the server.',
],
'stop' => [
'title' => 'Stop Server',
'description' => 'Allows user to stop the server.',
],
'restart' => [
'title' => 'Stop Server',
'description' => 'Allows user to restart the server.',
],
'kill' => [
'title' => 'Stop Server',
'description' => 'Allows user to kill the server process.',
],
'command' => [
'title' => 'Send Console Command',
'description' => 'Allows sending a command from the console. If the user does not have stop or restart permissions they cannot send the application\'s stop command.',
],
'list_files' => [
'title' => 'List Files',
'description' => 'Allows user to list all files and folders on the server but not view file contents.',
],
'edit_files' => [
'title' => 'Edit Files',
'description' => 'Allows user to open a file for viewing only.',
],
'save_files' => [
'title' => 'Save Files',
'description' => 'Allows user to save modified file contents.',
],
'move_files' => [
'title' => 'Rename & Move Files',
'description' => 'Allows user to move and rename files and folders on the filesystem.',
],
'copy_files' => [
'title' => 'Copy Files',
'description' => 'Allows user to copy files and folders on the filesystem.',
],
'compress_files' => [
'title' => 'Compress Files',
'description' => 'Allows user to make archives of files and folders on the system.',
],
'decompress_files' => [
'title' => 'Decompress Files',
'description' => 'Allows user to decompress .zip and .tar(.gz) archives.',
],
'create_files' => [
'title' => 'Create Files',
'description' => 'Allows user to create a new file within the panel.',
],
'upload_files' => [
'title' => 'Upload Files',
'description' => 'Allows user to upload files through the file manager.',
],
'delete_files' => [
'title' => 'Delete Files',
'description' => 'Allows user to delete files from the system.',
],
'download_files' => [
'title' => 'Download Files',
'description' => 'Allows user to download files. If a user is given this permission they can download and view file contents even if that permission is not assigned on the panel.',
],
'list_subusers' => [
'title' => 'List Subusers',
'description' => 'Allows user to view a listing of all subusers assigned to the server.',
],
'view_subuser' => [
'title' => 'View Subuser',
'description' => 'Allows user to view permissions assigned to subusers.',
],
'edit_subuser' => [
'title' => 'Edit Subuser',
'description' => 'Allows a user to edit permissions assigned to other subusers.',
],
'create_subuser' => [
'title' => 'Create Subuser',
'description' => 'Allows user to create additional subusers on the server.',
],
'delete_subuser' => [
'title' => 'Delete Subuser',
'description' => 'Allows a user to delete other subusers on the server.',
],
'set_connection' => [
'title' => 'Set Default Connection',
'description' => 'Allows user to set the default connection used for a server as well as view avaliable ports.',
],
'view_startup' => [
'title' => 'View Startup Command',
'description' => 'Allows user to view the startup command and associated variables for a server.',
],
'edit_startup' => [
'title' => 'Edit Startup Command',
'description' => 'Allows a user to modify startup variables for a server.',
],
'list_tasks' => [
'title' => 'List Tasks',
'description' => 'Allows a user to list all tasks (enabled and disabled) on a server.',
],
'view_task' => [
'title' => 'View Task',
'description' => 'Allows a user to view a specific task\'s details.',
],
'toggle_task' => [
'title' => 'Toggle Task',
'description' => 'Allows a user to toggle a task on or off.',
],
'queue_task' => [
'title' => 'Queue Task',
'description' => 'Allows a user to queue a task to run on next cycle.',
],
'create_task' => [
'title' => 'Create Task',
'description' => 'Allows a user to create new tasks.',
],
'delete_task' => [
'title' => 'Delete Task',
'description' => 'Allows a user to delete a task.',
],
'view_sftp' => [
'title' => 'View SFTP Details',
'description' => 'Allows user to view the server\'s SFTP information but not the password.',
],
'view_sftp_password' => [
'title' => 'View SFTP Password',
'description' => 'Allows user to view the SFTP password for the server.',
],
'reset_sftp' => [
'title' => 'Reset SFTP Password',
'description' => 'Allows user to change the SFTP password for the server.',
],
'view_databases' => [
'title' => 'View Database Details',
'description' => 'Allows user to view all databases associated with this server including the usernames and passwords for the databases.',
],
'reset_db_password' => [
'title' => 'Reset Database Password',
'description' => 'Allows a user to reset passwords for databases.',
],
],
],
'files' => [
'header' => 'File Manager',
'header_sub' => 'Manage all of your files directly from the web.',

View File

@ -50,4 +50,5 @@ return [
'make_primary' => 'Make Primary',
'none' => 'None',
'cancel' => 'Cancel',
'created_at' => 'Created At',
];

View File

@ -0,0 +1,86 @@
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.master')
@section('title')
@lang('server.users.header')
@endsection
@section('content-header')
<h1>@lang('server.users.header')<small>@lang('server.users.header_sub')</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
<li class="active">@lang('navigation.server.subusers')</li>
</ol>
@endsection
@section('content')
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.list')</h3>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tbody>
<tr>
<th></th>
<th>@lang('strings.username')</th>
<th>@lang('strings.email')</th>
<th class="hidden-xs">@lang('strings.created_at')</th>
@can('view-subuser', $server)<th></th>@endcan
@can('delete-subuser', $server)<th></th>@endcan
</tr>
@foreach($subusers as $user)
<tr>
<td class="text-center middle"><img class="img-circle" src="https://www.gravatar.com/avatar/{{ md5($user->email) }}?s=128" style="height:20px;" alt="User Image"></td>
<td class="middle">{{ $user->username }}
<td class="middle"><code>{{ $user->email }}</code></td>
<td class="middle hidden-xs">{{ $user->created_at }}</td>
@can('view-subuser', $server)
<td class="text-center middle">
<a href="{{ route('server.subusers.view', ['server' => $server->uuidShort, 'id' => md5($user->id)]) }}">
<button class="btn btn-xs btn-primary">@lang('server.users.configure')</button>
</a>
</td>
@endcan
@can('delete-subuser', $server)
<td class="text-center middle">
<a href="#/delete/{{ md5($user->id) }}" data-action="delete" data-id="{{ md5($user->id) }}">
<button class="btn btn-xs btn-danger"><i class="fa fa-trash-o"></i></button>
</a>
</td>
@endcan
</tr>
@endforeach
</tbody>
</table>
</div>
@can('create-subuser', $server)
<div class="box-footer with-border">
<a href="{{ route('server.subusers.new', $server->uuidShort) }}"><button class="btn btn-sm btn-success pull-right">@lang('server.users.add')</button></a>
</div>
@endcan
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,412 @@
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.master')
@section('title')
@lang('server.users.new.header')
@endsection
@section('content-header')
<h1>@lang('server.users.new.header')<small>@lang('server.users.new.header_sub')</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('index') }}">@lang('strings.home')</a></li>
<li><a href="{{ route('server.index', $server->uuidShort) }}">{{ $server->name }}</a></li>
<li><a href="{{ route('server.subusers', $server->uuidShort) }}">@lang('navigation.server.subusers')</a></li>
<li class="active">@lang('server.users.add')</li>
</ol>
@endsection
@section('content')
<?php $oldInput = array_flip(is_array(old('permissions')) ? old('permissions') : []) ?>
<form action="{{ route('server.subusers.new', $server->uuidShort) }}" method="POST">
<div class="row">
<div class="col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<div class="form-group">
<label class="control-label">@lang('server.users.new.email')</label>
<div>
<input type="email" class="form-control" name="new_password_confirmation" />
<p class="text-muted small">@lang('server.users.new.email_help')</p>
</div>
</div>
</div>
<div class="box-body">
<div class="btn-group pull-left">
<a id="selectAllCheckboxes" class="btn btn-sm btn-default">@lang('strings.select_all')</a>
<a id="unselectAllCheckboxes" class="btn btn-sm btn-default">@lang('strings.select_none')</a>
</div>
<input type="submit" name="submit" value="@lang('server.users.add')" class="pull-right btn btn-sm btn-primary" />
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
{{-- Left Side --}}
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.new.power_header')</h3>
</div>
<div class="box-body">
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['power-start']))checked="checked"@endif value="power-start" />
<strong>@lang('server.users.new.start.title')</strong>
<p class="text-muted small">@lang('server.users.new.start.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['power-stop']))checked="checked"@endif value="power-stop" />
<strong>@lang('server.users.new.stop.title')</strong>
<p class="text-muted small">@lang('server.users.new.stop.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['power-restart']))checked="checked"@endif value="power-restart" />
<strong>@lang('server.users.new.restart.title')</strong>
<p class="text-muted small">@lang('server.users.new.restart.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['power-kill']))checked="checked"@endif value="power-kill" />
<strong>@lang('server.users.new.kill.title')</strong>
<p class="text-muted small">@lang('server.users.new.kill.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['send-command']))checked="checked"@endif value="send-command" />
<strong>@lang('server.users.new.command.title')</strong>
<p class="text-muted small">@lang('server.users.new.command.description')</p>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.new.subuser_header')</h3>
</div>
<div class="box-body">
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['list-subusers']))checked="checked"@endif value="list-subusers" />
<strong>@lang('server.users.new.list_subusers.title')</strong>
<p class="text-muted small">@lang('server.users.new.list_subusers.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['view-subuser']))checked="checked"@endif value="view-subuser" />
<strong>@lang('server.users.new.view_subuser.title')</strong>
<p class="text-muted small">@lang('server.users.new.view_subuser.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['edit-subuser']))checked="checked"@endif value="edit-subuser" />
<strong>@lang('server.users.new.edit_subuser.title')</strong>
<p class="text-muted small">@lang('server.users.new.edit_subuser.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['create-subuser']))checked="checked"@endif value="create-subuser" />
<strong>@lang('server.users.new.create_subuser.title')</strong>
<p class="text-muted small">@lang('server.users.new.create_subuser.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['delete-subuser']))checked="checked"@endif value="delete-subuser" />
<strong>@lang('server.users.new.delete_subuser.title')</strong>
<p class="text-muted small">@lang('server.users.new.delete_subuser.description')</p>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.new.server_header')</h3>
</div>
<div class="box-body">
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['set-connection']))checked="checked"@endif value="set-connection" />
<strong>@lang('server.users.new.set_connection.title')</strong>
<p class="text-muted small">@lang('server.users.new.set_connection.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['view-startup']))checked="checked"@endif value="view-startup" />
<strong>@lang('server.users.new.view_startup.title')</strong>
<p class="text-muted small">@lang('server.users.new.view_startup.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['edit-startup']))checked="checked"@endif value="edit-startup" />
<strong>@lang('server.users.new.edit_startup.title')</strong>
<p class="text-muted small">@lang('server.users.new.edit_startup.description')</p>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.new.sftp_header')</h3>
</div>
<div class="box-body">
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['view-sftp']))checked="checked"@endif value="view-sftp" />
<strong>@lang('server.users.new.view_sftp.title')</strong>
<p class="text-muted small">@lang('server.users.new.view_sftp.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['view-sftp-password']))checked="checked"@endif value="view-sftp-password" />
<span class="label label-danger">@lang('strings.danger')</span>
<strong>@lang('server.users.new.view_sftp_password.title')</strong>
<p class="text-muted small">@lang('server.users.new.view_sftp_password.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['reset-sftp']))checked="checked"@endif value="reset-sftp" />
<strong>@lang('server.users.new.reset_sftp.title')</strong>
<p class="text-muted small">@lang('server.users.new.reset_sftp.description')</p>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
{{-- Right Side --}}
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.new.file_header')</h3>
</div>
<div class="box-body">
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['list-files']))checked="checked"@endif value="list-files" />
<strong>@lang('server.users.new.list_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.list_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['edit-files']))checked="checked"@endif value="edit-files" />
<strong>@lang('server.users.new.edit_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.edit_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['save-files']))checked="checked"@endif value="save-files" />
<strong>@lang('server.users.new.save_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.save_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['move-files']))checked="checked"@endif value="move-files" />
<strong>@lang('server.users.new.move_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.move_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['copy-files']))checked="checked"@endif value="copy-files" />
<strong>@lang('server.users.new.copy_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.copy_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['compress-files']))checked="checked"@endif value="compress-files" />
<strong>@lang('server.users.new.compress_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.compress_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['decompress-files']))checked="checked"@endif value="decompress-files" />
<strong>@lang('server.users.new.decompress_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.decompress_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['create-files']))checked="checked"@endif value="create-files" />
<strong>@lang('server.users.new.create_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.create_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['upload-files']))checked="checked"@endif value="upload-files" />
<strong>@lang('server.users.new.upload_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.upload_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['delete-files']))checked="checked"@endif value="delete-files" />
<span class="label label-danger">@lang('strings.danger')</span>
<strong>@lang('server.users.new.delete_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.delete_files.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['download-files']))checked="checked"@endif value="download-files" />
<span class="label label-danger">@lang('strings.danger')</span>
<strong>@lang('server.users.new.download_files.title')</strong>
<p class="text-muted small">@lang('server.users.new.download_files.description')</p>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.new.task_header')</h3>
</div>
<div class="box-body">
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['list-tasks']))checked="checked"@endif value="list-tasks" />
<strong>@lang('server.users.new.list_tasks.title')</strong>
<p class="text-muted small">@lang('server.users.new.list_tasks.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['view-task']))checked="checked"@endif value="view-task" />
<strong>@lang('server.users.new.view_task.title')</strong>
<p class="text-muted small">@lang('server.users.new.view_task.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['toggle-task']))checked="checked"@endif value="toggle-task" />
<strong>@lang('server.users.new.toggle_task.title')</strong>
<p class="text-muted small">@lang('server.users.new.toggle_task.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['queue-task']))checked="checked"@endif value="queue-task" />
<strong>@lang('server.users.new.queue_task.title')</strong>
<p class="text-muted small">@lang('server.users.new.queue_task.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['create-task']))checked="checked"@endif value="create-task" />
<strong>@lang('server.users.new.create_task.title')</strong>
<p class="text-muted small">@lang('server.users.new.create_task.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['delete-task']))checked="checked"@endif value="delete-task" />
<span class="label label-danger">@lang('strings.danger')</span>
<strong>@lang('server.users.new.delete_task.title')</strong>
<p class="text-muted small">@lang('server.users.new.delete_task.description')</p>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">@lang('server.users.new.db_header')</h3>
</div>
<div class="box-body">
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['view-databases']))checked="checked"@endif value="view-databases" />
<span class="label label-danger">@lang('strings.danger')</span>
<strong>@lang('server.users.new.view_databases.title')</strong>
<p class="text-muted small">@lang('server.users.new.view_databases.description')</p>
</label>
</div>
<div class="checkbox">
<label>
<input name="permissions[]" type="checkbox" @if(isset($oldInput['reset-db-password']))checked="checked"@endif value="reset-db-password" />
<span class="label label-danger">@lang('strings.danger')</span>
<strong>@lang('server.users.new.reset_db_password.title')</strong>
<p class="text-muted small">@lang('server.users.new.reset_db_password.description')</p>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
@endsection
@section('footer-scripts')
@parent
<script type="text/javascript">
$(document).ready(function () {
$('#selectAllCheckboxes').on('click', function () {
$('input[type=checkbox]').prop('checked', true);
});
$('#unselectAllCheckboxes').on('click', function () {
$('input[type=checkbox]').prop('checked', false);
});
})
</script>
@endsection