1<xsl:stylesheet 2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> 3 4 <xsl:include href="footer.xsl"/> 5 <xsl:include href="headscripts.xsl"/> 6 <xsl:include href="headeradminproject.xsl"/> 7 8 <!-- Include local common files --> 9 <xsl:include href="local/footer.xsl"/> 10 <xsl:include href="local/headscripts.xsl"/> 11 <xsl:include href="local/headeradminproject.xsl"/> 12 13 <xsl:output method="xml" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" 14 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> 15 16 <xsl:template match="/"> 17 <html> 18 <head> 19 <title><xsl:value-of select="cdash/title"/></title> 20 <meta name="robots" content="noindex,nofollow" /> 21 <link rel="StyleSheet" type="text/css"> 22 <xsl:attribute name="href"><xsl:value-of select="cdash/cssfile"/></xsl:attribute> 23 </link> 24 25 <!-- Include project roles --> 26 <script src="javascript/jquery-1.6.2.js" type="text/javascript"></script> 27 <script src="javascript/cdashManageUsers.js" type="text/javascript"></script> 28 <!-- Functions to confirm the email --> 29 <xsl:text disable-output-escaping="yes"> 30 <script language="JavaScript" type="text/javascript"> 31 function confirmRemove() { 32 if (window.confirm("Are you sure you want to remove this user from the database?")){ 33 return true; 34 } 35 return false; 36 } 37 38 function generatePassword() 39 { 40 var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; 41 var passwd = ""; 42 for(x=0;x<12;x++) 43 { 44 i = Math.floor(Math.random() * 62); 45 passwd += chars.charAt(i); 46 } 47 $("input#passwd").val(passwd); 48 $("input#passwd2").val(passwd); 49 $("#clearpasswd").html("("+passwd+")"); 50 } 51 52 </script> 53 </xsl:text> 54 </head> 55 <body bgcolor="#ffffff"> 56<xsl:choose> 57<xsl:when test="/cdash/uselocaldirectory=1"> 58 <xsl:call-template name="headeradminproject_local"/> 59</xsl:when> 60<xsl:otherwise> 61 <xsl:call-template name="headeradminproject"/> 62</xsl:otherwise> 63</xsl:choose> 64 65<br/> 66 67<xsl:if test="string-length(cdash/warning)>0"> 68<div style="color: green;"><xsl:value-of select="cdash/warning"/></div><br/> 69</xsl:if> 70 71<div style="color: red;"><xsl:value-of select="cdash/error" /></div> 72 73<form method="post" action="manageUsers.php" name="regform"> 74<table width="100%" border="0"> 75 <tr> 76 <td><div align="right"></div></td> 77 <td bgcolor="#DDDDDD"><strong>Search for already registered users</strong></td> 78 </tr> 79 <tr> 80 <td><div align="right"></div></td> 81 <td> 82 <xsl:choose> 83 <xsl:when test="/cdash/fullemail"> 84 <i>type the full email address of the user to add</i> 85 </xsl:when> 86 <xsl:otherwise> 87 <i>start typing a name or email address (% to display all users)</i> 88 </xsl:otherwise> 89 </xsl:choose> 90 </td> 91 </tr> 92 <tr> 93 <td><div align="right">Search:</div></td> 94 <td><input name="search" type="text" id="search" size="40"> 95 <xsl:attribute name="value"><xsl:value-of select="cdash/search"/></xsl:attribute> 96 </input> 97 </td> 98 </tr> 99 <tr> 100 <td><div align="right"></div></td> 101 <td><div name="newuser" id="newuser"></div></td> 102 </tr> 103 <tr> 104 <td></td> 105 <td bgcolor="#DDDDDD"><strong>Add new user</strong></td> 106 </tr> 107 <tr class="treven"> 108 <td width="20%" height="2" class="nob"><div align="right"> First Name: </div></td> 109 <td width="80%" height="2" class="nob"><input class="textbox" name="fname" size="20"/></td> 110</tr> 111<tr class="trodd"> 112 <td width="20%" height="2" class="nob"><div align="right"> Last Name: </div></td> 113 <td width="80%" height="2" class="nob"><input class="textbox" name="lname" size="20"/></td> 114</tr> 115<tr class="treven"> 116 <td width="20%" height="2" class="nob"><div align="right"> Email: </div></td> 117 <td width="80%" height="2" class="nob"><input class="textbox" name="email" size="20"/></td> 118</tr> 119<tr class="trodd"> 120 <td width="20%" height="2" class="nob"><div align="right">Password: </div></td> 121 <td width="80%" height="2" class="nob"><input class="textbox" type="password" id="passwd" name="passwd" size="20"/> 122 <input type="button" value="Generate Password" onclick="javascript:generatePassword();" name="generatepassword" class="textbox"/> 123 <span id="clearpasswd"></span> 124 </td> 125</tr> 126<tr class="treven"> 127 <td width="20%" height="2" class="nob"><div align="right">Confirm Password: </div></td> 128 <td width="80%" height="2" class="nob"><input class="textbox" type="password" id="passwd2" name="passwd2" size="20"/></td> 129</tr> 130<tr class="trodd"> 131 <td width="20%" height="2" class="nob"><div align="right"> Institution: </div></td> 132 <td width="80%" height="2" class="nob"><input class="textbox" name="institution" size="20"/></td> 133</tr> 134<tr> 135 <td width="20%" class="nob"></td> 136 <td width="80%" class="nob"><input type="submit" value="Add user >>" name="adduser" class="textbox"/> 137 (password will be display in clear upon addition) 138 </td> 139</tr> 140</table> 141</form> 142 143<!-- FOOTER --> 144<xsl:choose> 145<xsl:when test="/cdash/uselocaldirectory=1"> 146 <xsl:call-template name="footer_local"/> 147</xsl:when> 148<xsl:otherwise> 149 <xsl:call-template name="footer"/> 150</xsl:otherwise> 151</xsl:choose> 152 153 </body> 154 </html> 155 </xsl:template> 156</xsl:stylesheet> 157