File manager - Edit - /home/autoph/public_html/projects/tickets-autohub/storage/framework/views/aebaf7c3d20bfb1698b8e46c9d7766f8d1086d91.php
Back
<style> #fileWrapper { display: flex; align-items: center; border: 1px solid #ccc; border-radius: 5px; padding: 8px; background: #f8f9fa; width: 100%; } #fileIcon { font-size: 18px; margin-right: 8px; color: #007bff; } #fileName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; } .btn-clear { border: none; background: transparent; color: red; cursor: pointer; font-size: 16px; } .btn-clear:hover { color: darkred; } </style> <div class="modal fade" id="create_form_modal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-md"> <div class="modal-content"> <div class="modal-header"> <h1 class="modal-title fs-5" id="staticBackdropLabel"> <i class="fa fa-cloud-upload text-success" aria-hidden="true"></i> Add Downloadable Form</h1> </div> <div class="modal-body"> <form class="_downloadableForm" action="POST" enctype="multipart/form-data" novalidate> <?php echo csrf_field(); ?> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="form-label">Filename:</label> <input type="text" name="_filename" id="_filename" class="form-control"/> </div> <div class="form-group"> <label for="">Document purpose: </label> <textarea class="form-control" name="_desc" id="_desc" cols="30" rows="10"></textarea> </div> <div class="row align-items-center"> <div class="col-md-8"> <div class="form-group"> <input type="file" name="_attachmentTicket" id="_attachmentTicket" style="display: none;"> <label for="_attachmentTicket" class="btn btn-light" style="border: 1px solid #ccc; margin-right: 10px;"> <i class="fa fa-paperclip" aria-hidden="true"></i> Attach File </label> <div id="fileWrapper"> <span id="fileIcon"></span> <span id="fileName">No file selected</span> <button type="button" id="_clearFile" class="btn-clear"> <i class="fa fa-times"></i> </button> </div> </div> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-label="Close">Close</button> <button type="submit" class="btn btn-primary">Submit</button> </div> </form> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function () { const fileInput = document.getElementById('_attachmentTicket'); const fileNameDisplay = document.getElementById('fileName'); const fileIconDisplay = document.getElementById('fileIcon'); const clearFileBtn = document.getElementById('_clearFile'); fileInput.addEventListener('change', function () { if (fileInput.files.length > 0) { const file = fileInput.files[0]; fileNameDisplay.textContent = file.name; // Get file extension for icon const fileExtension = file.name.split('.').pop().toLowerCase(); const icons = { pdf: 'fa-file-pdf', doc: 'fa-file-word', docx: 'fa-file-word', xls: 'fa-file-excel', xlsx: 'fa-file-excel', ppt: 'fa-file-powerpoint', pptx: 'fa-file-powerpoint', jpg: 'fa-file-image', jpeg: 'fa-file-image', png: 'fa-file-image', zip: 'fa-file-archive', txt: 'fa-file-alt', default: 'fa-file' }; const iconClass = icons[fileExtension] || icons.default; fileIconDisplay.innerHTML = `<i class="fa ${iconClass}" aria-hidden="true"></i>`; } }); // Clear selected file clearFileBtn.addEventListener('click', function () { fileInput.value = ''; fileNameDisplay.textContent = 'No file selected'; fileIconDisplay.innerHTML = ''; }); // Reset on modal close const createTicketModal = document.getElementById('create_form_modal'); createTicketModal.addEventListener('hidden.bs.modal', function () { fileInput.value = ''; fileNameDisplay.textContent = 'No file selected'; fileIconDisplay.innerHTML = ''; }); }); </script><?php /**PATH C:\laragon\www\DEVELOPMENT\autohub-ticketing\resources\views/layouts/authentication/admin/forms/create.blade.php ENDPATH**/ ?>
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings