-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathedit.blade.php
85 lines (68 loc) · 3.72 KB
/
edit.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{{'@'}}extends('brackets/admin-ui::admin.layout.default')
{{'@'}}section('title', trans('admin.{{ $modelLangFormat }}.actions.edit', ['name' => ${{ $modelVariableName }}->{{$modelTitle}}]))
{{'@'}}section('body')
<div class="container-xl">
@if(!$isUsedTwoColumnsLayout)
<div class="card">
@endif
@if($hasTranslatable)<{{ $modelJSName }}-form
:action="'{{'{{'}} ${{ $modelVariableName }}->resource_url }}'"
:data="{{'{{'}} ${{ $modelVariableName }}->toJsonAllLocales() }}"
:locales="@{{ json_encode($locales) }}"
:send-empty-locales="false"
v-cloak
inline-template>
@else<{{ $modelJSName }}-form
:action="'{{'{{'}} ${{ $modelVariableName }}->resource_url }}'"
:data="{{'{{'}} ${{ $modelVariableName }}->toJson() }}"
v-cloak
inline-template>
@endif
<form class="form-horizontal form-edit" method="post" {{'@'}}submit.prevent="onSubmit" :action="action" novalidate>
@if($isUsedTwoColumnsLayout)
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<i class="fa fa-pencil"></i> {{'{{'}} trans('admin.{{ $modelLangFormat }}.actions.edit', ['name' => ${{ $modelVariableName }}->{{$modelTitle}}]) }}
</div>
<div class="card-body">
{{'@'}}include('admin.{{ $modelDotNotation }}.components.form-elements')
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-xl-5 col-xxl-4">
{{'@'}}include('admin.{{ $modelDotNotation }}.components.form-elements-right', ['showHistory' => true])
</div>
</div>
@else
<div class="card-header">
<i class="fa fa-pencil"></i> {{'{{'}} trans('admin.{{ $modelLangFormat }}.actions.edit', ['name' => ${{ $modelVariableName }}->{{$modelTitle}}]) }}
</div>
<div class="card-body">
{{'@'}}include('admin.{{ $modelDotNotation }}.components.form-elements')
</div>
@endif
@if($isUsedTwoColumnsLayout)<button type="submit" class="btn btn-primary fixed-cta-button button-save" :disabled="submiting">
<i class="fa" :class="submiting ? 'fa-spinner' : 'fa-save'"></i>
@{{ trans('brackets/admin-ui::admin.btn.save') }}
</button>
<button type="submit" style="display: none" class="btn btn-success fixed-cta-button button-saved" :disabled="submiting" :class="">
<i class="fa" :class="submiting ? 'fa-spinner' : 'fa-check'"></i>
<span>@{{ trans('brackets/admin-ui::admin.btn.saved') }}</span>
</button>
@else
<div class="card-footer">
<button type="submit" class="btn btn-primary" :disabled="submiting">
<i class="fa" :class="submiting ? 'fa-spinner' : 'fa-download'"></i>
@{{ trans('brackets/admin-ui::admin.btn.save') }}
</button>
</div>
@endif
</form>
</{{ $modelJSName }}-form>
@if(!$isUsedTwoColumnsLayout)
</div>
@endif
</div>
{{'@'}}endsection