 	<p>
 		This form facilitates new collection creation in Arctos. This is a request only; you cannot create a collection with this form.
 	</p>
+	<h2>Existing Requests</h2>
+	<cfquery name="d" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
+		select * from pre_new_institution order by insert_date desc
+	</cfquery>
+		<cfoutput>
+			<table border>
+				<tr>
+					<th>Institutiton Acronym</th>
+					<th>CreateDate</th>
+					<th>Status</th>
+					<th>Manage</th>
+				</tr>
+				<cfloop query="d">
+					<tr>
+						<td>#institution_acronym#</td>
+						<td>#dateformat(insert_date,'yyyy-mm-dd')#</td>
+						<td>#status#</td>
+						<td>
+							<form action="new_collection.cfm">
+								<input type="hidden" name="action" value="manage">
+								<label for="password">
+									Enter the password provided when you created this request
+									<cfif isdefined("session.roles") and session.roles contains "global_admin">
+									 You're admin; no password necessary.
+									</cfif>
+								</label>
+								<input type="password" name="tpwd"
+									<cfif isdefined("session.roles") and session.roles contains "global_admin">
+										value="#user_pwd#"
+									</cfif>
+								>
+								<input type="submit" value="go">
+							</form>
+					</tr>
+				</cfloop>
+			</table>
+		</cfoutput>
+
+
+	If you have created a request, fill in the form with the password and Institution Acronym you used in the initial request and click "manage existing request."
+	<p>
+	<form name="f" id="f" method="post" action="new_collection.cfm">
+		<input type="hidden" name="action" value="edit">
+		<label for="institution_acronym">Institution Acronym</label>
+		<input type="text" name="guid_prefix" id="guid_prefix" class="reqdClr" required>
+		<label for="user_pwd">Password</label>
+		<input type="text" name="user_pwd" id="user_pwd" class="reqdClr" required>
+		<br><input type="button" class="insBtn" onclick="document.f.action.value='newCollectionRequest';document.f.submit();" value="create collection request">
+		<br><input type="button" class="lnkBtn" onclick="document.f.action.value='mgCollectionRequest';document.f.submit();" value="manage existing request">
+	</form>
+
+
+
 	<h2>Request a new collection</h2>
 	If this is a new request, first
 	<a href="http://handbook.arctosdb.org/documentation/catalog.html#guid-prefix">CAREFULLY review the GUID_prefix documentation</a>,

<cfset title="New Collection Portal">

<!----
	create table pre_new_collection (
		ncid number,
		user_pwd VARCHAR2(255),
		COLLECTION_CDE varchar2(5),
		INSTITUTION_ACRONYM VARCHAR2(20),
		DESCR VARCHAR2(4000),
		COLLECTION VARCHAR2(50),
		WEB_LINK  VARCHAR2(4000),
		WEB_LINK_TEXT  VARCHAR2(50),
		LOAN_POLICY_URL VARCHAR2(255),
		INSTITUTION VARCHAR2(255),
		GUID_PREFIX VARCHAR2(20),
		PREFERRED_TAXONOMY_SOURCE VARCHAR2(255),
		CATALOG_NUMBER_FORMAT  VARCHAR2(21),

		mentor_contact varchar2(4000),
		admin_username VARCHAR2(255),
		status varchar2(255),
		use_license_id number,
		final_message VARCHAR2(4000),
		contact_email VARCHAR2(4000),
		initiated_by_username VARCHAR2(255),
		insert_date date,
		CONSTRAINT PK_pre_new_coln PRIMARY KEY (ncid) USING INDEX TABLESPACE UAM_IDX_1,
		CONSTRAINT FK_p_n_c FOREIGN KEY (niid)	REFERENCES pre_new_institution (niid)
	) TABLESPACE UAM_DAT_1;


	create or replace public synonym pre_new_collection for pre_new_collection;

	grant select, insert, update on pre_new_collection to public;

