Changeset 2a84b41


Ignore:
Timestamp:
Sep 28, 2025, 4:55:15 PM (2 months ago)
Author:
rgigli <roberto.gigli@…>
Branches:
main
Children:
eb87f0a
Parents:
4aa9527
Message:

Signed-off-by: rgigli <roberto.gigli@…>

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/modules/tema_colore.php

    r4aa9527 r2a84b41  
    33
    44// Tema attivo di default
    5 $DEFAULT_THEME = "bootstrap-italia";
     5$DEFAULT_THEME = "default";
     6$row=configurazione();
     7$DEFAULT_THEME = $row[0]['tema_colore']; #"bootstrap-italia";
     8#$DEFAULT_THEME = 'tema-giallo';
    69
    710// Cartella dei temi
     
    1316
    1417// Aggiungi tema istituzionale Bootstrap Italia manualmente PRIMA degli altri temi
    15 $bootstrapItaliaTheme = 'bootstrap-italia';
     18$bootstrapItaliaTheme = 'default';
    1619$themes[] = $bootstrapItaliaTheme;
    1720$paletteColors[$bootstrapItaliaTheme] = [
     
    4750        <h3 class="card-title"><i class="fas fa-palette me-2"></i>Seleziona Tema Colore</h3>
    4851      </div>
     52          <div id="risultato"></div>
    4953      <div class="card-body">
    50         <form id="themeForm" novalidate>
     54        <form id="themeForm" action='modules.php'>
     55                  <input type="hidden" name="op" value="4">
    5156          <div class="d-flex flex-wrap justify-content-start">
    5257            <?php foreach ($themes as $theme): ?>
    5358              <label class="theme-card mb-3 <?= $theme === $DEFAULT_THEME ? 'selected' : '' ?>" data-theme="<?= htmlspecialchars($theme) ?>" style="cursor:pointer; user-select:none;">
    5459                <input type="radio" name="theme"
    55                        value="<?= $theme === $bootstrapItaliaTheme ? '0' : htmlspecialchars($theme) ?>"
     60                       value="<?= $theme === $bootstrapItaliaTheme ? htmlspecialchars($theme) : htmlspecialchars($theme) ?>"
    5661                       style="display:none" <?= $theme === $DEFAULT_THEME ? 'checked' : '' ?>>
    5762
     
    112117    e.preventDefault();
    113118    const selectedTheme = document.querySelector('input[name="theme"]:checked').value;
    114     alert('Tema selezionato: ' + (selectedTheme === '0' ? 'Istituzionale (default)' : selectedTheme));
    115     // Qui puoi aggiungere chiamata ajax o submit vero al backend
     119    var xmlhttp = new XMLHttpRequest();
     120    xmlhttp.onreadystatechange = function() {
     121                if (this.readyState == 4 && this.status == 200) {
     122                                document.getElementById("risultato").innerHTML = this.responseText;
     123                }
     124    }
     125    xmlhttp.open("GET","../principale.php?funzione=salvaColoreTema&colore="+selectedTheme,true);
     126    xmlhttp.send();
    116127  });
    117128</script>
  • admin/principale.php

    r4aa9527 r2a84b41  
    8686                include("modules/barra_sezioni.php");
    8787                break;
     88        case 'salvaColoreTema':
     89                include("modules/salva_colore_tema.php");
     90                break;
    8891        case 101:
    8992                include("ws/funzioni/salvaModifiche.php");
Note: See TracChangeset for help on using the changeset viewer.