diff --git a/README.md b/README.md index fb760f8..243e46d 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,6 @@ On nginx use `fastcgi_param` to pass the parameter directly to PHP. fastcgi_param APP_NAME "VirtualHost Two"; } - > **Warning** Do not create a cache of your configuration (using `artisan config:cache`) if you have a multi-environnement setup. > The cache is always having the priority on the variables set in the configuration files. diff --git a/flexiapi/app/Http/Controllers/Admin/ContactsListController.php b/flexiapi/app/Http/Controllers/Admin/ContactsListController.php index c1bb0fe..6c8aee6 100644 --- a/flexiapi/app/Http/Controllers/Admin/ContactsListController.php +++ b/flexiapi/app/Http/Controllers/Admin/ContactsListController.php @@ -91,7 +91,6 @@ class ContactsListController extends Controller return redirect()->route('admin.contacts_lists.index'); } - public function delete(int $id) { return view('admin.contacts_list.delete', [ diff --git a/flexiapi/composer.json b/flexiapi/composer.json index e795baa..ba0956e 100644 --- a/flexiapi/composer.json +++ b/flexiapi/composer.json @@ -14,7 +14,6 @@ "endroid/qr-code": "^4.1", "fakerphp/faker": "^1.21", "laravel/framework": "^9.5", - "laravelcollective/html": "^6.4", "namoshek/laravel-redis-sentinel": "^0.1.2", "ovh/ovh": "^3.0", "parsedown/laravel": "^1.2", diff --git a/flexiapi/composer.lock b/flexiapi/composer.lock index 40d4c9a..1a44f76 100644 --- a/flexiapi/composer.lock +++ b/flexiapi/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "88c676507ce76ebe1497a823ace9ff24", + "content-hash": "a31eb010c7ab5e6155a75412b6da7e9c", "packages": [ { "name": "anhskohbo/no-captcha", @@ -1142,28 +1142,28 @@ }, { "name": "evenement/evenement", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/igorw/evenement.git", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9 || ^6" }, "type": "library", "autoload": { - "psr-0": { - "Evenement": "src" + "psr-4": { + "Evenement\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1183,9 +1183,9 @@ ], "support": { "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/master" + "source": "https://github.com/igorw/evenement/tree/v3.0.2" }, - "time": "2017-07-23T21:35:13+00:00" + "time": "2023-08-08T05:53:35+00:00" }, { "name": "fakerphp/faker", @@ -2055,79 +2055,6 @@ }, "time": "2023-07-14T13:56:28+00:00" }, - { - "name": "laravelcollective/html", - "version": "v6.4.1", - "source": { - "type": "git", - "url": "https://github.com/LaravelCollective/html.git", - "reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/64ddfdcaeeb8d332bd98bef442bef81e39c3910b", - "reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b", - "shasum": "" - }, - "require": { - "illuminate/http": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/routing": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/session": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/view": "^6.0|^7.0|^8.0|^9.0|^10.0", - "php": ">=7.2.5" - }, - "require-dev": { - "illuminate/database": "^6.0|^7.0|^8.0|^9.0|^10.0", - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~8.5|^9.5.10" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - }, - "laravel": { - "providers": [ - "Collective\\Html\\HtmlServiceProvider" - ], - "aliases": { - "Form": "Collective\\Html\\FormFacade", - "Html": "Collective\\Html\\HtmlFacade" - } - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Collective\\Html\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adam Engebretson", - "email": "adam@laravelcollective.com" - }, - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "HTML and Form Builders for the Laravel Framework", - "homepage": "https://laravelcollective.com", - "support": { - "issues": "https://github.com/LaravelCollective/html/issues", - "source": "https://github.com/LaravelCollective/html" - }, - "abandoned": "spatie/laravel-html", - "time": "2023-04-25T02:46:11+00:00" - }, { "name": "league/commonmark", "version": "2.4.0", diff --git a/flexiapi/public/css/far.css b/flexiapi/public/css/far.css index 23840f4..e7d9317 100644 --- a/flexiapi/public/css/far.css +++ b/flexiapi/public/css/far.css @@ -602,7 +602,6 @@ table thead { border-bottom: 1px solid var(--second-4); } - table tr:nth-child(2n) { background-color: var(--grey-1); } @@ -647,7 +646,6 @@ table tr.empty td:before { display: inherit !important; } - .on_mobile.material-icons { display: inline !important; } diff --git a/flexiapi/resources/views/account/creation_request_token/check.blade.php b/flexiapi/resources/views/account/creation_request_token/check.blade.php index 99f3500..e9c41d5 100644 --- a/flexiapi/resources/views/account/creation_request_token/check.blade.php +++ b/flexiapi/resources/views/account/creation_request_token/check.blade.php @@ -3,11 +3,13 @@ @section('content')
- {!! Form::open(['route' => 'account.creation_request_token.validate']) !!} - {!! Form::hidden('account_creation_request_token', $account_creation_request_token->token) !!} +
+@csrf + + @include('parts.captcha') - {!! Form::submit('I\'m not a robot', ['class' => 'btn btn-primary btn-centered']) !!} - {!! Form::close() !!} + +
@endsection \ No newline at end of file diff --git a/flexiapi/resources/views/account/dashboard.blade.php b/flexiapi/resources/views/account/dashboard.blade.php index 6992944..1508473 100644 --- a/flexiapi/resources/views/account/dashboard.blade.php +++ b/flexiapi/resources/views/account/dashboard.blade.php @@ -67,9 +67,11 @@ @endforeach - {!! Form::open(['route' => 'account.auth_tokens.create']) !!} +
+@csrf + - {!! Form::close() !!}--> +
--> @@ -79,16 +81,18 @@

You can generate an API key and use it to request the different API endpoints, check the related API documentation to know how to use that key.

- {!! Form::open(['route' => 'account.api_key.generate']) !!} +
+@csrf +
- apiKey) value="{{ $account->apiKey->key }}" @endif>
- {!! Form::close() !!} +
@include('parts.account_variables', ['account' => $account]) diff --git a/flexiapi/resources/views/account/delete.blade.php b/flexiapi/resources/views/account/delete.blade.php index bdc946e..3cf2e47 100644 --- a/flexiapi/resources/views/account/delete.blade.php +++ b/flexiapi/resources/views/account/delete.blade.php @@ -1,22 +1,23 @@ @extends('layouts.main') @section('content') +

Delete my account

-

Delete my account

+
+@csrf -{!! Form::open(['route' => 'account.destroy', 'method' => 'delete']) !!} + @method('delete') -

You are going to permanently delete your account.

-

Please enter your complete username to confirm: {{ $account->identifier }}.

+

You are going to permanently delete your account.

+

Please enter your complete username to confirm: {{ $account->identifier }}.

-
- {!! Form::label('identifier', 'Username') !!} - {!! Form::text('identifier', old('identifier'), ['class' => 'form-control', 'placeholder' => 'bob@example.net', 'required']) !!} -
+
+ + +
-{!! Form::hidden('identifier_confirm', $account->identifier) !!} + -{!! Form::submit('Delete', ['class' => 'btn btn-danger btn-centered']) !!} -{!! Form::close() !!} - -@endsection \ No newline at end of file + +
+@endsection diff --git a/flexiapi/resources/views/account/email.blade.php b/flexiapi/resources/views/account/email.blade.php index 4cb2f63..bb73b18 100644 --- a/flexiapi/resources/views/account/email.blade.php +++ b/flexiapi/resources/views/account/email.blade.php @@ -10,19 +10,21 @@

No email yet

@endif -{!! Form::open(['route' => 'account.email.request_update']) !!} -
- {!! Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => 'bob@example.net', 'required']) !!} - {!! Form::label('email', 'New email') !!} +
+@csrf + +
+ +
-
- {!! Form::email('email_confirmation', old('email_confirm'), ['class' => 'form-control', 'placeholder' => 'bob@example.net', 'required']) !!} - {!! Form::label('email_confirmation', 'Email confirmation') !!} +
+ +
-{!! Form::hidden('email_current', $account->email) !!} + -{!! Form::submit('Change', ['class' => 'btn btn-primary btn-centered']) !!} -{!! Form::close() !!} + + @endsection \ No newline at end of file diff --git a/flexiapi/resources/views/account/email/change.blade.php b/flexiapi/resources/views/account/email/change.blade.php index 7e1e1fe..388970c 100644 --- a/flexiapi/resources/views/account/email/change.blade.php +++ b/flexiapi/resources/views/account/email/change.blade.php @@ -11,31 +11,30 @@ @endif - {!! Form::open(['route' => 'account.email.request_change']) !!} +
+ @csrf -
- @if ($account->email) -

Please enter the new email address that you would like to link to your account.

- @else -

The verification code is invalid.

-

Please enter again your email address to receive a new code.

- @endif -
+
+ @if ($account->email) +

Please enter the new email address that you would like to link to your account.

+ @else +

The verification code is invalid.

+

Please enter again your email address to receive a new code.

+ @endif +
-
- {!! Form::email('email', null, ['placeholder' => 'email@server.tld', 'required']) !!} - {!! Form::label('email', 'Email') !!} - @include('parts.errors', ['name' => 'email']) -
+
+ + + @include('parts.errors', ['name' => 'email']) +
- @include('parts.captcha') + @include('parts.captcha') -
- {!! Form::submit('Verify', ['class' => 'btn oppose']) !!} -
- - - {!! Form::close() !!} +
+ +
+
diff --git a/flexiapi/resources/views/account/email/validate.blade.php b/flexiapi/resources/views/account/email/validate.blade.php index 1e1b49c..e7b6001 100644 --- a/flexiapi/resources/views/account/email/validate.blade.php +++ b/flexiapi/resources/views/account/email/validate.blade.php @@ -4,7 +4,8 @@

account_circle Validate your email

- {!! Form::open(['route' => 'account.email.update']) !!} +
+@csrf

A verification code was sent by email on {{ $emailChangeCode->email }}.

@@ -23,7 +24,7 @@
- {!! Form::close() !!} +

diff --git a/flexiapi/resources/views/account/login.blade.php b/flexiapi/resources/views/account/login.blade.php index 303d1b5..1879aca 100644 --- a/flexiapi/resources/views/account/login.blade.php +++ b/flexiapi/resources/views/account/login.blade.php @@ -8,37 +8,33 @@ @parsedown(config('instance.intro_registration')) @endif - @if (Auth::check()) - @include('parts.already_auth') - @else -

- @csrf -
- @if (config('app.phone_authentication')) - - - @else - - - @endif -
-
-
- - -
-
- -
+ + @csrf +
+ @if (config('app.phone_authentication')) + + + @else + + + @endif +
+
+
+ + +
+
+ +
-
+ -
+
- @include('parts.recovery') - @endif + @include('parts.recovery') @if (publicRegistrationEnabled())
diff --git a/flexiapi/resources/views/account/password.blade.php b/flexiapi/resources/views/account/password.blade.php index ba791a1..7f730b7 100644 --- a/flexiapi/resources/views/account/password.blade.php +++ b/flexiapi/resources/views/account/password.blade.php @@ -1,29 +1,29 @@ @extends('layouts.main') @section('content') + @if ($account->passwords()->count() > 0) +

Change my account password

+ @else +

Set my account password

+ @endif -@if ($account->passwords()->count() > 0) -

Change my account password

-@else -

Set my account password

-@endif +
+ @csrf -{!! Form::open(['route' => 'account.password.update']) !!} +
+ + +
+
+ + +
+
+ + +
-
- {!! Form::label('password', 'New password') !!} - {!! Form::password('password', ['class' => 'form-control', 'required']) !!} -
-
- {!! Form::label('password_confirmation', 'Password confirmation') !!} - {!! Form::password('password_confirmation', ['class' => 'form-control', 'required']) !!} -
-
- {!! Form::checkbox('password_sha256', 'checked', $account->passwords()->where('algorithm', 'SHA-256')->exists(), ['class' => 'form-check-input']) !!} - {!! Form::label('password_sha256', 'Use a SHA-256 encrypted password. This stronger password might not work with some old SIP clients.', ['class' => 'form-check-label']) !!} -
- -{!! Form::submit('Change', ['class' => 'btn btn-primary btn-centered']) !!} -{!! Form::close() !!} - -@endsection \ No newline at end of file + +
+@endsection diff --git a/flexiapi/resources/views/account/phone/change.blade.php b/flexiapi/resources/views/account/phone/change.blade.php index 802512a..24a78b6 100644 --- a/flexiapi/resources/views/account/phone/change.blade.php +++ b/flexiapi/resources/views/account/phone/change.blade.php @@ -11,7 +11,8 @@ @endif - {!! Form::open(['route' => 'account.phone.request_change']) !!} +
+@csrf
@if ($account->phone) @@ -23,18 +24,18 @@
- {!! Form::text('phone', null, ['placeholder' => '+12345678', 'required']) !!} - {!! Form::label('phone', 'Phone') !!} + + @include('parts.errors', ['name' => 'phone'])
@include('parts.captcha')
- {!! Form::submit('Verify', ['class' => 'btn oppose']) !!} +
- {!! Form::close() !!} +
diff --git a/flexiapi/resources/views/account/phone/validate.blade.php b/flexiapi/resources/views/account/phone/validate.blade.php index 73d8835..0e46b74 100644 --- a/flexiapi/resources/views/account/phone/validate.blade.php +++ b/flexiapi/resources/views/account/phone/validate.blade.php @@ -4,7 +4,8 @@

account_circle Validate your phone number

- {!! Form::open(['route' => 'account.phone.update']) !!} +
+@csrf

A verification code was sent by SMS on {{ $phoneChangeCode->phone }}.

@@ -23,7 +24,7 @@
- {!! Form::close() !!} +

diff --git a/flexiapi/resources/views/account/recovery/confirm.blade.php b/flexiapi/resources/views/account/recovery/confirm.blade.php index 7ac64db..ecc39dc 100644 --- a/flexiapi/resources/views/account/recovery/confirm.blade.php +++ b/flexiapi/resources/views/account/recovery/confirm.blade.php @@ -4,17 +4,19 @@

account_circle Account recovery

- {!! Form::open(['route' => 'account.recovery.confirm']) !!} +
+@csrf +

Enter the pin code you received to recover your account.

- {!! Form::text('code', old('code'), ['placeholder' => '1234', 'required']) !!} - {!! Form::label('code', 'Code') !!} - {!! Form::hidden('account_id', $account_id) !!} + + +
- {!! Form::submit('Login', ['class' => 'btn oppose']) !!} +
- {!! Form::close() !!} +
diff --git a/flexiapi/resources/views/account/recovery/show.blade.php b/flexiapi/resources/views/account/recovery/show.blade.php index cc3c3cb..f4c7a82 100644 --- a/flexiapi/resources/views/account/recovery/show.blade.php +++ b/flexiapi/resources/views/account/recovery/show.blade.php @@ -4,30 +4,32 @@

account_circle Account recovery

- {!! Form::open(['route' => 'account.recovery.send']) !!} +
+@csrf + @if ($method == 'email')

Enter your email account to recover it.

- {!! Form::email('email', old('email'), ['placeholder' => 'bob@example.com', 'required']) !!} - {!! Form::label('email', 'Email') !!} + + @include('parts.errors', ['name' => 'email']) @include('parts.errors', ['name' => 'identifier'])
@if (config('app.account_email_unique') == false)
- {!! Form::text('username', old('username'), ['placeholder' => 'username', 'required']) !!} - {!! Form::label('username', 'Username') !!} + +
- {!! Form::text('username', $domain, ['disabled']) !!} +
@endif @elseif($method == 'phone')

Enter your phone number to recover your account.

- {!! Form::text('phone', old('phone'), ['placeholder' => '+123456789', 'required']) !!} - {!! Form::label('phone', 'Phone') !!} + + @include('parts.errors', ['name' => 'phone']) @include('parts.errors', ['name' => 'identifier'])
@@ -36,9 +38,9 @@ @include('parts.captcha')
- {!! Form::submit('Send the code', ['class' => 'btn oppose']) !!} +
- {!! Form::close() !!} +
diff --git a/flexiapi/resources/views/account/register/email.blade.php b/flexiapi/resources/views/account/register/email.blade.php index f531650..0265101 100644 --- a/flexiapi/resources/views/account/register/email.blade.php +++ b/flexiapi/resources/views/account/register/email.blade.php @@ -9,11 +9,12 @@

@include('parts.tabs.register') - {!! Form::open(['route' => 'account.store']) !!} +
+@csrf
- {!! Form::text('username', old('username'), ['placeholder' => 'username', 'required']) !!} - {!! Form::label('username', 'Username') !!} + + @include('parts.errors', ['name' => 'username'])
@@ -22,13 +23,13 @@
- {!! Form::email('email', old('email'), ['placeholder' => 'bob@example.net', 'required']) !!} - {!! Form::label('email', 'Email') !!} + + @include('parts.errors', ['name' => 'email'])
- {!! Form::email('email_confirmation', old('email_confirm'), ['placeholder' => 'bob@example.net', 'required']) !!} - {!! Form::label('email_confirmation', 'Confirm email') !!} + + @include('parts.errors', ['name' => 'email_confirmation'])
@@ -45,18 +46,18 @@ @if (!empty(config('app.newsletter_registration_address')))
- {!! Form::checkbox('newsletter', 'true', false, ['class' => 'form-check-input', 'id' => 'newsletter']) !!} - + +
@endif @include('parts.terms')
- {!! Form::submit('Register', ['class' => 'btn oppose']) !!} +
- {!! Form::close() !!} +
diff --git a/flexiapi/resources/views/account/register/phone.blade.php b/flexiapi/resources/views/account/register/phone.blade.php index d7bb6d5..5d23771 100644 --- a/flexiapi/resources/views/account/register/phone.blade.php +++ b/flexiapi/resources/views/account/register/phone.blade.php @@ -9,11 +9,12 @@

@include('parts.tabs.register') - {!! Form::open(['route' => 'account.store']) !!} +
+@csrf
- {!! Form::text('username', old('username'), ['placeholder' => 'username', 'required']) !!} - {!! Form::label('username', 'Username') !!} + + @include('parts.errors', ['name' => 'username'])
@@ -21,8 +22,8 @@
- {!! Form::text('phone', old('phone'), ['placeholder' => '+123456789', 'required']) !!} - {!! Form::label('phone', 'Phone number') !!} + + @include('parts.errors', ['name' => 'phone'])
@@ -42,10 +43,10 @@ @include('parts.terms')
- {!! Form::submit('Register', ['class' => 'btn oppose']) !!} +
- {!! Form::close() !!} +
diff --git a/flexiapi/resources/views/admin/account/account_type/create.blade.php b/flexiapi/resources/views/admin/account/account_type/create.blade.php index 738745f..30d8477 100644 --- a/flexiapi/resources/views/admin/account/account_type/create.blade.php +++ b/flexiapi/resources/views/admin/account/account_type/create.blade.php @@ -1,41 +1,38 @@ @extends('layouts.main') @section('breadcrumb') - - - + + + @endsection @section('content') +

Add a Type to the Account

-

Add a Type to the Account

- -@if ($account_types->count() == 0) -

- No Account Type to add -

-@else - -{!! Form::model($account, [ - 'route' => ['admin.account.account_type.store', $account->id], - 'method' => 'post' -]) !!} -
-
- {!! Form::label('account_type_id', 'Account Type') !!} - {!! Form::select('account_type_id', $account_types, null, ['class' => 'form-control']); !!} -
-
- -{!! Form::submit('Add', ['class' => 'btn btn-success btn-centered']) !!} -{!! Form::close() !!} - -@endif - -@endsection \ No newline at end of file + @if ($account_types->count() == 0) +

+ No Account Type to add +

+ @else +
+ @csrf +
+ + +
+
+ +
+
+ @endif +@endsection diff --git a/flexiapi/resources/views/admin/account/action/create_edit.blade.php b/flexiapi/resources/views/admin/account/action/create_edit.blade.php index 1b9201f..32db4a7 100644 --- a/flexiapi/resources/views/admin/account/action/create_edit.blade.php +++ b/flexiapi/resources/views/admin/account/action/create_edit.blade.php @@ -1,45 +1,39 @@ @extends('layouts.main') @section('breadcrumb') - - - + + + @endsection @section('content') + @if ($action->id) +

Edit an account action

+ @else +

Create an account action

+ @endif -@if ($action->id) -

Edit an account action

-@else -

Create an account action

-@endif - -{!! Form::model($action, [ - 'route' => $action->id - ? ['admin.account.action.update', $action->account->id, $action->id] - : ['admin.account.action.store', $account->id], - 'method' => $action->id - ? 'put' - : 'post' -]) !!} -
-
- {!! Form::label('key', 'Key') !!} - {!! Form::text('key', $action->key, ['class' => 'form-control', 'placeholder' => 'action_key']); !!} +
+ @method($action->id ? 'put' : 'post') + @csrf +
+ +
-
- {!! Form::label('code', 'Code') !!} - {!! Form::text('code', $action->code, ['class' => 'form-control', 'placeholder' => '12ab45']); !!} +
+ +
-
- -{!! Form::submit(($action->id) ? 'Update' : 'Create', ['class' => 'btn btn-success btn-centered']) !!} -{!! Form::close() !!} - -@endsection \ No newline at end of file +
+ +
+
+@endsection diff --git a/flexiapi/resources/views/admin/account/action/delete.blade.php b/flexiapi/resources/views/admin/account/action/delete.blade.php index 8e644a3..b3b2f4c 100644 --- a/flexiapi/resources/views/admin/account/action/delete.blade.php +++ b/flexiapi/resources/views/admin/account/action/delete.blade.php @@ -1,31 +1,35 @@ @extends('layouts.main') @section('breadcrumb') - - - - + + + + @endsection @section('content') +

Delete an account action

-

Delete an account action

+
+ @csrf + @method('delete') -{!! Form::open(['route' => ['admin.account.action.destroy', $action->account, $action], 'method' => 'delete']) !!} +
+

You are going to permanently delete the following account action. Please confirm your action.

+

{{ $action->key }}

+
+ + -

You are going to permanently delete the following account action. Please confirm your action.

-

{{ $action->key }}

- -{!! Form::hidden('account_id', $action->account->id) !!} -{!! Form::hidden('action_id', $action->id) !!} - -{!! Form::submit('Delete', ['class' => 'btn btn-danger btn-centered']) !!} -{!! Form::close() !!} - -@endsection \ No newline at end of file +
+ +
+
+@endsection diff --git a/flexiapi/resources/views/admin/account/contact/delete.blade.php b/flexiapi/resources/views/admin/account/contact/delete.blade.php index e4a2b3a..98b24aa 100644 --- a/flexiapi/resources/views/admin/account/contact/delete.blade.php +++ b/flexiapi/resources/views/admin/account/contact/delete.blade.php @@ -1,31 +1,34 @@ @extends('layouts.main') @section('breadcrumb') - - - - + + + + @endsection @section('content') +

Delete an account contact

-

Delete an account contact

+
+ @csrf + @method('delete') -{!! Form::open(['route' => ['admin.account.contact.destroy', $account], 'method' => 'delete']) !!} +
+

You are going to remove the following contact from the contact list. Please confirm your action.

+

{{ $contact->identifier }}

+
-

You are going to remove the following contact from the contact list. Please confirm your action.

-

{{ $contact->identifier }}

- -{!! Form::hidden('account_id', $account->id) !!} -{!! Form::hidden('contact_id', $contact->id) !!} - -{!! Form::submit('Remove', ['class' => 'btn btn-danger btn-centered']) !!} -{!! Form::close() !!} - -@endsection \ No newline at end of file + + +
+ +
+
+@endsection diff --git a/flexiapi/resources/views/admin/account/create_edit.blade.php b/flexiapi/resources/views/admin/account/create_edit.blade.php index 1256e2a..e0c65e7 100644 --- a/flexiapi/resources/views/admin/account/create_edit.blade.php +++ b/flexiapi/resources/views/admin/account/create_edit.blade.php @@ -20,13 +20,13 @@

Updated on {{ $account->updated_at->format('d/m/Y') }} - @include('parts.tabs', [ - 'items' => [ - route('admin.account.edit', $account->id, ['type' => 'messages']) => 'Information', - route('admin.account.device.index', $account->id, ['type' => 'accounts']) => 'Devices', - ], - ]) - @else + @include('parts.tabs', [ + 'items' => [ + route('admin.account.edit', $account->id, ['type' => 'messages']) => 'Information', + route('admin.account.device.index', $account->id, ['type' => 'accounts']) => 'Devices', + ], + ]) + @else

people Create an account

Cancel @@ -72,7 +72,6 @@ @include('parts.errors', ['name' => 'password_confirmation'])
-
@@ -205,7 +204,7 @@ Identifier: {{ $account->externalAccount->identifier }}

@else - Attach an External Account ({{ $external_accounts_count }} left) @endif @@ -220,9 +219,9 @@ {{ $action->key }} {{ $action->code }} - Edit - Delete @@ -230,7 +229,7 @@ - Add + Add @else

To manage actions, you must configure the DTMF protocol in the account settings.

@endif @@ -243,19 +242,18 @@ {{ $type->key }} - {!! Form::open(['route' => ['admin.account.account_type.destroy', $account, $type->id], 'method' => 'delete']) !!} - {!! Form::submit('Delete', ['class' => 'btn btn-sm mr-2']) !!} - {!! Form::close() !!} +
+@csrf +@method('delete') + +
@endforeach - Add - - - + Add @endif @endsection diff --git a/flexiapi/resources/views/admin/account/delete.blade.php b/flexiapi/resources/views/admin/account/delete.blade.php index 65147ea..da04640 100644 --- a/flexiapi/resources/views/admin/account/delete.blade.php +++ b/flexiapi/resources/views/admin/account/delete.blade.php @@ -10,19 +10,22 @@ @section('content')

Delete an account

- {!! Form::open(['route' => 'admin.account.destroy', 'method' => 'delete']) !!} +
+@csrf + + @method('delete')

You are going to permanently delete the following account. Please confirm your action.
{{ $account->identifier }}

- {!! Form::hidden('account_id', $account->id) !!} +
- {!! Form::submit('Delete', ['class' => 'btn']) !!} +
- {!! Form::close() !!} +
@endsection diff --git a/flexiapi/resources/views/admin/account/device/index.blade.php b/flexiapi/resources/views/admin/account/device/index.blade.php index 8db47f7..f19019d 100644 --- a/flexiapi/resources/views/admin/account/device/index.blade.php +++ b/flexiapi/resources/views/admin/account/device/index.blade.php @@ -42,7 +42,7 @@ {{ $device->user_agent }} Delete @@ -52,5 +52,4 @@ - @endsection \ No newline at end of file diff --git a/flexiapi/resources/views/admin/account/type/create_edit.blade.php b/flexiapi/resources/views/admin/account/type/create_edit.blade.php index b1c4bc0..ce35a37 100644 --- a/flexiapi/resources/views/admin/account/type/create_edit.blade.php +++ b/flexiapi/resources/views/admin/account/type/create_edit.blade.php @@ -1,38 +1,33 @@ @extends('layouts.main') @section('breadcrumb') - - + + @endsection @section('content') + @if ($type->id) +

Edit an account type

+ @else +

Create an account type

+ @endif -@if ($type->id) -

Edit an account type

-@else -

Create an account type

-@endif - -{!! Form::model($type, [ - 'route' => $type->id - ? ['admin.account.type.update', $type->id] - : ['admin.account.type.store'], - 'method' => $type->id - ? 'put' - : 'post' -]) !!} -
-
- {!! Form::label('key', 'Key') !!} - {!! Form::text('key', $type->key, ['class' => 'form-control', 'placeholder' => 'type_key']); !!} +
+ @method($type->id ? 'put' : 'post') + @csrf +
+ +
-
-{!! Form::submit(($type->id) ? 'Update' : 'Create', ['class' => 'btn btn-success btn-centered']) !!} -{!! Form::close() !!} - -@endsection \ No newline at end of file +
+ +
+ +@endsection diff --git a/flexiapi/resources/views/admin/account/type/delete.blade.php b/flexiapi/resources/views/admin/account/type/delete.blade.php index 042c288..37b7aca 100644 --- a/flexiapi/resources/views/admin/account/type/delete.blade.php +++ b/flexiapi/resources/views/admin/account/type/delete.blade.php @@ -1,28 +1,31 @@ @extends('layouts.main') @section('breadcrumb') - - - - + + + + @endsection @section('content') +

Delete an account type

-

Delete an account type

+
+ @csrf + @method('delete') -{!! Form::open(['route' => ['admin.account.type.destroy', $type->id], 'method' => 'delete']) !!} - -

You are going to permanently delete the following type. Please confirm your action.

-

{{ $type->key }}

- -{!! Form::submit('Delete', ['class' => 'btn btn-danger btn-centered']) !!} -{!! Form::close() !!} - -@endsection \ No newline at end of file +
+

You are going to permanently delete the following type. Please confirm your action.

+

{{ $type->key }}

+
+
+ +
+
+@endsection diff --git a/flexiapi/resources/views/admin/account/type/index.blade.php b/flexiapi/resources/views/admin/account/type/index.blade.php index b6e3a56..adc5238 100644 --- a/flexiapi/resources/views/admin/account/type/index.blade.php +++ b/flexiapi/resources/views/admin/account/type/index.blade.php @@ -32,8 +32,8 @@ {{ $type->key }} - Edit - Delete + Edit + Delete @endforeach diff --git a/flexiapi/resources/views/api/documentation_markdown.blade.php b/flexiapi/resources/views/api/documentation_markdown.blade.php index 98497b2..0b37970 100644 --- a/flexiapi/resources/views/api/documentation_markdown.blade.php +++ b/flexiapi/resources/views/api/documentation_markdown.blade.php @@ -58,7 +58,6 @@ A `from` (consisting of the user SIP address, prefixed with `sip:`) header is re > from: sip:foobar@sip.example.org > … - < HTTP 401 < content-type: application/json < www-authenticate: Digest realm=test,qop=auth,algorithm=MD5,nonce="{nonce}",opaque="{opaque}" @@ -87,7 +86,6 @@ An `account_creation_request_token` is a unique token that can be validated and Create and return an `account_creation_request_token` that should then be validated to be used. - ## Account Creation Tokens An `account_creation_token` is a unique token that allow the creation of a **unique** account. @@ -139,7 +137,6 @@ Return `404` if the token is non existing or invalid. @if(config('app.dangerous_endpoints'))**Enabled on this instance**@else**Not enabled on this instance**@endif - Public Unsecure endpoint Create an account. @@ -177,7 +174,6 @@ Return `404` if the account doesn't exists. ### `GET /accounts/{phone}/info-by-phone` @if(config('app.dangerous_endpoints'))**Enabled on this instance**@else**Not enabled on this instance**@endif - Public Unsecure endpoint Retrieve public information about the account. @@ -188,7 +184,6 @@ Return `phone: true` if the returned account has a phone number. ### `POST /accounts/recover-by-phone` @if(config('app.dangerous_endpoints'))**Enabled on this instance**@else**Not enabled on this instance**@endif - Public Unsecure endpoint Send a SMS with a recovery PIN code to the `phone` number provided. @@ -202,7 +197,6 @@ JSON parameters: ### `GET /accounts/{sip}/recover/{recover_key}` @if(config('app.dangerous_endpoints'))**Enabled on this instance**@else**Not enabled on this instance**@endif - Public Unsecure endpoint Activate the account if the correct `recover_key` is provided. diff --git a/flexiapi/resources/views/parts/already_auth.blade.php b/flexiapi/resources/views/parts/already_auth.blade.php deleted file mode 100644 index 24831c1..0000000 --- a/flexiapi/resources/views/parts/already_auth.blade.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/flexiapi/resources/views/parts/errors_old.blade.php b/flexiapi/resources/views/parts/errors_old.blade.php deleted file mode 100644 index 63c0144..0000000 --- a/flexiapi/resources/views/parts/errors_old.blade.php +++ /dev/null @@ -1,22 +0,0 @@ -@if (isset($errors) && $errors->any()) -
-
    - @foreach ($errors->all() as $error) -
  • {{ $error }}
  • - @endforeach -
-
-@endif - -@if (Session::has('error')) -
- {{Session::get('error')}} -
-@endif - - -@if (Session::has('success')) -
- {{Session::get('success')}} -
-@endif diff --git a/flexiapi/resources/views/parts/terms.blade.php b/flexiapi/resources/views/parts/terms.blade.php index 58728e1..ab3b0db 100644 --- a/flexiapi/resources/views/parts/terms.blade.php +++ b/flexiapi/resources/views/parts/terms.blade.php @@ -1,5 +1,5 @@
- {!! Form::checkbox('terms', 'true', false, ['id' => 'terms']) !!} +