Fix: Traducir modales y JavaScript en gallery.php
This commit is contained in:
16
gallery.php
16
gallery.php
@@ -103,14 +103,14 @@ require_once __DIR__ . '/templates/header.php';
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="action" value="upload">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Subir Imagen</h5>
|
||||
<h5 class="modal-title"><?= t('Subir Imagen') ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="file" name="image" class="form-control" accept="image/*" required>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary">Subir</button>
|
||||
<button type="submit" class="btn btn-primary"><?= t('Subir') ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -123,18 +123,18 @@ require_once __DIR__ . '/templates/header.php';
|
||||
<form method="POST">
|
||||
<input type="hidden" name="action" value="rename">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Renombrar Imagen</h5>
|
||||
<h5 class="modal-title"><?= t('Renombrar Imagen') ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="oldname" id="renameOldname">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Nuevo nombre</label>
|
||||
<label class="form-label"><?= t('Nuevo nombre') ?></label>
|
||||
<input type="text" name="newname" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary">Renombrar</button>
|
||||
<button type="submit" class="btn btn-primary"><?= t('Renombrar') ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -142,10 +142,14 @@ require_once __DIR__ . '/templates/header.php';
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const i18nGallery = {
|
||||
urlCopied: '<?= t('URL copiada al portapapeles') ?>'
|
||||
};
|
||||
|
||||
function copyUrl(filename) {
|
||||
const url = window.location.origin + '/galeria/' + filename;
|
||||
navigator.clipboard.writeText(url).then(() => {
|
||||
alert('URL copiada al portapapeles');
|
||||
alert(i18nGallery.urlCopied);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user