| 
									
										
										
										
											2020-07-04 23:53:02 +08:00
										 |  |  | <div component="ajax-form" | 
					
						
							|  |  |  |      option:ajax-form:url="/attachments/{{ $attachment->id }}" | 
					
						
							|  |  |  |      option:ajax-form:method="put" | 
					
						
							| 
									
										
										
										
											2023-04-27 06:31:38 +08:00
										 |  |  |      option:ajax-form:response-container="#edit-form-container" | 
					
						
							| 
									
										
										
										
											2020-07-04 23:53:02 +08:00
										 |  |  |      option:ajax-form:success-message="{{ trans('entities.attachments_updated_success') }}"> | 
					
						
							|  |  |  |     <h5>{{ trans('entities.attachments_edit_file') }}</h5> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="form-group"> | 
					
						
							|  |  |  |         <label for="attachment_edit_name">{{ trans('entities.attachments_edit_file_name') }}</label> | 
					
						
							|  |  |  |         <input type="text" id="attachment_edit_name" | 
					
						
							|  |  |  |                name="attachment_edit_name" | 
					
						
							|  |  |  |                value="{{ $attachment_edit_name ?? $attachment->name ?? '' }}" | 
					
						
							|  |  |  |                placeholder="{{ trans('entities.attachments_edit_file_name') }}"> | 
					
						
							|  |  |  |         @if($errors->has('attachment_edit_name')) | 
					
						
							|  |  |  |             <div class="text-neg text-small">{{ $errors->first('attachment_edit_name') }}</div> | 
					
						
							|  |  |  |         @endif | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div component="tabs" class="tab-container"> | 
					
						
							| 
									
										
										
										
											2023-04-26 23:41:34 +08:00
										 |  |  |         <div class="nav-tabs" role="tablist"> | 
					
						
							|  |  |  |             <button id="attachment-edit-file-tab" | 
					
						
							|  |  |  |                     type="button" | 
					
						
							|  |  |  |                     aria-controls="attachment-edit-file-panel" | 
					
						
							|  |  |  |                     aria-selected="{{ $attachment->external ? 'false' : 'true' }}" | 
					
						
							|  |  |  |                     role="tab">{{ trans('entities.attachments_upload') }}</button> | 
					
						
							|  |  |  |             <button id="attachment-edit-link-tab" | 
					
						
							|  |  |  |                     type="button" | 
					
						
							|  |  |  |                     aria-controls="attachment-edit-link-panel" | 
					
						
							|  |  |  |                     aria-selected="{{ $attachment->external ? 'true' : 'false' }}" | 
					
						
							|  |  |  |                     role="tab">{{ trans('entities.attachments_set_link') }}</button> | 
					
						
							| 
									
										
										
										
											2020-07-04 23:53:02 +08:00
										 |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2023-04-26 23:41:34 +08:00
										 |  |  |         <div id="attachment-edit-file-panel" | 
					
						
							|  |  |  |              @if($attachment->external) hidden @endif | 
					
						
							|  |  |  |              tabindex="0" | 
					
						
							|  |  |  |              role="tabpanel" | 
					
						
							|  |  |  |              aria-labelledby="attachment-edit-file-tab" | 
					
						
							|  |  |  |              class="mb-m"> | 
					
						
							|  |  |  |             @include('form.simple-dropzone', [ | 
					
						
							| 
									
										
										
										
											2020-07-04 23:53:02 +08:00
										 |  |  |                 'placeholder' => trans('entities.attachments_edit_drop_upload'), | 
					
						
							|  |  |  |                 'url' =>  url('/attachments/upload/' . $attachment->id), | 
					
						
							|  |  |  |                 'successMessage' => trans('entities.attachments_file_updated'), | 
					
						
							|  |  |  |             ]) | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2023-04-26 23:41:34 +08:00
										 |  |  |         <div id="attachment-edit-link-panel" | 
					
						
							|  |  |  |              @if(!$attachment->external) hidden @endif | 
					
						
							|  |  |  |              tabindex="0" | 
					
						
							|  |  |  |              role="tabpanel" | 
					
						
							|  |  |  |              aria-labelledby="attachment-edit-link-tab"> | 
					
						
							| 
									
										
										
										
											2020-07-04 23:53:02 +08:00
										 |  |  |             <div class="form-group"> | 
					
						
							|  |  |  |                 <label for="attachment_edit_url">{{ trans('entities.attachments_link_url') }}</label> | 
					
						
							|  |  |  |                 <input type="text" id="attachment_edit_url" | 
					
						
							|  |  |  |                        name="attachment_edit_url" | 
					
						
							|  |  |  |                        value="{{ $attachment_edit_url ?? ($attachment->external ? $attachment->path : '')  }}" | 
					
						
							|  |  |  |                        placeholder="{{ trans('entities.attachment_link') }}"> | 
					
						
							|  |  |  |                 @if($errors->has('attachment_edit_url')) | 
					
						
							|  |  |  |                     <div class="text-neg text-small">{{ $errors->first('attachment_edit_url') }}</div> | 
					
						
							|  |  |  |                 @endif | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <button component="event-emit-select" | 
					
						
							| 
									
										
										
										
											2023-04-26 23:41:34 +08:00
										 |  |  |             option:event-emit-select:name="edit-back" | 
					
						
							|  |  |  |             type="button" | 
					
						
							|  |  |  |             class="button outline">{{ trans('common.back') }}</button> | 
					
						
							| 
									
										
										
										
											2020-07-04 23:53:02 +08:00
										 |  |  |     <button refs="ajax-form@submit" type="button" class="button">{{ trans('common.save') }}</button> | 
					
						
							|  |  |  | </div> |