2016-03-25 01:18:05 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
2022-01-06 03:35:37 -08:00
|
|
|
{{ trans('general.ldap_user_sync') }}
|
2016-03-25 01:18:05 -07:00
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
|
|
|
|
@section('header_right')
|
|
|
|
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
|
|
|
{{ trans('general.back') }}</a>
|
|
|
|
@stop
|
|
|
|
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<div class="row">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="col-md-9">
|
|
|
|
@if ($snipeSettings->ldap_enabled == 0)
|
|
|
|
{{ trans('admin/users/message.ldap_not_configured') }}
|
|
|
|
@else
|
2016-03-25 01:18:05 -07:00
|
|
|
<form class="form-horizontal" role="form" method="post" action="" id="ldap-form">
|
2016-12-27 12:03:47 -08:00
|
|
|
{{csrf_field()}}
|
|
|
|
<div class="box box-default">
|
|
|
|
<div class="box-body">
|
|
|
|
<!-- location_id-->
|
|
|
|
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : '' }}">
|
2018-12-06 14:05:43 -08:00
|
|
|
|
2020-04-23 22:44:28 -07:00
|
|
|
<div class="col-md-12">
|
2018-12-06 14:05:43 -08:00
|
|
|
<!-- Location -->
|
2017-10-28 11:17:52 -07:00
|
|
|
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
2020-04-23 22:44:28 -07:00
|
|
|
|
|
|
|
<div class="box-footer">
|
|
|
|
<div class="text-left col-md-6">
|
|
|
|
<a class="btn btn-link" href="{{ route('users.index') }}">{{ trans('button.cancel') }}</a>
|
|
|
|
</div>
|
|
|
|
<div class="text-right col-md-6">
|
|
|
|
<button type="submit" class="btn btn-primary" id="sync">
|
2022-01-06 03:35:37 -08:00
|
|
|
<i id="sync-button-icon" class="fas fa-sync-alt icon-white" aria-hidden="true"></i> <span id="sync-button-text">{{ trans('general.synchronize') }}</span>
|
2020-04-23 22:44:28 -07:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<p>
|
|
|
|
{{ trans('admin/users/general.ldap_config_text') }}
|
|
|
|
</p>
|
2022-01-06 03:35:37 -08:00
|
|
|
<p><a href="{{ route('settings.ldap.index') }}">{{ trans('admin/settings/general.ldap_settings_link') }}</a></p>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-06-08 16:16:49 -07:00
|
|
|
@if (Session::get('summary'))
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2017-06-08 16:16:49 -07:00
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
<div class="box box-default">
|
|
|
|
<div class="box-header with-border">
|
2022-01-06 03:35:37 -08:00
|
|
|
<h2 class="box-title">{{ trans('general.sync_results') }}</h2>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div><!-- /.box-header -->
|
|
|
|
<div class="box-body">
|
|
|
|
<table class="table table-bordered">
|
2016-12-27 12:03:47 -08:00
|
|
|
<tr>
|
2022-01-06 03:35:37 -08:00
|
|
|
<th>{{ trans('general.username') }}</th><th>{{ trans('general.employee_number') }}</th>
|
|
|
|
<th>{{ trans('general.firstname') }}</th><th>{{ trans('general.lastname') }}</th>
|
|
|
|
<th>{{ trans('general.email') }}</th><th>{{ trans('general.notes') }}</th>
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
@foreach (Session::get('summary') as $entry)
|
2021-05-12 19:15:39 -07:00
|
|
|
<tr {!! ($entry['status']=='success') ? 'class="success"' : 'class="danger"' !!}>
|
2016-12-27 12:03:47 -08:00
|
|
|
<td>{{ $entry['username'] }}</td>
|
|
|
|
<td>{{ $entry['employee_number'] }}</td>
|
|
|
|
<td>{{ $entry['firstname'] }}</td>
|
|
|
|
<td>{{ $entry['lastname'] }}</td>
|
|
|
|
<td>{{ $entry['email'] }}</td>
|
|
|
|
<td>
|
|
|
|
@if ($entry['status']=='success')
|
2021-09-26 01:11:08 -07:00
|
|
|
<i class="fas fa-check"></i> {!! $entry['note'] !!}
|
2016-12-27 12:03:47 -08:00
|
|
|
@else
|
2020-04-01 03:21:15 -07:00
|
|
|
<span class="alert-msg" aria-hidden="true">{!! $entry['note'] !!}</span>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endif
|
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2016-03-25 01:18:05 -07:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2017-06-08 16:16:49 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
2017-06-08 16:16:49 -07:00
|
|
|
@endif
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@stop
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
@section('moar_scripts')
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function () {
|
|
|
|
$("#sync").click(function () {
|
|
|
|
$("#sync").removeClass("btn-warning");
|
|
|
|
$("#sync").addClass("btn-success");
|
|
|
|
$("#sync-button-icon").addClass("fa-spin");
|
2022-01-06 03:35:37 -08:00
|
|
|
$("#sync-button-text").html("{{ trans('general.processing') }}");
|
2016-03-25 01:18:05 -07:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
@stop
|