feat : FOLIO_REPO_URL et APP_TIMEZONE configurables depuis admin #67
+1
-1
@@ -2837,7 +2837,7 @@ switch ($action) {
|
||||
'folio_update_branch' => $_POST['folio_update_branch'] ?? '',
|
||||
]);
|
||||
$_updateChecker->clearCache();
|
||||
header('Location: /admin?tab=dashboard¬ice=' . ($ok ? 'folio_saved' : 'folio_error'));
|
||||
header('Location: /admin/site?notice=' . ($ok ? 'folio_saved' : 'folio_error'));
|
||||
exit;
|
||||
|
||||
case 'admin_save_site':
|
||||
|
||||
+27
-27
@@ -164,33 +164,6 @@ function adminStatusBadge(array $a, int $now): string
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (($_GET['notice'] ?? '') === 'folio_saved'): ?>
|
||||
<div class="alert alert-success py-2 mb-3 small">Configuration Folio enregistrée.</div>
|
||||
<?php elseif (($_GET['notice'] ?? '') === 'folio_error'): ?>
|
||||
<div class="alert alert-danger py-2 mb-3 small">Impossible d'enregistrer.</div>
|
||||
<?php endif; ?>
|
||||
<div class="card mb-4" style="max-width:540px">
|
||||
<div class="card-header bg-transparent py-2 small fw-semibold">Configuration des mises à jour</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="/?action=admin_save_folio_config">
|
||||
<div class="mb-3">
|
||||
<label class="form-label small fw-semibold mb-1">URL du dépôt Folio</label>
|
||||
<input type="url" name="folio_repo_url" class="form-control form-control-sm font-monospace"
|
||||
placeholder="https://git.abonnel.fr/cedricAbonnel/folio"
|
||||
value="<?= htmlspecialchars(folioRepoUrl()) ?>">
|
||||
<div class="form-text">Sans slash final. Laissez vide pour utiliser <code>FOLIO_REPO_URL</code> du .env.</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label small fw-semibold mb-1">Branche suivie</label>
|
||||
<input type="text" name="folio_update_branch" class="form-control form-control-sm font-monospace"
|
||||
placeholder="main"
|
||||
value="<?= htmlspecialchars(folioUpdateBranch()) ?>">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Enregistrer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>Activité récente</h5>
|
||||
<table class="table table-sm table-hover">
|
||||
<thead>
|
||||
@@ -574,6 +547,33 @@ function adminStatusBadge(array $a, int $now): string
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (($_GET['notice'] ?? '') === 'folio_saved'): ?>
|
||||
<div class="alert alert-success py-2 mt-3 small">Configuration Folio enregistrée.</div>
|
||||
<?php elseif (($_GET['notice'] ?? '') === 'folio_error'): ?>
|
||||
<div class="alert alert-danger py-2 mt-3 small">Impossible d'enregistrer.</div>
|
||||
<?php endif; ?>
|
||||
<div class="card mt-4" style="max-width:540px">
|
||||
<div class="card-header bg-transparent py-2 small fw-semibold">Mises à jour du moteur</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="/?action=admin_save_folio_config">
|
||||
<div class="mb-3">
|
||||
<label class="form-label small fw-semibold mb-1">URL du dépôt Folio</label>
|
||||
<input type="url" name="folio_repo_url" class="form-control form-control-sm font-monospace"
|
||||
placeholder="https://git.abonnel.fr/cedricAbonnel/folio"
|
||||
value="<?= htmlspecialchars(folioRepoUrl()) ?>">
|
||||
<div class="form-text">Sans slash final. Laissez vide pour utiliser <code>FOLIO_REPO_URL</code> du .env.</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label small fw-semibold mb-1">Branche suivie</label>
|
||||
<input type="text" name="folio_update_branch" class="form-control form-control-sm font-monospace"
|
||||
placeholder="main"
|
||||
value="<?= htmlspecialchars(folioUpdateBranch()) ?>">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Enregistrer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ─────────────────────────── CATÉGORIES & TAGS ─────────────────── -->
|
||||
|
||||
Reference in New Issue
Block a user