1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 23:22:52 +01:00
invoiceninja/resources/views/accounts/subscription.blade.php

99 lines
4.6 KiB
PHP
Raw Normal View History

2017-11-28 08:57:02 +01:00
@extends('header')
@section('content')
@parent
@include('accounts.nav', ['selected' => ACCOUNT_API_TOKENS])
{!! Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array(
'event_id' => 'required',
'target_url' => 'required|url',
2018-01-14 19:17:59 +01:00
//'format' => 'required',
2017-11-28 08:57:02 +01:00
)); !!}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans($title) !!}</h3>
</div>
<div class="panel-body form-padding-right">
@if ($subscription)
{!! Former::populate($subscription) !!}
@endif
{!! Former::select('event_id')
->options([
trans('texts.clients') => [
2017-11-29 11:44:28 +01:00
EVENT_CREATE_CLIENT => trans('texts.subscription_event_' . EVENT_CREATE_CLIENT),
2017-12-26 15:35:31 +01:00
EVENT_UPDATE_CLIENT => trans('texts.subscription_event_' . EVENT_UPDATE_CLIENT),
EVENT_DELETE_CLIENT => trans('texts.subscription_event_' . EVENT_DELETE_CLIENT),
2017-11-28 08:57:02 +01:00
],
trans('texts.invoices') => [
2017-11-29 11:44:28 +01:00
EVENT_CREATE_INVOICE => trans('texts.subscription_event_' . EVENT_CREATE_INVOICE),
EVENT_UPDATE_INVOICE => trans('texts.subscription_event_' . EVENT_UPDATE_INVOICE),
EVENT_DELETE_INVOICE => trans('texts.subscription_event_' . EVENT_DELETE_INVOICE),
2017-11-28 08:57:02 +01:00
],
trans('texts.payments') => [
2017-11-29 11:44:28 +01:00
EVENT_CREATE_PAYMENT => trans('texts.subscription_event_' . EVENT_CREATE_PAYMENT),
2017-12-26 15:35:31 +01:00
EVENT_DELETE_PAYMENT => trans('texts.subscription_event_' . EVENT_DELETE_PAYMENT),
2017-11-28 08:57:02 +01:00
],
trans('texts.quotes') => [
2017-11-29 11:44:28 +01:00
EVENT_CREATE_QUOTE => trans('texts.subscription_event_' . EVENT_CREATE_QUOTE),
EVENT_UPDATE_QUOTE => trans('texts.subscription_event_' . EVENT_UPDATE_QUOTE),
2017-12-31 10:01:02 +01:00
EVENT_APPROVE_QUOTE => trans('texts.subscription_event_' . EVENT_APPROVE_QUOTE),
2017-11-29 11:44:28 +01:00
EVENT_DELETE_QUOTE => trans('texts.subscription_event_' . EVENT_DELETE_QUOTE),
2017-12-26 15:35:31 +01:00
],
trans('texts.tasks') => [
EVENT_CREATE_TASK => trans('texts.subscription_event_' . EVENT_CREATE_TASK),
EVENT_UPDATE_TASK => trans('texts.subscription_event_' . EVENT_UPDATE_TASK),
EVENT_DELETE_TASK => trans('texts.subscription_event_' . EVENT_DELETE_TASK),
],
trans('texts.vendors') => [
EVENT_CREATE_VENDOR => trans('texts.subscription_event_' . EVENT_CREATE_VENDOR),
EVENT_UPDATE_VENDOR => trans('texts.subscription_event_' . EVENT_UPDATE_VENDOR),
EVENT_DELETE_VENDOR => trans('texts.subscription_event_' . EVENT_DELETE_VENDOR),
],
trans('texts.expenses') => [
EVENT_CREATE_EXPENSE => trans('texts.subscription_event_' . EVENT_CREATE_EXPENSE),
EVENT_UPDATE_EXPENSE => trans('texts.subscription_event_' . EVENT_UPDATE_EXPENSE),
EVENT_DELETE_EXPENSE => trans('texts.subscription_event_' . EVENT_DELETE_EXPENSE),
],
2017-11-28 08:57:02 +01:00
])
->label('event') !!}
{!! Former::text('target_url')
->placeholder('https://example.com')!!}
2018-01-14 19:17:59 +01:00
<!--
2018-01-11 08:58:43 +01:00
{!! Former::select('format')
->options([
SUBSCRIPTION_FORMAT_JSON => SUBSCRIPTION_FORMAT_JSON,
SUBSCRIPTION_FORMAT_UBL => SUBSCRIPTION_FORMAT_UBL
])
->help('target_url_help') !!}
2018-01-14 19:17:59 +01:00
-->
2017-11-28 08:57:02 +01:00
</div>
</div>
@if (Auth::user()->hasFeature(FEATURE_API))
<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>
@else
<script>
$(function() {
$('form.warn-on-exit input').prop('disabled', true);
});
</script>
@endif
{!! Former::close() !!}
@stop
@section('onReady')
$('#name').focus();
@stop