Changeset 3372829
- Timestamp:
- 10/04/2025 12:21:36 PM (5 months ago)
- Location:
- smart-external-links-manager
- Files:
-
- 6 edited
-
tags/1.3.4/css/welm-admin.css (modified) (1 diff)
-
tags/1.3.4/js/welm-admin.js (modified) (1 diff)
-
tags/1.3.4/smart-external-links-manager.php (modified) (2 diffs)
-
trunk/css/welm-admin.css (modified) (1 diff)
-
trunk/js/welm-admin.js (modified) (1 diff)
-
trunk/smart-external-links-manager.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smart-external-links-manager/tags/1.3.4/css/welm-admin.css
r3372798 r3372829 265 265 color: #fff !important; 266 266 } 267 268 /* --- Stili per il Contenitore delle Azioni del Form --- */ 269 .welm-form-actions { 270 display: flex; 271 align-items: center; /* Allinea verticalmente i pulsanti */ 272 gap: 10px; /* Aggiunge un piccolo spazio tra i pulsanti */ 273 } 274 275 /* Rimuove il margine dal paragrafo del pulsante Salva per un allineamento corretto */ 276 .welm-form-actions .submit { 277 margin: 0; 278 padding: 0; 279 } -
smart-external-links-manager/tags/1.3.4/js/welm-admin.js
r3372798 r3372829 44 44 45 45 // Gestione conferma per il reset delle impostazioni 46 $('#welm-reset-form').on('submit', function(e) { 46 $('#welm-reset-button-trigger').on('click', function(e) { 47 e.preventDefault(); // Previene qualsiasi azione di default del pulsante 48 47 49 // Usa la funzione di conferma nativa del browser 48 if (!confirm('Are you sure you want to reset all settings to their default values? This action cannot be undone.')) { 49 e.preventDefault(); // Annulla l'invio del form se l'utente clicca "Annulla" 50 if (confirm('Are you sure you want to reset all settings to their default values? This action cannot be undone.')) { 51 // Se l'utente clicca "OK", invia il form nascosto 52 $('#welm-reset-form').submit(); 50 53 } 51 }); 54 }); 52 55 53 56 // --- GESTIONE LISTE (Force/Ignore) --- -
smart-external-links-manager/tags/1.3.4/smart-external-links-manager.php
r3372798 r3372829 530 530 <?php 531 531 } 532 533 // Aggiungi queste due funzioni dentro la classe534 532 535 533 public function render_field_enable_tooltip() { … … 630 628 <!-- Scheda 1: Settings --> 631 629 <div id="tab-settings" class="tab-content"> 630 <!-- Form principale per il salvataggio --> 632 631 <form method="post" action="options.php"> 633 632 <?php 634 633 settings_fields('welm_options_group'); 635 634 do_settings_sections('smart_external_links_manager'); 636 submit_button();637 635 ?> 636 <!-- Contenitore per i pulsanti --> 637 <div class="welm-form-actions"> 638 <?php submit_button(); ?> 639 <!-- Qui mettiamo solo un pulsante finto, non un form --> 640 <button type="button" id="welm-reset-button-trigger" class="button button-large welm-reset-button"> 641 <?php esc_html_e('Reset to Default Settings', 'smart-external-links-manager'); ?> 642 </button> 643 </div> 638 644 </form> 639 <form method="post" id="welm-reset-form" style="margin-top: 20px;"> 645 646 <!-- Form di reset, nascosto e separato --> 647 <form method="post" id="welm-reset-form" style="display: none;"> 640 648 <input type="hidden" name="welm_action" value="reset_settings" /> 641 649 <?php wp_nonce_field('welm_reset_nonce_action'); ?> 642 <button type="submit" class="button button-large welm-reset-button"> 643 <?php esc_html_e('Reset to Default Settings', 'smart-external-links-manager'); ?> 644 </button> 645 </form> 650 </form> 646 651 </div> 647 652 -
smart-external-links-manager/trunk/css/welm-admin.css
r3372798 r3372829 265 265 color: #fff !important; 266 266 } 267 268 /* --- Stili per il Contenitore delle Azioni del Form --- */ 269 .welm-form-actions { 270 display: flex; 271 align-items: center; /* Allinea verticalmente i pulsanti */ 272 gap: 10px; /* Aggiunge un piccolo spazio tra i pulsanti */ 273 } 274 275 /* Rimuove il margine dal paragrafo del pulsante Salva per un allineamento corretto */ 276 .welm-form-actions .submit { 277 margin: 0; 278 padding: 0; 279 } -
smart-external-links-manager/trunk/js/welm-admin.js
r3372798 r3372829 44 44 45 45 // Gestione conferma per il reset delle impostazioni 46 $('#welm-reset-form').on('submit', function(e) { 46 $('#welm-reset-button-trigger').on('click', function(e) { 47 e.preventDefault(); // Previene qualsiasi azione di default del pulsante 48 47 49 // Usa la funzione di conferma nativa del browser 48 if (!confirm('Are you sure you want to reset all settings to their default values? This action cannot be undone.')) { 49 e.preventDefault(); // Annulla l'invio del form se l'utente clicca "Annulla" 50 if (confirm('Are you sure you want to reset all settings to their default values? This action cannot be undone.')) { 51 // Se l'utente clicca "OK", invia il form nascosto 52 $('#welm-reset-form').submit(); 50 53 } 51 }); 54 }); 52 55 53 56 // --- GESTIONE LISTE (Force/Ignore) --- -
smart-external-links-manager/trunk/smart-external-links-manager.php
r3372798 r3372829 530 530 <?php 531 531 } 532 533 // Aggiungi queste due funzioni dentro la classe534 532 535 533 public function render_field_enable_tooltip() { … … 630 628 <!-- Scheda 1: Settings --> 631 629 <div id="tab-settings" class="tab-content"> 630 <!-- Form principale per il salvataggio --> 632 631 <form method="post" action="options.php"> 633 632 <?php 634 633 settings_fields('welm_options_group'); 635 634 do_settings_sections('smart_external_links_manager'); 636 submit_button();637 635 ?> 636 <!-- Contenitore per i pulsanti --> 637 <div class="welm-form-actions"> 638 <?php submit_button(); ?> 639 <!-- Qui mettiamo solo un pulsante finto, non un form --> 640 <button type="button" id="welm-reset-button-trigger" class="button button-large welm-reset-button"> 641 <?php esc_html_e('Reset to Default Settings', 'smart-external-links-manager'); ?> 642 </button> 643 </div> 638 644 </form> 639 <form method="post" id="welm-reset-form" style="margin-top: 20px;"> 645 646 <!-- Form di reset, nascosto e separato --> 647 <form method="post" id="welm-reset-form" style="display: none;"> 640 648 <input type="hidden" name="welm_action" value="reset_settings" /> 641 649 <?php wp_nonce_field('welm_reset_nonce_action'); ?> 642 <button type="submit" class="button button-large welm-reset-button"> 643 <?php esc_html_e('Reset to Default Settings', 'smart-external-links-manager'); ?> 644 </button> 645 </form> 650 </form> 646 651 </div> 647 652
Note: See TracChangeset
for help on using the changeset viewer.