Projet

Général

Profil

Actions

Anomalie #627

fermé

Galette v0.7.4.3. Affichage intempestif lors de la suppression de fiches sans sélection préalable.

Ajouté par Roland Telle il y a presque 11 ans. Mis à jour il y a plus de 10 ans.

Statut:
Fermé
Priorité:
Bas
Assigné à:
Catégorie:
IHM
Version cible:
-
Début:
27/06/2013
Echéance:
% réalisé:

100%

Temps estimé:
Version utilisée:

Description

Lorsque dans la liste des adhérents, on clique le bouton "Supprimer" sans sélection préalable, le message "Voulez-vous réellement effacer ..." s'affiche suivi de - si on clique "Ok" ou "Annuler" - "Assurez-vous de sélectionner ...".

Mis à jour par Johan Cwiklinski il y a presque 11 ans

  • Statut changé de Nouveau à In Progress
  • Catégorie mis à IHM
  • Assigné à mis à Johan Cwiklinski

Le correctif, en attendant une nouvelle release :

diff --git a/galette/includes/smarty_plugins/function._T.php b/galette/includes/smarty_plugins/function._T.php
index b140374..86a2c98 100644
--- a/galette/includes/smarty_plugins/function._T.php
+++ b/galette/includes/smarty_plugins/function._T.php
@@ -56,6 +56,8 @@ function smarty_function__T($params, &$smarty)
         $ret = _T($string);
     }
     if ( isset($escape) ) {
+        //replace insecable spaces
+        $ret = str_replace(' ', ' ', $ret);
         //for the moment, only 'js' type is know
         $ret = htmlspecialchars($ret, ENT_QUOTES, 'UTF-8');
     }
diff --git a/galette/templates/default/gestion_adherents.tpl b/galette/templates/default/gestion_adherents.tpl
index 27094a9..b5e7a7d 100644
--- a/galette/templates/default/gestion_adherents.tpl
+++ b/galette/templates/default/gestion_adherents.tpl
@@ -131,7 +131,7 @@
                     <td colspan="7" id="table_footer">
                         <ul class="selection_menu">
                             <li>{_T string="For the selection:"}</li>
-                            <li><input type="submit" id="delete" onclick="return confirm('{_T string="Do you really want to delete all selected accounts (and related contributions)?"|escape:"javascript"}');" name="delete" value="{_T stri
+                            <li><input type="submit" id="delete" name="delete" value="{_T string="Delete"}"/></li>
     {if $pref_mail_method neq constant('Galette\Core\GaletteMail::METHOD_DISABLED')}
                             <li><input type="submit" id="sendmail" name="mailing" value="{_T string="Mail"}"/></li>
     {/if}
@@ -192,7 +192,7 @@
                         <a href="ajouter_adherent.php?id_adh={$member->id}"><img src="{$template_subdir}images/icon-edit.png" alt="{_T string="[mod]"}" width="16" height="16" title="{_T string="%membername: edit informations" pattern="/%
 {if $login->isAdmin() or $login->isStaff()}
                         <a href="gestion_contributions.php?id_adh={$member->id}"><img src="{$template_subdir}images/icon-money.png" alt="{_T string="[$]"}" width="16" height="16" title="{_T string="%membername: contributions" pattern="/%
-                        <a onclick="return confirm('{_T string="Do you really want to delete this member from the base? This will also delete the history of his fees. You could instead disable the account.\n\nDo you still want to delete 
+                        <a onclick="return confirm('{_T string="Do you really want to delete this member from the base? This will also delete the history of his fees. You could instead disable the account.\n\nDo you still want to delete 
 {/if}
             {* If some additionnals actions should be added from plugins, we load the relevant template file
             We have to use a template file, so Smarty will do its work (like replacing variables). *}
@@ -354,6 +354,10 @@
                         _attendance_sheet_details();
                         return false;
                     }
+
+                    if ( this.id == 'delete' ) {
+                        return confirm('{_T string="Do you really want to delete all selected accounts (and related contributions)?" escape="js"}');
+                    }
                     return true;
                 }
             });

Mis à jour par Roland Telle il y a presque 11 ans

  • Assigné à Johan Cwiklinski supprimé

Comment récupérer le contenu complet de la ligne 32 du correctif ?

Mis à jour par Johan Cwiklinski il y a presque 11 ans

Arf... Je n'avais pas fait attention à ça :/ Tu peux l'ignorer celle là, c'est juste pour harmoniser les différents appels, ça ne fait pas partie de la solution au problème ;)

Mis à jour par Johan Cwiklinski il y a presque 11 ans

  • Assigné à mis à Johan Cwiklinski

Mis à jour par Johan Cwiklinski il y a plus de 10 ans

  • % réalisé changé de 0 à 100
  • Statut changé de In Progress à Résolu

Mis à jour par Johan Cwiklinski il y a plus de 10 ans

  • Statut changé de Résolu à Fermé
Actions

Formats disponibles : Atom PDF