143 lines
5.4 KiB
PHP
143 lines
5.4 KiB
PHP
@extends($layout)
|
|
|
|
@section('content')
|
|
|
|
<div style="min-width:700px;">
|
|
|
|
<h4 class="widgettitle title-light"><i class="fa fa-key"></i> {!! __('headlines.api_key') !!}</h4>
|
|
|
|
{!! $tpl->displayNotification() !!}
|
|
|
|
<form action="{{ BASE_URL }}/api/apiKey/{{ (int) $_GET['id'] }}" method="post" class="stdform formModal" >
|
|
<input type="hidden" name="{{ session('formTokenName') }}" value="{{ session('formTokenValue') }}" />
|
|
<input type="hidden" name="save" value="1" />
|
|
|
|
<div class="row" >
|
|
<div class="col-md-6">
|
|
|
|
<h4 class="widgettitle title-light">{!! __('label.basic_information') !!}</h4>
|
|
|
|
<label>{!! __('label.key') !!}</label><div class="clearfix"></div>
|
|
lt_{{ substr($values['user'], 0, 5) }}***<br /><br />
|
|
|
|
<label for="firstname">{!! __('label.key_name') !!}</label><div class="clearfix"></div>
|
|
<x-global::forms.text-input
|
|
name="firstname" id="firstname"
|
|
value="{{ $values['firstname'] }}" /><br />
|
|
|
|
|
|
<label for="role">{!! __('label.role') !!}</label><div class="clearfix"></div>
|
|
<select name="role" id="role">
|
|
|
|
@foreach ($roles as $key => $role)
|
|
<option value="{{ $key }}"
|
|
@if ($key == $values['role'])
|
|
selected="selected"
|
|
@endif
|
|
>
|
|
{!! __('label.roles.' . $role) !!}
|
|
</option>
|
|
@endforeach
|
|
|
|
</select> <br />
|
|
|
|
<label for="status">{!! __('label.status') !!}</label><div class="clearfix"></div>
|
|
<select name="status" id="status">
|
|
<option value="a"
|
|
@if (strtolower($values['status']) == 'a')
|
|
selected="selected"
|
|
@endif
|
|
>
|
|
{!! __('label.active') !!}
|
|
</option>
|
|
|
|
<option value=""
|
|
@if (strtolower($values['status']) == '')
|
|
selected="selected"
|
|
@endif
|
|
>
|
|
{!! __('label.deactivated') !!}
|
|
</option>
|
|
|
|
</select>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<p class="stdformbutton">
|
|
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.save')" name="save" id="save" />
|
|
</p>
|
|
|
|
</div>
|
|
<div class="col-md-6">
|
|
|
|
<h4 class="widgettitle title-light">{!! __('label.project_access') !!}</h4>
|
|
|
|
<div class="scrollableItemList">
|
|
@php
|
|
$currentClient = '';
|
|
$i = 0;
|
|
$containerOpen = false;
|
|
@endphp
|
|
@foreach ($allProjects as $row)
|
|
@if ($currentClient != $row['clientName'])
|
|
@if ($i > 0 && $containerOpen)
|
|
</div>
|
|
@php $containerOpen = false; @endphp
|
|
@endif
|
|
<h3 id="accordion_link_{{ $i }}">
|
|
<a href="#" onclick="accordionToggle({{ $i }});" id="accordion_toggle_{{ $i }}"><i class="fa fa-angle-down"></i> {{ $tpl->escape($row['clientName']) }}</a>
|
|
</h3>
|
|
<div id="accordion_{{ $i }}" class="simpleAccordionContainer">
|
|
@php
|
|
$currentClient = $row['clientName'];
|
|
$containerOpen = true;
|
|
@endphp
|
|
@endif
|
|
|
|
<div class="item">
|
|
<input type="checkbox" name="projects[]" id="project_{{ $row['id'] }}" value="{{ $row['id'] }}"
|
|
@if (is_array($relations) === true && in_array($row['id'], $relations) === true)
|
|
checked="checked"
|
|
@endif
|
|
/><label for="project_{{ $row['id'] }}">{{ $tpl->escape($row['name']) }}</label>
|
|
<div class="clearall"></div>
|
|
</div>
|
|
@php $i++; @endphp
|
|
@endforeach
|
|
@if ($containerOpen)
|
|
</div>
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
@once
|
|
@push('scripts')
|
|
<script>
|
|
jQuery(".noClickProp.dropdown-menu").on("click", function(e) {
|
|
e.stopPropagation();
|
|
});
|
|
|
|
function accordionToggle(id) {
|
|
let currentLink = jQuery("#accordion_toggle_"+id).find("i.fa");
|
|
if (currentLink.hasClass("fa-angle-right")){
|
|
currentLink.removeClass("fa-angle-right");
|
|
currentLink.addClass("fa-angle-down");
|
|
jQuery('#accordion_'+id).slideDown("fast");
|
|
} else {
|
|
currentLink.removeClass("fa-angle-down");
|
|
currentLink.addClass("fa-angle-right");
|
|
jQuery('#accordion_'+id).slideUp("fast");
|
|
}
|
|
}
|
|
</script>
|
|
@endpush
|
|
@endonce
|
|
|
|
@endsection
|