From a541b7b9331dffceac4c16a9db06fe0033b01b19 Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Sun, 26 Nov 2006 15:15:31 +0000 Subject: [PATCH] =?UTF-8?q?duplication=20des=20boutons=20cach=C3=A9s=20dan?= =?UTF-8?q?s=20debut=5Fadmin,=20ce=20qui=20empechait=20la=20s=C3=A9lection?= =?UTF-8?q?=20pour=20presse-papier=20de=20fonctionner=20si=20on=20recharge?= =?UTF-8?q?ait=20la=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc/admin.php | 22 +++++++++++----------- ecrire/inc/minipres.php | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ecrire/inc/admin.php b/ecrire/inc/admin.php index 137be23146..67afdb4a40 100644 --- a/ecrire/inc/admin.php +++ b/ecrire/inc/admin.php @@ -33,6 +33,7 @@ function debut_admin($script, $action, $commentaire='') { } $signal = fichier_admin($action); + spip_log("debut_admin $signal"); if (@file_exists($dir . $signal)) { spip_log ("Action admin: $action"); return true; @@ -51,15 +52,12 @@ function debut_admin($script, $action, $commentaire='') { 'fichier' => array( 'label' => _T('info_creer_repertoire'), 'valeur' => '' - ), - 'bouton' => array( - 'label' => _T('info_creer_repertoire_2', array('repertoire' => joli_repertoire($dir))) .bouton_suivant(_T('bouton_recharger_page')), - 'valeur' => 'bouton', - 'hidden' => true - ) - ) - ) - . "</form>"; + )), + ('<br />' + . _T('info_creer_repertoire_2', array('repertoire' => joli_repertoire($dir))) + . bouton_suivant(_T('bouton_recharger_page')))) + . "</form>"; + minipres(_T('info_action', array('action' => $action)), $form, " onload='barre_inserer(\"$signal\", document.forms[0].fichier)'"); @@ -83,9 +81,11 @@ function fin_admin($action) { function copy_request($script) { $hidden = ""; - $_POST['exec'] = $script; + $args = $_POST; + $args['exec'] = $script; + unset($args['fichier']); include_spip('inc/filtres'); - foreach($_POST as $n => $c) { + foreach($args as $n => $c) { $hidden .= "\n<input type='hidden' name='$n' value='" . entites_html($c) . "' />"; diff --git a/ecrire/inc/minipres.php b/ecrire/inc/minipres.php index fe04705be2..ac487f02b2 100644 --- a/ecrire/inc/minipres.php +++ b/ecrire/inc/minipres.php @@ -95,22 +95,22 @@ function info_etape($titre, $complement = ''){ } // http://doc.spip.org/@fieldset -function fieldset($legend, $champs = array()) { +function fieldset($legend, $champs = array(), $horchamps='') { $fieldset = "<fieldset>\n" . ($legend ? "<legend>".$legend."</legend>\n" : ''); foreach($champs as $nom => $contenu) { $type = $contenu['hidden'] ? 'hidden' : (preg_match(',^pass,', $nom) ? 'password' : 'text'); $class = $contenu['hidden'] ? '' : "class='formo' size='40' "; $fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n"; - $fieldset .= "<input ".$class."type='".$type."' name='".$nom."' value='".$contenu['valeur']."' />\n"; + $fieldset .= "<input ".$class."type='".$type."' name='".$nom."'\nvalue='".$contenu['valeur']."' />\n"; } - $fieldset .= "</fieldset>\n"; + $fieldset .= "$horchamps</fieldset>\n"; return $fieldset; } // http://doc.spip.org/@bouton_suivant function bouton_suivant($code = 'bouton_suivant') { - return "\n<span class='suivant'><input id='suivant' type='submit' class='fondl' value=\"" . + return "\n<span class='suivant'><input id='suivant' type='submit' class='fondl'\nvalue=\"" . _T($code) . " >>\" /></span>\n"; } -- GitLab