invoiceninja/resources/views/accounts/token.blade.php

46 lines
1.1 KiB
PHP
Raw Normal View History

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