@extends('header')
@section('content')
@parent
@include('accounts.nav', ['selected' => ACCOUNT_API_TOKENS])
{!! Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array(
'name' => 'required',
)); !!}
{!! trans($title) !!}
@if ($token)
{!! Former::populate($token) !!}
@endif
{!! Former::text('name') !!}
@if (Auth::user()->hasFeature(FEATURE_API))
{!! 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')) !!}
@else
@endif
{!! Former::close() !!}
@stop
@section('onReady')
$('#name').focus();
@stop