Changeset 2a84b41
- Timestamp:
- Sep 28, 2025, 4:55:15 PM (2 months ago)
- Branches:
- main
- Children:
- eb87f0a
- Parents:
- 4aa9527
- Location:
- admin
- Files:
-
- 2 edited
-
modules/tema_colore.php (modified) (4 diffs)
-
principale.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
admin/modules/tema_colore.php
r4aa9527 r2a84b41 3 3 4 4 // 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'; 6 9 7 10 // Cartella dei temi … … 13 16 14 17 // Aggiungi tema istituzionale Bootstrap Italia manualmente PRIMA degli altri temi 15 $bootstrapItaliaTheme = ' bootstrap-italia';18 $bootstrapItaliaTheme = 'default'; 16 19 $themes[] = $bootstrapItaliaTheme; 17 20 $paletteColors[$bootstrapItaliaTheme] = [ … … 47 50 <h3 class="card-title"><i class="fas fa-palette me-2"></i>Seleziona Tema Colore</h3> 48 51 </div> 52 <div id="risultato"></div> 49 53 <div class="card-body"> 50 <form id="themeForm" novalidate> 54 <form id="themeForm" action='modules.php'> 55 <input type="hidden" name="op" value="4"> 51 56 <div class="d-flex flex-wrap justify-content-start"> 52 57 <?php foreach ($themes as $theme): ?> 53 58 <label class="theme-card mb-3 <?= $theme === $DEFAULT_THEME ? 'selected' : '' ?>" data-theme="<?= htmlspecialchars($theme) ?>" style="cursor:pointer; user-select:none;"> 54 59 <input type="radio" name="theme" 55 value="<?= $theme === $bootstrapItaliaTheme ? '0': htmlspecialchars($theme) ?>"60 value="<?= $theme === $bootstrapItaliaTheme ? htmlspecialchars($theme) : htmlspecialchars($theme) ?>" 56 61 style="display:none" <?= $theme === $DEFAULT_THEME ? 'checked' : '' ?>> 57 62 … … 112 117 e.preventDefault(); 113 118 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(); 116 127 }); 117 128 </script> -
admin/principale.php
r4aa9527 r2a84b41 86 86 include("modules/barra_sezioni.php"); 87 87 break; 88 case 'salvaColoreTema': 89 include("modules/salva_colore_tema.php"); 90 break; 88 91 case 101: 89 92 include("ws/funzioni/salvaModifiche.php");
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/eleonline4/chrome/common/trac_banner.png)