Project

General

Profile

« Previous | Next » 

Revision 2655

Added by sgarg almost 18 years ago

Changes in login.xsl and moderator.html so that once the moderator logs in, the resultset is displayed

View differences:

moderator.html
36 36
          src="@systemidserver@@style-skins-path@/esa/esa.js"></script>
37 37
  <script language="JavaScript" type="text/JavaScript"
38 38
          src="@systemidserver@@style-common-path@/branding.js"></script>
39

  
40
  <script language="JavaScript" type="text/javascript">
41
  function submitform(formObj) {
42

  
43
  if (trim(formObj.elements["loginAction"].value)!="Login") return true;
44
  //trim username & passwd:
45
  var username = trim(formObj.elements["uid"].value);
46
  var organization  = trim(formObj.elements["organization"].value);
47
  var password      = trim(formObj.elements["password"].value);
48

  
49
  if (username=="") {
50
    alert("You must type a username. \n"+popupMsg);
51
        formObj.elements["uid"].focus();
52
    return false;
53
  }
54

  
55
  if (organization=="") {
56
    alert("You must select an organization. \n"+popupMsg);
57
        formObj.elements["organization"].focus();
58
    return false;
59
  }
60

  
61
  if (password=="") {
62
    alert("You must type a password. \n"+popupMsg);
63
        formObj.elements["password"].focus();
64
    return false;
65
  }
66

  
67
  formObj.username.value="uid="+formObj.elements["uid"].value+",o="+formObj.elements["organization"].value+",dc=ecoinformatics,dc=org";
68
  return true;
69
}
70

  
71
function trim(stringToTrim) {
72
  return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
73
}
74

  
75
 </script>
76

  
39 77
</head>
40 78
<body>
41 79
      <script language="JavaScript">
......
45 83
  <b>Login Page for Moderators</b>
46 84
  <br />
47 85
  <menu>
48
  <form name="loginform" method="post" action="@servlet-path@"
49
  target="_top" id="loginform">
86
<form name="loginform" method="post" action="@servlet-path@"
87
  target="_top" onsubmit="return submitform(this);" id="loginform">
50 88
    <input type="hidden" name="action" value="login"> <input type=
51 89
    "hidden" name="username" value=""> <input type="hidden" name=
52 90
    "qformat" value="esa"> <input type="hidden" name=
......
69 107
        <td align="left" class="text_plain" style=
70 108
        "padding-top: 2px; padding-bottom: 2px;"><select name=
71 109
        "organization" style="width:140px;">
72
          <option value="NCEAS">NCEAS</option>
110
          <option value=""    selected>&#8212; choose one &#8212;</option>
111
          <option value="NCEAS"       >NCEAS</option>
112
          <option value="UCNRS"       >UCNRS</option>
113
          <option value="PISCO"       >PISCO</option>
114
          <option value="OBFS"        >OBFS</option>
115
          <option value="SDSC"        >SDSC</option>
116
          <option value="KU"          >KU</option>
117
          <option value="unaffiliated">unaffiliated</option>
73 118
        </select></td>
74 119
      </tr>
75 120

  
......
97 142
      </tr>
98 143
    </table>
99 144
  </form>
145

  
100 146
  </menu>
101 147
  </li>
102 148
  <p>&nbsp;</p>

Also available in: Unified diff