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