Revision 2655
Added by sgarg about 19 years ago
lib/style/skins/esa/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>— choose one —</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> </p> |
lib/style/skins/esa/login.xsl | ||
---|---|---|
32 | 32 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
33 | 33 |
|
34 | 34 |
<xsl:output method="html"/> |
35 |
<xsl:param name="sessid"/>
|
|
36 |
<xsl:param name="qformat">default</xsl:param> |
|
35 |
<!-- <xsl:param name="sessid">default</xsl:param>
|
|
36 |
--> <xsl:param name="qformat">default</xsl:param>
|
|
37 | 37 |
<xsl:param name="enableediting">false</xsl:param> |
38 | 38 |
<xsl:template match="/"> |
39 | 39 |
<html> |
... | ... | |
46 | 46 |
src="@style-common-path@/branding.js" /> |
47 | 47 |
</head> |
48 | 48 |
|
49 |
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> |
|
50 | 49 |
<script language="JavaScript"> |
51 | 50 |
insertTemplateOpening(); |
52 | 51 |
insertSearchBox(); |
53 | 52 |
</script> |
54 | 53 |
<xsl:if test="count(login) > 0"> |
55 |
<script language="JavaScript"> |
|
56 |
<![CDATA[ |
|
57 |
window.location="@servlet-path@?action=squery&qformat=esa&query=<pathquery version=\"1.2\"><querytitle>Moderator-Search</querytitle><returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype><returndoctype>-//NCEAS//resource//EN</returndoctype><returndoctype>-//NCEAS//eml-dataset//EN</returndoctype><returnfield>originator/individualName/surName</returnfield><returnfield>originator/individualName/givenName</returnfield><returnfield>creator/individualName/surName</returnfield><returnfield>creator/individualName/givenName</returnfield><returnfield>originator/organizationName</returnfield><returnfield>creator/organizationName</returnfield><returnfield>dataset/title</returnfield><returnfield>keyword</returnfield><querygroup operator=\"INTERSECT\"><queryterm searchmode=\"not-contains\" casesensitive=\"false\"><value>public</value><pathexpr>dataset/access/allow/principal</pathexpr></queryterm></querygroup></pathquery>" |
|
58 |
]]> |
|
54 |
<script language="JavaScript"> |
|
55 |
function search(){ |
|
56 |
window.location.href="/knb-pg/metacat?action=squery&qformat=esa&query=%3Cpathquery%20version=%221.2%22%3E%3Cquerytitle%3EModerator-Search%3C/querytitle%3E%3Creturndoctype%3Eeml://ecoinformatics.org/eml-2.0.1%3C/returndoctype%3E%3Creturndoctype%3Eeml://ecoinformatics.org/eml-2.0.0%3C/returndoctype%3E%3Creturndoctype%3E-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN%3C/returndoctype%3E%3Creturndoctype%3E-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN%3C/returndoctype%3E%3Creturndoctype%3E-//NCEAS//resource//EN%3C/returndoctype%3E%3Creturndoctype%3E-//NCEAS//eml-dataset//EN%3C/returndoctype%3E%3Creturnfield%3Eoriginator/individualName/surName%3C/returnfield%3E%3Creturnfield%3Eoriginator/individualName/givenName%3C/returnfield%3E%3Creturnfield%3Ecreator/individualName/surName%3C/returnfield%3E%3Creturnfield%3Ecreator/individualName/givenName%3C/returnfield%3E%3Creturnfield%3Eoriginator/organizationName%3C/returnfield%3E%3Creturnfield%3Ecreator/organizationName%3C/returnfield%3E%3Creturnfield%3Edataset/title%3C/returnfield%3E%3Creturnfield%3Ekeyword%3C/returnfield%3E%3Cquerygroup%20operator=%22INTERSECT%22%3E%3Cqueryterm%20searchmode=%22not-contains%22%20casesensitive=%22false%22%3E%3Cvalue%3Epublic%3C/value%3E%3Cpathexpr%3Edataset/access/allow/principal%3C/pathexpr%3E%3C/queryterm%3E%3C/querygroup%3E%3C/pathquery%3E"; |
|
59 | 57 |
</script> |
58 |
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="timerID=setTimeout('search()',1000)"> |
|
59 |
<p class="text_plain"><xsl:value-of select="login/message" /></p> |
|
60 |
</body> |
|
60 | 61 |
</xsl:if> |
61 | 62 |
<xsl:if test="count(unauth_login) > 0"> |
63 |
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> |
|
62 | 64 |
<p class="text_plain"><xsl:value-of select="unauth_login/message" /></p> |
65 |
</body> |
|
63 | 66 |
</xsl:if> |
64 | 67 |
<p class="text_plain">Return to the <a href="@systemidserver@@style-skins-path@/esa/" target="_top">Registry home</a>. |
65 | 68 |
</p> |
66 | 69 |
<script language="JavaScript"> |
67 | 70 |
insertTemplateClosing(); |
68 | 71 |
</script> |
69 |
</body> |
|
70 | 72 |
</html> |
71 | 73 |
</xsl:template> |
72 | 74 |
|
Also available in: Unified diff
Changes in login.xsl and moderator.html so that once the moderator logs in, the resultset is displayed