1 <div component="ajax-form"
2 option:ajax-form:url="/attachments/{{ $attachment->id }}"
3 option:ajax-form:method="put"
4 option:ajax-form:success-message="{{ trans('entities.attachments_updated_success') }}">
5 <h5>{{ trans('entities.attachments_edit_file') }}</h5>
7 <div class="form-group">
8 <label for="attachment_edit_name">{{ trans('entities.attachments_edit_file_name') }}</label>
9 <input type="text" id="attachment_edit_name"
10 name="attachment_edit_name"
11 value="{{ $attachment_edit_name ?? $attachment->name ?? '' }}"
12 placeholder="{{ trans('entities.attachments_edit_file_name') }}">
13 @if($errors->has('attachment_edit_name'))
14 <div class="text-neg text-small">{{ $errors->first('attachment_edit_name') }}</div>
18 <div component="tabs" class="tab-container">
19 <div class="nav-tabs">
20 <button refs="tabs@toggleFile" type="button" class="tab-item {{ $attachment->external ? '' : 'selected' }}">{{ trans('entities.attachments_upload') }}</button>
21 <button refs="tabs@toggleLink" type="button" class="tab-item {{ $attachment->external ? 'selected' : '' }}">{{ trans('entities.attachments_set_link') }}</button>
23 <div refs="tabs@contentFile" class="mb-m {{ $attachment->external ? 'hidden' : '' }}">
24 @include('components.dropzone', [
25 'placeholder' => trans('entities.attachments_edit_drop_upload'),
26 'url' => url('/attachments/upload/' . $attachment->id),
27 'successMessage' => trans('entities.attachments_file_updated'),
30 <div refs="tabs@contentLink" class="{{ $attachment->external ? '' : 'hidden' }}">
31 <div class="form-group">
32 <label for="attachment_edit_url">{{ trans('entities.attachments_link_url') }}</label>
33 <input type="text" id="attachment_edit_url"
34 name="attachment_edit_url"
35 value="{{ $attachment_edit_url ?? ($attachment->external ? $attachment->path : '') }}"
36 placeholder="{{ trans('entities.attachment_link') }}">
37 @if($errors->has('attachment_edit_url'))
38 <div class="text-neg text-small">{{ $errors->first('attachment_edit_url') }}</div>
44 <button component="event-emit-select"
45 option:event-emit-select:name="edit-back" type="button" class="button outline">{{ trans('common.back') }}</button>
46 <button refs="ajax-form@submit" type="button" class="button">{{ trans('common.save') }}</button>