]> BookStack Code Mirror - bookstack/blob - resources/views/attachments/manager-edit-form.blade.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / resources / views / attachments / manager-edit-form.blade.php
1 <div component="ajax-form"
2      option:ajax-form:url="/attachments/{{ $attachment->id }}"
3      option:ajax-form:method="put"
4      option:ajax-form:response-container="#edit-form-container"
5      option:ajax-form:success-message="{{ trans('entities.attachments_updated_success') }}">
6     <h5>{{ trans('entities.attachments_edit_file') }}</h5>
7
8     <div class="form-group">
9         <label for="attachment_edit_name">{{ trans('entities.attachments_edit_file_name') }}</label>
10         <input type="text" id="attachment_edit_name"
11                name="attachment_edit_name"
12                value="{{ $attachment_edit_name ?? $attachment->name ?? '' }}"
13                placeholder="{{ trans('entities.attachments_edit_file_name') }}">
14         @if($errors->has('attachment_edit_name'))
15             <div class="text-neg text-small">{{ $errors->first('attachment_edit_name') }}</div>
16         @endif
17     </div>
18
19     <div component="tabs" class="tab-container">
20         <div class="nav-tabs" role="tablist">
21             <button id="attachment-edit-file-tab"
22                     type="button"
23                     aria-controls="attachment-edit-file-panel"
24                     aria-selected="{{ $attachment->external ? 'false' : 'true' }}"
25                     role="tab">{{ trans('entities.attachments_upload') }}</button>
26             <button id="attachment-edit-link-tab"
27                     type="button"
28                     aria-controls="attachment-edit-link-panel"
29                     aria-selected="{{ $attachment->external ? 'true' : 'false' }}"
30                     role="tab">{{ trans('entities.attachments_set_link') }}</button>
31         </div>
32         <div id="attachment-edit-file-panel"
33              @if($attachment->external) hidden @endif
34              tabindex="0"
35              role="tabpanel"
36              aria-labelledby="attachment-edit-file-tab"
37              class="mb-m">
38             @include('form.simple-dropzone', [
39                 'placeholder' => trans('entities.attachments_edit_drop_upload'),
40                 'url' =>  url('/attachments/upload/' . $attachment->id),
41                 'successMessage' => trans('entities.attachments_file_updated'),
42             ])
43         </div>
44         <div id="attachment-edit-link-panel"
45              @if(!$attachment->external) hidden @endif
46              tabindex="0"
47              role="tabpanel"
48              aria-labelledby="attachment-edit-link-tab">
49             <div class="form-group">
50                 <label for="attachment_edit_url">{{ trans('entities.attachments_link_url') }}</label>
51                 <input type="text" id="attachment_edit_url"
52                        name="attachment_edit_url"
53                        value="{{ $attachment_edit_url ?? ($attachment->external ? $attachment->path : '')  }}"
54                        placeholder="{{ trans('entities.attachment_link') }}">
55                 @if($errors->has('attachment_edit_url'))
56                     <div class="text-neg text-small">{{ $errors->first('attachment_edit_url') }}</div>
57                 @endif
58             </div>
59         </div>
60     </div>
61
62     <button component="event-emit-select"
63             option:event-emit-select:name="edit-back"
64             type="button"
65             class="button outline">{{ trans('common.back') }}</button>
66     <button refs="ajax-form@submit" type="button" class="button">{{ trans('common.save') }}</button>
67 </div>