Skip to content

Commit

Permalink
add alert
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Jan 2, 2024
1 parent 4526d92 commit 43ec336
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions resources/views/resources/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,45 @@

{{-- Content --}}
@section('content')
@if($errors->isNotEmpty())
<x-root::alert type="danger">
{{ __('Some error occurred when submitting the form!') }}
</x-root::alert>
@endif
@if($errors->isNotEmpty())
<x-root::alert type="danger">
{{ __('Some error occurred when submitting the form!') }}
</x-root::alert>
@endif

<form id="{{ $key }}" method="POST" action="{{ $action }}" autocomplete="off">
@csrf
@method($method)
<div class="l-row">
<div class="l-row__column">
<div class="app-card app-card--edit">
<div class="app-card__header">
<h2 class="app-card__title">General</h2>
</div>
<div class="app-card__body">
<div class="form-group-stack form-group-stack--bordered form-group-container">
@foreach($fields as $field)
@include($field['template'], $field)
@endforeach
<form id="{{ $key }}" method="POST" action="{{ $action }}" autocomplete="off">
@csrf
@method($method)
<div class="l-row">
<div class="l-row__column">
<div class="app-card app-card--edit">
<div class="app-card__header">
<h2 class="app-card__title">General</h2>
</div>
<div class="app-card__body">
<div class="form-group-stack form-group-stack--bordered form-group-container">
@foreach($fields as $field)
@include($field['template'], $field)
@endforeach
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<div class="app-actions">
<div class="app-actions__column">
<button type="submit" class="btn btn--primary" form="{{ $key }}">{{ __('Save') }}</button>
<a href="{{ $action }}" class="btn btn--light">{{ __('Cancel') }}</a>
</div>
@if($model->exists)
</form>
<div class="app-actions">
<div class="app-actions__column">
<form method="POST" action="{{ $action }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn--delete">{{ __('Delete') }}</button>
</form>
<button type="submit" class="btn btn--primary" form="{{ $key }}">{{ __('Save') }}</button>
<a href="{{ $action }}" class="btn btn--light">{{ __('Cancel') }}</a>
</div>
@endif
</div>
@if($model->exists)
<div class="app-actions__column">
<form method="POST" action="{{ $action }}" onsubmit="return window.confirm('{{ __('Are you sure?') }}');">
@csrf
@method('DELETE')
<button type="submit" class="btn btn--delete">{{ __('Delete') }}</button>
</form>
</div>
@endif
</div>
@endsection

0 comments on commit 43ec336

Please sign in to comment.