<commit_before><%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="org.jasig.portal.*" %>
<%@ page import="com.objectspace.xml.*" %>
<%@ page import= "java.sql.*" %>
<%@ page errorPage="error.jsp" %>
<%@ include file="checkinit.jsp" %>
<%@ include file="checkGuest.jsp" %>

<jsp:useBean id="layoutBean" type="org.jasig.portal.ILayoutBean" class="org.jasig.portal.LayoutBean" scope="session" />
<jsp:useBean id="publish" class="org.jasig.portal.PublisherBean" scope="session" />

<%
String sAction = request.getParameter ("action");


if (sAction != null)
{

  // Ignore changes and return to the layout
  if (sAction.equals ("cancel"))
  {
    response.sendRedirect ("publish.jsp");
  }
}
%>

<%-- UtilitiesBean.preventPageCaching (response); --%>

<html>
<head>
<title>Publish Channel</title>
<link rel=stylesheet href="stylesheets/general.css" TYPE="text/css">

<SCRIPT LANGUAGE="JavaScript">
<!--

function subForm(form) {
  form.submit();
  }
//-->
</SCRIPT>

</head>

<% layoutBean.writeBodyStyle (request, response, out); %>

<%-- Header --%>
<% session.setAttribute ("headerTitle", "Publish Channel"); %>
<%@ include file="header.jsp" %>

<% 
if ((sAction != null) && (sAction.equals("register"))) {
 	if (publish.registerChannel(request)) {%>
	<h2>Congratulations!</h2><br>
	You have successfully published your channel. Once it has been approved, others will be able to
	subscribe to it and view its content.
	<%}
	else { %>
	<h2>Error!</h2>
	Your channel was not successfully registered. Please go back and retry. Notify administrator
	if problem persists.
	<% }
}
else { %>
<%-- Finished and Cancel Changes buttons --%>
<form>
<table border=0 cellspacing=5 cellpadding=5 width="100%"><tr bgcolor="#dddddd"><td>
  <input type=button name=add value="Finished" onClick="subForm(channel)">
  <input type=button name=cancel value="Cancel" onClick="location='publish.jsp'">
</td></tr></table>
<font size=4><b>Preview Channel for Registration</b></font>
</form>

<form method="POST" name="channel" action="previewPublish.jsp?action=register">
<table border=0 cellpadding=3 cellspacing=3>
This is a preview of the channel you are registering. If it is rendered correctly then pick any appropriate categories and click 'Finished'
button to register. Otherwise cancel or go back and make necessary corrections.
<tr bgcolor=#ffffff>
<td>
<% publish.previewChannel(request, response, out); %>
</td>
<td valign="top">
<b>Channel Categories</b><p>
<% publish.writeChannelCats(request, response, out); %>
</td>
</tr>
</table>
</form>

<%-- Finished and Cancel Changes buttons --%>
<form>
<table border=0 cellspacing=5 cellpadding=5 width="100%"><tr bgcolor="#dddddd"><td>
  <input type=button name=add value="Finish" onClick="subForm(channel)">
  <input type=button name=cancel value="Cancel" onClick="location='publish.jsp'">
</td></tr></table>
</form>
<% } %>

<jsp:include page="footer.jsp" flush="true" />

</body>
</html><commit_msg>channel preview area no longer enclosed in form. this will allow for previewing a channel with a form content.<commit_after><%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="org.jasig.portal.*" %>
<%@ page import="com.objectspace.xml.*" %>
<%@ page import= "java.sql.*" %>
<%@ page errorPage="error.jsp" %>
<%@ include file="checkinit.jsp" %>
<%@ include file="checkGuest.jsp" %>

<jsp:useBean id="layoutBean" type="org.jasig.portal.ILayoutBean" class="org.jasig.portal.LayoutBean" scope="session" />
<jsp:useBean id="publish" class="org.jasig.portal.PublisherBean" scope="session" />

<%
String sAction = request.getParameter ("action");


if (sAction != null)
{

  // Ignore changes and return to the layout
  if (sAction.equals ("cancel"))
  {
    response.sendRedirect ("publish.jsp");
  }
}
%>

<%-- UtilitiesBean.preventPageCaching (response); --%>

<html>
<head>
<title>Publish Channel</title>
<link rel=stylesheet href="stylesheets/general.css" TYPE="text/css">

<SCRIPT LANGUAGE="JavaScript">
<!--

function subForm(form) {
  form.submit();
  }
//-->
</SCRIPT>

</head>

<% layoutBean.writeBodyStyle (request, response, out); %>

<%-- Header --%>
<% session.setAttribute ("headerTitle", "Publish Channel"); %>
<%@ include file="header.jsp" %>

<% 
if ((sAction != null) && (sAction.equals("register"))) {
 	if (publish.registerChannel(request)) {%>
	<h2>Congratulations!</h2><br>
	You have successfully published your channel. Once it has been approved, others will be able to
	subscribe to it and view its content.
	<%}
	else { %>
	<h2>Error!</h2>
	Your channel was not successfully registered. Please go back and retry. Notify administrator
	if problem persists.
	<% }
}
else { %>
<%-- Finished and Cancel Changes buttons --%>
<form>
<table border=0 cellspacing=5 cellpadding=5 width="100%"><tr bgcolor="#dddddd"><td>
  <input type=button name=add value="Finished" onClick="subForm(channel)">
  <input type=button name=cancel value="Cancel" onClick="location='publish.jsp'">
</td></tr></table>
<font size=4><b>Preview Channel for Registration</b></font>
</form>


<table border=0 cellpadding=3 cellspacing=3>
This is a preview of the channel you are registering. If it is rendered correctly then pick any appropriate categories and click 'Finished'
button to register. Otherwise cancel or go back and make necessary corrections.
<tr bgcolor=#ffffff>
<td>
<% publish.previewChannel(request, response, out); %>
</td>
<td valign="top">
<b>Channel Categories</b><p>
<form method="POST" name="channel" action="previewPublish.jsp?action=register">
<% publish.writeChannelCats(request, response, out); %>
</form>
</td>
</tr>
</table>


<%-- Finished and Cancel Changes buttons --%>
<form>
<table border=0 cellspacing=5 cellpadding=5 width="100%"><tr bgcolor="#dddddd"><td>
  <input type=button name=add value="Finish" onClick="subForm(channel)">
  <input type=button name=cancel value="Cancel" onClick="location='publish.jsp'">
</td></tr></table>
</form>
<% } %>

<jsp:include page="footer.jsp" flush="true" />

</body>
</html>
{'fraction_non_alphanumeric': 0.1861005141814563, 'fraction_numerical': 0.006634599436059048, 'mean_word_length': 5.380952380952381, 'pattern_counts': {'":': 0, '<': 159, '<?xml version=': 0, '>': 159, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4794929', 'n_tokens_mistral': 2069, 'n_tokens_neox': 1931, 'n_words': 501}