Updated dom layout of attahcments to prevent nested dropzones (No issue
but potential to be one) and updated edit form dropzone handling so the
dropzone item card was not as distracting.
'file' => $this->getImageValidationRules(),
]);
} catch (ValidationException $exception) {
'file' => $this->getImageValidationRules(),
]);
} catch (ValidationException $exception) {
- // TODO - Check potential other upload locations?
return $this->jsonError(implode("\n", $exception->errors()['file']));
}
return $this->jsonError(implode("\n", $exception->errors()['file']));
}
// Set the first tab as active on load
this.setActiveTab(this.contentElements[0].dataset.tabContent);
// Set the first tab as active on load
this.setActiveTab(this.contentElements[0].dataset.tabContent);
-
- setTimeout(() => {
- this.setActiveTab('files', true);
- }, 500);
<div component="ajax-form"
option:ajax-form:url="/attachments/{{ $attachment->id }}"
option:ajax-form:method="put"
<div component="ajax-form"
option:ajax-form:url="/attachments/{{ $attachment->id }}"
option:ajax-form:method="put"
- option:ajax-form:response-container=".attachment-edit-container"
+ option:ajax-form:response-container="#edit-form-container"
option:ajax-form:success-message="{{ trans('entities.attachments_updated_success') }}">
<h5>{{ trans('entities.attachments_edit_file') }}</h5>
option:ajax-form:success-message="{{ trans('entities.attachments_updated_success') }}">
<h5>{{ trans('entities.attachments_edit_file') }}</h5>
<div component="ajax-form"
option:ajax-form:url="/attachments/link"
option:ajax-form:method="post"
<div component="ajax-form"
option:ajax-form:url="/attachments/link"
option:ajax-form:method="post"
- option:ajax-form:response-container=".link-form-container"
+ option:ajax-form:response-container="#link-form-container"
option:ajax-form:success-message="{{ trans('entities.attachments_link_attached') }}">
<input type="hidden" name="attachment_link_uploaded_to" value="{{ $pageId }}">
<p class="text-muted small">{{ trans('entities.attachments_explain_link') }}</p>
option:ajax-form:success-message="{{ trans('entities.attachments_link_attached') }}">
<input type="hidden" name="attachment_link_uploaded_to" value="{{ $pageId }}">
<p class="text-muted small">{{ trans('entities.attachments_explain_link') }}</p>
- <div refs="attachments@links-container" hidden class="link-form-container">
- @include('attachments.manager-link-form', ['pageId' => $page->id])
- </div>
+ <div id="link-form-container" refs="attachments@links-container" hidden class="px-l">
+ @include('attachments.manager-link-form', ['pageId' => $page->id])
+ </div>
- <div refs="attachments@edit-container" hidden class="attachment-edit-container"></div>
+ <div id="edit-form-container" refs="attachments@edit-container" hidden class="px-l"></div>
</div>
\ No newline at end of file
</div>
\ No newline at end of file
option:dropzone:zone-text="{{ trans('entities.attachments_dropzone') }}"
option:dropzone:file-accept="*"
class="relative">
option:dropzone:zone-text="{{ trans('entities.attachments_dropzone') }}"
option:dropzone:file-accept="*"
class="relative">
- <div refs="dropzone@status-area" class="fixed top-right px-m py-m"></div>
+ <div refs="dropzone@status-area"></div>
<button type="button"
refs="dropzone@select-button dropzone@drop-target"
class="dropzone-landing-area text-center">
<button type="button"
refs="dropzone@select-button dropzone@drop-target"
class="dropzone-landing-area text-center">