57 lines
2.9 KiB
PHP
57 lines
2.9 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', __('integrationhub::lang.add') . ' — ' . __('integrationhub::lang.odata_tokens'))
|
|
|
|
@section('content')
|
|
@include('integrationhub::layouts.nav')
|
|
|
|
<section class="content no-print mt-page">
|
|
<div class="mt-page-header">
|
|
<h1><i class="fas fa-plus" style="color:#8b5cf6;margin-left:8px;"></i> @lang('integrationhub::lang.add') @lang('integrationhub::lang.odata_tokens')</h1>
|
|
<a href="{{ action([\Modules\IntegrationHub\Http\Controllers\ODataController::class, 'indexTokens']) }}" class="btn btn-default">
|
|
<i class="fa fa-arrow-right"></i> @lang('integrationhub::lang.cancel')
|
|
</a>
|
|
</div>
|
|
|
|
<div class="mt-card">
|
|
<div class="mt-card-body">
|
|
{!! Form::open(['url' => action([\Modules\IntegrationHub\Http\Controllers\ODataController::class, 'storeToken']), 'method' => 'post']) !!}
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
{!! Form::label('name', __('integrationhub::lang.name') . ':') !!}
|
|
{!! Form::text('name', null, ['class' => 'form-control', 'required', 'placeholder' => __('integrationhub::lang.token_name_placeholder')]) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
{!! Form::label('expires_at', __('integrationhub::lang.expires_at') . ':') !!}
|
|
{!! Form::text('expires_at', null, ['class' => 'form-control datetimepicker', 'readonly']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="form-group">
|
|
{!! Form::label('scopes', __('integrationhub::lang.scopes') . ':') !!}
|
|
@php
|
|
$scopeOptions = ['*' => __('integrationhub::lang.all_datasets')];
|
|
foreach ($datasets as $ds) {
|
|
if ($ds !== 'executive_cockpit') {
|
|
$scopeOptions[$ds] = __('integrationhub::lang.'.$ds);
|
|
}
|
|
}
|
|
@endphp
|
|
{!! Form::select('scopes[]', $scopeOptions, ['*'], ['class' => 'form-control select2', 'multiple' => true, 'style' => 'width:100%']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> @lang('integrationhub::lang.save')</button>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script>$(function(){ $('.select2').select2(); $('.datetimepicker').datetimepicker({ format: moment_date_format + ' ' + moment_time_format, ignoreReadonly: true }); });</script>
|
|
@endsection
|