Skip to content
Extraits de code Groupes Projets
Valider 1f46c9f3 rédigé par ARNO*'s avatar ARNO*
Parcourir les fichiers

Page des articles: les boutons de validation/ajout d'une valeur sont...

Page des articles: les boutons de validation/ajout d'une valeur sont invisibles au chargement et n'apparaissent qu'apres le choix de la modif.
parent ae20d940
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -846,16 +846,18 @@ if ($flag_editable AND $options == 'avancees') { ...@@ -846,16 +846,18 @@ if ($flag_editable AND $options == 'avancees') {
echo debut_block_invisible("datepub"); echo debut_block_invisible("datepub");
echo "<div style='margin: 5px; margin-$spip_lang_left: 20px;'>"; echo "<div style='margin: 5px; margin-$spip_lang_left: 20px;'>";
echo "<SELECT NAME='jour' SIZE=1 CLASS='fondl'>"; echo "<SELECT NAME='jour' SIZE=1 CLASS='fondl' onChange=\"setvisibility('valider_date', 'visible')\">";
afficher_jour($jour); afficher_jour($jour);
echo "</SELECT> "; echo "</SELECT> ";
echo "<SELECT NAME='mois' SIZE=1 CLASS='fondl'>"; echo "<SELECT NAME='mois' SIZE=1 CLASS='fondl' onChange=\"setvisibility('valider_date', 'visible')\">";
afficher_mois($mois); afficher_mois($mois);
echo "</SELECT> "; echo "</SELECT> ";
echo "<SELECT NAME='annee' SIZE=1 CLASS='fondl'>"; echo "<SELECT NAME='annee' SIZE=1 CLASS='fondl' onChange=\"setvisibility('valider_date', 'visible')\">";
afficher_annee($annee); afficher_annee($annee);
echo "</SELECT>"; echo "</SELECT>";
echo "<span class='visible_au_chargement' id='valider_date'>";
echo " &nbsp; <INPUT TYPE='submit' NAME='Changer' CLASS='fondo' VALUE='"._T('bouton_changer')."'>"; echo " &nbsp; <INPUT TYPE='submit' NAME='Changer' CLASS='fondo' VALUE='"._T('bouton_changer')."'>";
echo "</span>";
echo "</div>"; echo "</div>";
echo fin_block(); echo fin_block();
} }
...@@ -879,21 +881,25 @@ if ($flag_editable AND $options == 'avancees') { ...@@ -879,21 +881,25 @@ if ($flag_editable AND $options == 'avancees') {
echo '<tr><td align="left">'; echo '<tr><td align="left">';
echo '<input type="radio" name="avec_redac" value="non" id="avec_redac_on"'; echo '<input type="radio" name="avec_redac" value="non" id="avec_redac_on"';
if ($annee_redac.'-'.$mois_redac.'-'.$jour_redac == '0000-00-00') echo ' checked="checked"'; if ($annee_redac.'-'.$mois_redac.'-'.$jour_redac == '0000-00-00') echo ' checked="checked"';
echo " onClick=\"setvisibility('valider_date_prec', 'visible')\"";
echo ' /> <label for="avec_redac_on">'._T('texte_date_publication_anterieure_nonaffichee').'</label>'; echo ' /> <label for="avec_redac_on">'._T('texte_date_publication_anterieure_nonaffichee').'</label>';
echo '<br /><input type="radio" name="avec_redac" value="oui" id="avec_redac_off"'; echo '<br /><input type="radio" name="avec_redac" value="oui" id="avec_redac_off"';
if ($annee_redac.'-'.$mois_redac.'-'.$jour_redac != '0000-00-00') echo ' checked="checked"'; if ($annee_redac.'-'.$mois_redac.'-'.$jour_redac != '0000-00-00') echo ' checked="checked"';
echo " onClick=\"setvisibility('valider_date_prec', 'visible')\"";
echo ' /> <label for="avec_redac_off">'._T('bouton_radio_afficher').' :</label> '; echo ' /> <label for="avec_redac_off">'._T('bouton_radio_afficher').' :</label> ';
echo '<select name="jour_redac" class="fondl">'; echo "<select name='jour_redac' class='fondl' onChange=\"setvisibility('valider_date_prec', 'visible')\">";
afficher_jour($jour_redac); afficher_jour($jour_redac);
echo '</select> &nbsp;'; echo '</select> &nbsp;';
echo '<select name="mois_redac" class="fondl">'; echo "<select name='mois_redac' class='fondl' onChange=\"setvisibility('valider_date_prec', 'visible')\">";
afficher_mois($mois_redac); afficher_mois($mois_redac);
echo '</select> &nbsp;'; echo '</select> &nbsp;';
echo '<input type="text" name="annee_redac" class="fondl" value="'.$annee_redac.'" size="5" maxlength="4" />'; echo "<input type='text' name='annee_redac' class='fondl' value='".$annee_redac."' size='5' maxlength='4' onClick=\"setvisibility('valider_date_prec', 'visible')\"/>";
echo '</td><td align="right">'; echo '</td><td align="right">';
echo "<span class='visible_au_chargement' id='valider_date_prec'>";
echo '<input type="submit" name="Changer" class="fondo" value="'._T('bouton_changer').'" />'; echo '<input type="submit" name="Changer" class="fondo" value="'._T('bouton_changer').'" />';
echo "</span>";
echo '</td></tr>'; echo '</td></tr>';
echo '</table>'; echo '</table>';
echo "</div>"; echo "</div>";
...@@ -1148,6 +1154,7 @@ if ($flag_editable AND $options == 'avancees') { ...@@ -1148,6 +1154,7 @@ if ($flag_editable AND $options == 'avancees') {
$retour = urlencode($clean_link->getUrl()); $retour = urlencode($clean_link->getUrl());
icone_horizontale(_T('icone_creer_auteur'), "auteur_infos.php3?new=oui&ajouter_id_article=$id_article&redirect=$retour", "redacteurs-24.gif", "creer.gif"); icone_horizontale(_T('icone_creer_auteur'), "auteur_infos.php3?new=oui&ajouter_id_article=$id_article&redirect=$retour", "redacteurs-24.gif", "creer.gif");
echo "</td>"; echo "</td>";
echo "<td width='20'>&nbsp;</td>";
} }
echo "<td>"; echo "<td>";
...@@ -1159,12 +1166,14 @@ if ($flag_editable AND $options == 'avancees') { ...@@ -1159,12 +1166,14 @@ if ($flag_editable AND $options == 'avancees') {
echo "<DIV><INPUT TYPE='Hidden' NAME='id_article' VALUE=\"$id_article\">"; echo "<DIV><INPUT TYPE='Hidden' NAME='id_article' VALUE=\"$id_article\">";
if (spip_num_rows($result) > 80 AND $flag_mots_ressemblants) { if (spip_num_rows($result) > 80 AND $flag_mots_ressemblants) {
echo "<INPUT TYPE='text' NAME='cherche_auteur' CLASS='fondl' VALUE='' SIZE='20'>"; echo "<INPUT TYPE='text' NAME='cherche_auteur' onClick=\"setvisibility('valider_ajouter_auteur','visible');\" CLASS='fondl' VALUE='' SIZE='20'>";
echo "<span class='visible_au_chargement' id='valider_ajouter_auteur'>";
echo " <INPUT TYPE='submit' NAME='Chercher' VALUE='"._T('bouton_chercher')."' CLASS='fondo'>"; echo " <INPUT TYPE='submit' NAME='Chercher' VALUE='"._T('bouton_chercher')."' CLASS='fondo'>";
echo "</span>";
} }
else { else {
echo "<INPUT TYPE='Hidden' NAME='ajout_auteur' VALUE='oui'>"; echo "<INPUT TYPE='Hidden' NAME='ajout_auteur' VALUE='oui'>";
echo "<SELECT NAME='nouv_auteur' SIZE='1' STYLE='WIDTH=150' CLASS='fondl'>"; echo "<SELECT NAME='nouv_auteur' SIZE='1' STYLE='width:150px;' CLASS='fondl' onChange=\"setvisibility('valider_ajouter_auteur','visible');\">";
$group = false; $group = false;
$group2 = false; $group2 = false;
...@@ -1202,7 +1211,9 @@ if ($flag_editable AND $options == 'avancees') { ...@@ -1202,7 +1211,9 @@ if ($flag_editable AND $options == 'avancees') {
} }
echo "</SELECT>"; echo "</SELECT>";
echo "<span class='visible_au_chargement' id='valider_ajouter_auteur'>";
echo " <INPUT TYPE='submit' NAME='Ajouter' VALUE="._T('bouton_ajouter')." CLASS='fondo'>"; echo " <INPUT TYPE='submit' NAME='Ajouter' VALUE="._T('bouton_ajouter')." CLASS='fondo'>";
echo "</span>";
} }
echo "</div></FORM>"; echo "</div></FORM>";
} }
...@@ -1463,7 +1474,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) { ...@@ -1463,7 +1474,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) {
// $statut_url_javascript="\"articles.php3?id_article=$id_article&methode=image&alea=\"+Math.random()+\"&statut_nouv=\"+options[selectedIndex].value"; // $statut_url_javascript="\"articles.php3?id_article=$id_article&methode=image&alea=\"+Math.random()+\"&statut_nouv=\"+options[selectedIndex].value";
$statut_url_javascript="puce_statut(options[selectedIndex].value);"; $statut_url_javascript="puce_statut(options[selectedIndex].value);";
echo "<SELECT NAME='statut_nouv' SIZE='1' CLASS='fondl' onChange='document.statut.src=$statut_url_javascript;'>"; echo "<SELECT NAME='statut_nouv' SIZE='1' CLASS='fondl' onChange=\"document.statut.src=$statut_url_javascript; setvisibility('valider_statut', 'visible');\">";
echo "<OPTION" . mySel("prepa", $statut_article) ." style='background-color: white'>"._T('texte_statut_en_cours_redaction')."\n"; echo "<OPTION" . mySel("prepa", $statut_article) ." style='background-color: white'>"._T('texte_statut_en_cours_redaction')."\n";
echo "<OPTION" . mySel("prop", $statut_article) . " style='background-color: #FFF1C6'>"._T('texte_statut_propose_evaluation')."\n"; echo "<OPTION" . mySel("prop", $statut_article) . " style='background-color: #FFF1C6'>"._T('texte_statut_propose_evaluation')."\n";
echo "<OPTION" . mySel("publie", $statut_article) . " style='background-color: #B4E8C5'>"._T('texte_statut_publie')."\n"; echo "<OPTION" . mySel("publie", $statut_article) . " style='background-color: #B4E8C5'>"._T('texte_statut_publie')."\n";
...@@ -1471,10 +1482,12 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) { ...@@ -1471,10 +1482,12 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) {
echo "<OPTION" . mySel("refuse", $statut_article) . " style='background-color: #FFA4A4'>"._T('texte_statut_refuse')."\n"; echo "<OPTION" . mySel("refuse", $statut_article) . " style='background-color: #FFA4A4'>"._T('texte_statut_refuse')."\n";
echo "</SELECT>"; echo "</SELECT>";
echo "<img src='img_pack/puce-".puce_statut($statut_article).".gif' alt='' width='13' height='14' border='0' NAME='statut'>"; echo " &nbsp; <img src='img_pack/puce-".puce_statut($statut_article).".gif' alt='' border='0' NAME='statut'> &nbsp; ";
// echo "<noscript><INPUT TYPE='submit' NAME='Modifier' VALUE='"._T('bouton_modifier')."' CLASS='fondo'></noscript>"; // echo "<noscript><INPUT TYPE='submit' NAME='Modifier' VALUE='"._T('bouton_modifier')."' CLASS='fondo'></noscript>";
echo "<span class='visible_au_chargement' id='valider_statut'>";
echo "<INPUT TYPE='submit' NAME='Modifier' VALUE='"._T('bouton_modifier')."' CLASS='fondo'>"; echo "<INPUT TYPE='submit' NAME='Modifier' VALUE='"._T('bouton_modifier')."' CLASS='fondo'>";
echo "</span>";
echo aide ("artstatut"); echo aide ("artstatut");
echo "</CENTER>"; echo "</CENTER>";
fin_cadre_relief(); fin_cadre_relief();
......
...@@ -285,7 +285,7 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, ...@@ -285,7 +285,7 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot,
$s = "<form action='$url_base#mots' method='post' style='margin:0px; padding: 0px'>"; $s = "<form action='$url_base#mots' method='post' style='margin:0px; padding: 0px'>";
$s .= "<INPUT TYPE='Hidden' NAME='$id_table' VALUE='$id_objet'>"; $s .= "<INPUT TYPE='Hidden' NAME='$id_table' VALUE='$id_objet'>";
if ($table == 'rubriques') $s .= "<INPUT TYPE='Hidden' NAME='coll' VALUE='$id_objet'>"; if ($table == 'rubriques') $s .= "<INPUT TYPE='Hidden' NAME='coll' VALUE='$id_objet'>";
$s .= "<select name='nouv_mot' CLASS='fondl' STYLE='font-size:10px; width:90px;'>"; $s .= "<select name='nouv_mot' onChange=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" CLASS='fondl' STYLE='font-size:10px; width:90px;'>";
$query_autres_mots = "SELECT * FROM spip_mots WHERE id_groupe = $id_groupe"; $query_autres_mots = "SELECT * FROM spip_mots WHERE id_groupe = $id_groupe";
$result_autres_mots = spip_query($query_autres_mots); $result_autres_mots = spip_query($query_autres_mots);
...@@ -299,7 +299,9 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, ...@@ -299,7 +299,9 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot,
} }
$s .= "</select>"; $s .= "</select>";
$s .= "<INPUT TYPE='Hidden' NAME='supp_mot' VALUE='$id_mot'>"; $s .= "<INPUT TYPE='Hidden' NAME='supp_mot' VALUE='$id_mot'>";
$s .= "<span class='visible_au_chargement' id='valider_groupe_$id_groupe'>";
$s .= " &nbsp; <INPUT TYPE='submit' NAME='Choisir' VALUE='"._T('bouton_changer')."' CLASS='fondo' style='font-size: 10px';>"; $s .= " &nbsp; <INPUT TYPE='submit' NAME='Choisir' VALUE='"._T('bouton_changer')."' CLASS='fondo' style='font-size: 10px';>";
$s .= "</span>";
$s .= "</form>"; $s .= "</form>";
} else { } else {
...@@ -410,16 +412,18 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, ...@@ -410,16 +412,18 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot,
echo "</td>\n<td>"; echo "</td>\n<td>";
if ($obligatoire == "oui" AND !$groupes_vus[$id_groupe]) if ($obligatoire == "oui" AND !$groupes_vus[$id_groupe])
echo "<INPUT TYPE='text' NAME='cherche_mot' CLASS='fondl' STYLE='width: 180px; background-color:#E86519;' VALUE=\"$titre_groupe\" SIZE='20'>"; echo "<INPUT TYPE='text' NAME='cherche_mot' onClick=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" CLASS='fondl' STYLE='width: 180px; background-color:#E86519;' VALUE=\"$titre_groupe\" SIZE='20'>";
else if ($unseul == "oui") else if ($unseul == "oui")
echo "<INPUT TYPE='text' NAME='cherche_mot' CLASS='fondl' STYLE='width: 180px; background-color:#cccccc;' VALUE=\"$titre_groupe\" SIZE='20'>"; echo "<INPUT TYPE='text' NAME='cherche_mot' onClick=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" CLASS='fondl' STYLE='width: 180px; background-color:#cccccc;' VALUE=\"$titre_groupe\" SIZE='20'>";
else else
echo "<INPUT TYPE='text' NAME='cherche_mot' CLASS='fondl' STYLE='width: 180px; ' VALUE=\"$titre_groupe\" SIZE='20'>"; echo "<INPUT TYPE='text' NAME='cherche_mot' onClick=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" CLASS='fondl' STYLE='width: 180px; ' VALUE=\"$titre_groupe\" SIZE='20'>";
echo "</td>\n<td>"; echo "</td>\n<td>";
echo "<INPUT TYPE='hidden' NAME='select_groupe' VALUE='$id_groupe'>"; echo "<INPUT TYPE='hidden' NAME='select_groupe' VALUE='$id_groupe'>";
echo "<span class='visible_au_chargement' id='valider_groupe_$id_groupe'>";
echo " <INPUT TYPE='submit' NAME='Chercher' VALUE='"._T('bouton_chercher')."' CLASS='fondo' STYLE='font-size:10px'>"; echo " <INPUT TYPE='submit' NAME='Chercher' VALUE='"._T('bouton_chercher')."' CLASS='fondo' STYLE='font-size:10px'>";
echo "</span>";
echo "</td></FORM>"; echo "</td></FORM>";
echo "</tr>"; echo "</tr>";
} }
...@@ -432,11 +436,11 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, ...@@ -432,11 +436,11 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot,
echo "</td>\n<td>"; echo "</td>\n<td>";
if ($obligatoire == "oui" AND !$groupes_vus[$id_groupe]) if ($obligatoire == "oui" AND !$groupes_vus[$id_groupe])
echo "<SELECT NAME='nouv_mot' SIZE='1' STYLE='width: 180px; background-color:#E86519;' CLASS='fondl'>"; echo "<SELECT NAME='nouv_mot' SIZE='1' onChange=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" STYLE='width: 180px; background-color:#E86519;' CLASS='fondl'>";
else if ($unseul == "oui") else if ($unseul == "oui")
echo "<SELECT NAME='nouv_mot' SIZE='1' STYLE='width: 180px; background-color:#cccccc;' CLASS='fondl'>"; echo "<SELECT NAME='nouv_mot' SIZE='1' onChange=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" STYLE='width: 180px; background-color:#cccccc;' CLASS='fondl'>";
else else
echo "<SELECT NAME='nouv_mot' SIZE='1' STYLE='width: 180px; ' CLASS='fondl'>"; echo "<SELECT NAME='nouv_mot' SIZE='1' onChange=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" STYLE='width: 180px; ' CLASS='fondl'>";
$ifond == 0; $ifond == 0;
echo "<OPTION VALUE='x' style='font-variant: small-caps;'>$titre_groupe"; echo "<OPTION VALUE='x' style='font-variant: small-caps;'>$titre_groupe";
...@@ -450,7 +454,9 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, ...@@ -450,7 +454,9 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot,
} }
echo "</SELECT>"; echo "</SELECT>";
echo "</td>\n<td>"; echo "</td>\n<td>";
echo "<span class='visible_au_chargement' id='valider_groupe_$id_groupe'>";
echo " &nbsp; <INPUT TYPE='submit' NAME='Choisir' VALUE='"._T('bouton_choisir')."' CLASS='fondo'>"; echo " &nbsp; <INPUT TYPE='submit' NAME='Choisir' VALUE='"._T('bouton_choisir')."' CLASS='fondo'>";
echo "</span>";
echo "</td></FORM>"; echo "</td></FORM>";
echo "</tr>"; echo "</tr>";
} }
......
...@@ -1285,6 +1285,10 @@ function debut_html($titre = "", $rubrique="", $onLoad="") { ...@@ -1285,6 +1285,10 @@ function debut_html($titre = "", $rubrique="", $onLoad="") {
} }
} }
function setvisibility (objet, statut) {
findObj(objet).style.visibility = statut;
}
function getHeight(obj) { function getHeight(obj) {
if (obj == "window") { if (obj == "window") {
return hauteur_fenetre(); return hauteur_fenetre();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter