Ignore:
Timestamp:
May 2, 2011, 7:57:24 PM (14 years ago)
Author:
roby
Message:
  • Rielaborata la funzione di cancellazione dei dati dello spoglio (in Autorizza comuni) e dell'intera consultazione (se completamente vuota) in Consultazioni (menu superuser).
  • ritocchi vari
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/modules/Elezioni/ele_associazioni.php

    r86 r87  
    5757$prefix=$_SESSION['prefix'];
    5858############# Controllo flag per cancellazione consultazione
    59         echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n"
    60         ."//-->\n";
    61         echo "function del_cons() {\n";
    62         echo "if (document.model.pwd3.checked==false) {\n";
    63         echo "document.model.chiusa.options[3].selected=false \n";
    64         echo "document.model.pwd4.checked=false \n";
    65         echo "document.getElementById('trspunta').style.visibility='hidden' \n";
    66         echo "} \n";
    67         echo "else document.getElementById('trspunta').style.visibility='visible' \n";
    68         echo "if (document.model.chiusa.options[3].selected==false) {
    69          \n";
    70         echo "document.model.add.value=\""._MODIFY."\" \n";
    71         echo "document.model.do.value=\"update\" \n";
    72         echo "}else{\n";
    73     echo "if (document.model.pwd4.checked==false) \n";
    74         echo "document.model.add.value=\""._DELETE." "._DATI."\" \n";
    75         echo "else document.model.add.value=\""._DELETE." "._CONSULTA."\" \n";
    76         echo "document.model.do.value=\"delete\" \n";
    77         echo "} \n";   
    78         echo "} \n";
    79         echo "</script>\n";
     59        echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n"
     60     ."//-->\n";
     61     echo "function del_cons() {\n";
     62     echo "if (document.getElementById('pwd3').checked==false) {\n";
     63     echo "if (document.getElementById('chiusa').selectedIndex==3) document.getElementById('chiusa').options[0].selected=true \n";
     64     echo "document.getElementById('pwd4').checked=false \n";
     65     echo "document.getElementById('trspunta').style.visibility='hidden' \n";
     66     echo "} \n";
     67     echo "else document.getElementById('trspunta').style.visibility='visible' \n";
     68#     echo "if (document.getElementById('chiusa').options[3].selected==false) { \n";
     69     echo "if (document.getElementById('chiusa').selectedIndex!=3) { \n";
     70     echo "document.getElementById('add').value=\""._MODIFY."\" \n";
     71     echo "document.getElementById('do').value=\"update\" \n";
     72     echo "}else{\n";
     73     echo "if (document.getElementById('pwd4').checked==false) \n";
     74     echo "document.getElementById('add').value=\""._DELETE." "._DATI."\" \n";
     75     echo "else document.getElementById('add').value=\""._DELETE." "._CONSULTA."\" \n";
     76     echo "document.getElementById('do').value=\"delete\" \n";
     77     echo "} \n";     
     78     echo "} \n";
     79     echo "</script>\n";
     80 
     81
    8082#########################
    8183        if (isset($help)) include("language/$language/ele_associazioni.html");
     
    131133        $selez['3']='';
    132134        $selez[$chiusa]="selected";
    133         echo "<td><select name=\"chiusa\" onChange=\"del_cons()\">";
     135        echo "<td><select name=\"chiusa\" id=\"chiusa\" onChange=\"javascript:del_cons()\">";
    134136                echo "<option value=\"0\" ".$selez[0].">"._ATTIVA;
    135137                echo "<option value=\"1\" ".$selez[1].">"._CHIUSA;
     
    153155        echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">";
    154156        if ($idcomune) {
    155                 echo "<input type=\"hidden\" name=\"do\" value=\"update\">";
     157                echo "<input type=\"hidden\" id=\"do\" name=\"do\" value=\"update\">";
    156158                echo "<input type=\"hidden\" name=\"idcomune\" value=\"$idcomune\">";
    157                 echo "<input type=\"submit\" name=\"add\" value=\""._MODIFY."\" ></td></tr>";
    158                 echo "<tr><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL1."</legend><label id=\"prov1\">"._SPUNTAELIMINA." <input type=\"checkbox\" name=\"pwd3\" value=\"\" onchange=\"del_cons()\"></label></fieldset></td></tr>";
    159                 echo "<tr id=\"trspunta\" style=\"visibility:hidden\"><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL2."</legend><label id=\"prov\">"._VIASPUNTAELIMINA." <input type=\"checkbox\" name=\"pwd4\" value=\"1\" onchange=\"del_cons()\"></label></fieldset>";
     159                echo "<input type=\"submit\" id=\"add\" name=\"add\" value=\""._MODIFY."\" ></td></tr>";
     160                echo "<tr><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL1."</legend><label id=\"prov1\">"._SPUNTAELIMINA." <input type=\"checkbox\" id=\"pwd3\" name=\"pwd3\" value=\"\" onclick=\"javascript:del_cons()\"></label></fieldset></td></tr>";
     161# <div  id=\"trspunta\" style=\"visibility:hidden\">   </div>
     162                echo "<tr id=\"trspunta\" style=\"visibility:hidden\"><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL2."</legend><label id=\"prov\">"._VIASPUNTAELIMINA." <input type=\"checkbox\" id=\"pwd4\" name=\"pwd4\" value=\"1\" onclick=\"javascript:del_cons()\"></label></fieldset>";
    160163        }else{
    161164                echo "<input type=\"hidden\" name=\"do\" value=\"add\">";
     
    209212                echo "</table></td></tr>";
    210213        CloseTable();
    211         echo "</div>";
     214#       echo "</div>";
    212215        }
    213216
     
    275278?>
    276279
     280
Note: See TracChangeset for help on using the changeset viewer.