Changeset 14344


Ignore:
Timestamp:
2007-08-08T16:07:45+12:00 (15 years ago)
Author:
qq6
Message:

fixed some error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/default/transform/authen.xsl

    r14297 r14344  
    320320    <xsl:param name="authen_service"/>
    321321    <xsl:param name="pro_action"/>
    322     <div id="loginform">
    323       <form name="LoginForm" method="get" action="{$library_name}">
     322    <div>
     323      <form id="LoginForm" method="get" action="{$library_name}">
    324324    <input type='hidden' name='a' value='g'/>
    325325    <input type='hidden' name='sa' value='{$sub_action}'/>
     
    398398    <xsl:param name="pw_s"/>
    399399    <xsl:param name="asn"/>
    400     <div id="loginform">
    401       <form name="LoginForm" method="get" action="{$library_name}">
     400    <div>
     401      <form id="modifyForm" method="get" action="{$library_name}">
    402402    <input type='hidden' name='a' value='g'/>
    403403    <input type='hidden' name='sa' value='{$sub_action}'/>
     
    432432    <xsl:param name="umun_s"/>
    433433    <xsl:param name="asn"/>
    434     <div id="loginform">
    435       <form name="LoginForm" method="get" action="{$library_name}">
     434    <div >
     435      <form id="deleteForm" method="get" action="{$library_name}">
    436436    <input type='hidden' name='a' value='g'/>
    437437    <input type='hidden' name='sa' value='{$sub_action}'/>
     
    463463    <xsl:param name="oumun_s"/>
    464464    <xsl:param name="asn"/>
    465     <div id="loginform">
    466       <form name="LoginForm" method="get" action="{$library_name}">
     465    <div>
     466      <form id="editForm" method="get" action="{$library_name}">
    467467    <input type='hidden' name='a' value='g'/>
    468468    <input type='hidden' name='sa' value='{$sub_action}'/>
     
    496496          </select></td><td></td></tr>
    497497      <tr><td>
    498           <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups')"/></td><td><input type="text" name="s1.umgp" size="70" value="{$umgp_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups_describe')"/></font></td></tr>
     498          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups')"/></td><td><input type="text" id="group" name="s1.umgp" size="70" value="{$umgp_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups_describe')"/></font></td></tr>
    499499      <tr>
    500500        <td></td>
     
    529529        var groupExit;
    530530
    531         itemSelected=document.forms[0].groups.options.selectedIndex;
    532         if (document.forms[0].elements[12].value==""){
    533             document.forms[0].elements[12].value=document.forms[0].elements[12].value+document.forms[0].groups.options[itemSelected].text;
     531    if (document.getElementById("editForm")!=null){
     532        itemSelected=document.getElementById("editForm").groups.options.selectedIndex;
     533        if (document.getElementById("group").value==""){
     534            document.getElementById("group").value=document.getElementById("group").value+document.getElementById("editForm").groups.options[itemSelected].text;
    534535        }else{
    535             splitGroup=document.forms[0].elements[12].value.split(",");
     536            splitGroup=document.getElementById("group").value.split(",");
    536537            for (var i=0; i &lt; splitGroup.length; i++){
    537                if (splitGroup[i]==document.forms[0].groups.options[itemSelected].text){
    538                   alert(document.forms[0].groups.options[itemSelected].text + " has been added.");
     538               if (splitGroup[i]==document.getElementById("editForm").groups.options[itemSelected].text){
     539                  alert(document.getElementById("editForm").groups.options[itemSelected].text + " has been added.");
    539540                  groupExit=1;
    540541                  break;
     
    542543            }
    543544            if (groupExit!=1) {
    544                document.forms[0].elements[12].value=document.forms[0].elements[12].value+","+document.forms[0].groups.options[itemSelected].text;
     545               document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById("editForm").groups.options[itemSelected].text;
    545546            }
    546547        }
    547         document.forms[0].groups.options[itemSelected]=new Option("",itemSelected);
     548        document.getElementById("editForm").groups.options[itemSelected]=new Option("",itemSelected);
     549    }
    548550    }
    549551      </xsl:text>
     
    557559    function loadGroup(){
    558560      // three constant group "administrator","all-collections-editor","personal-collections-editor"
    559        var group_string=document.forms[0].elements[12].value=document.forms[0].elements[12].value;
    560        var split_group_string=group_string.split(",");
    561        var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
    562        var find;
    563        document.forms[0].groups.length=3;
    564 
    565       if (group_string=="") {
    566          for (i=0; i &lt; 3;i++){
    567           document.forms[0].groups.options[i]=new Option(group_arr[i],i);
    568         }
    569       }else{
     561
     562    var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
     563    var find;
     564   
     565    if (document.getElementById("editForm")!=null){
     566       document.getElementById("editForm").groups.length=3;
     567       if (document.getElementById("group").value=="") {
     568          for (i=0; i &lt; 3;i++){
     569          document.getElementById("editForm").groups.options[i]=new Option(group_arr[i],i);
     570          }
     571       }else{
     572         var group_string=document.getElementById("group").value;
     573         var split_group_string=group_string.split(",");
    570574         for (i=0; i &lt; 3; i++){
    571575            find=0
     
    577581            }
    578582            if (find==0){
    579                    document.forms[0].groups.options[i]=new Option(group_arr[i],i);
     583                   document.getElementById("editForm").groups.options[i]=new Option(group_arr[i],i);
    580584                }
    581585         }
    582586      }
     587    }
    583588    }
    584589      </xsl:text>
     
    592597    function trans(){
    593598      // trnasform "true" to "enabled", "false" to "disabled" for 'account status', and split one line of groups into several lines
     599       if (document.getElementById('mainTable')!=null){
    594600       var num= document.getElementById('mainTable').getElementsByTagName('tr').length;
    595601       for (i=1; i &lt; num; i++){
     
    609615       }
    610616    }
     617    }
    611618      </xsl:text>
    612619    </script>   
Note: See TracChangeset for help on using the changeset viewer.