2015-10-14 16:15:39 +02:00
|
|
|
@extends('header')
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2017-11-03 09:19:03 +01:00
|
|
|
@section('content')
|
2015-03-16 22:45:25 +01:00
|
|
|
@parent
|
2015-10-14 16:15:39 +02:00
|
|
|
@include('accounts.nav', ['selected' => ACCOUNT_API_TOKENS])
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2015-10-14 16:15:39 +02:00
|
|
|
{!! Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array(
|
2015-03-16 22:45:25 +01:00
|
|
|
'name' => 'required',
|
2015-04-01 21:57:02 +02:00
|
|
|
)); !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2015-04-20 16:34:23 +02:00
|
|
|
<div class="panel panel-default">
|
2015-04-22 21:21:04 +02:00
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans($title) !!}</h3>
|
|
|
|
</div>
|
2015-10-14 19:18:19 +02:00
|
|
|
<div class="panel-body form-padding-right">
|
2015-03-16 22:45:25 +01:00
|
|
|
|
|
|
|
@if ($token)
|
2017-11-03 09:19:03 +01:00
|
|
|
{!! Former::populate($token) !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
@endif
|
|
|
|
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Former::text('name') !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2015-04-20 16:34:23 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-10-01 22:02:22 +02:00
|
|
|
|
2016-04-19 04:35:18 +02:00
|
|
|
@if (Auth::user()->hasFeature(FEATURE_API))
|
2017-11-03 09:19:03 +01:00
|
|
|
<center class="buttons">
|
|
|
|
{!! Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/settings/api_tokens'))->appendIcon(Icon::create('remove-circle'))->large() !!}
|
|
|
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
|
|
|
</center>
|
2015-10-01 22:02:22 +02:00
|
|
|
@else
|
|
|
|
<script>
|
|
|
|
$(function() {
|
|
|
|
$('form.warn-on-exit input').prop('disabled', true);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endif
|
2017-11-03 09:19:03 +01:00
|
|
|
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Former::close() !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2015-05-09 20:25:16 +02:00
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('onReady')
|
|
|
|
$('#name').focus();
|
2017-11-03 09:19:03 +01:00
|
|
|
@stop
|