<commit_before><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Administrative Page - Edit Foods</title>
<link rel="stylesheet" type="text/css" href="./style/adminpages.css"/>
</head>
<h:body styleClass="body">
<h2>Administrative Page - Ingredients</h2>
<h:messages/>
	<h:dataTable var="ingred"
		value="#{adminIngredientsPageViewBean.ingredients}" border="1">
		<h:column>
			<f:facet name="header">
				<h:outputText value="Ingredient Name"></h:outputText>
			</f:facet>
			<h:outputText id="ingredName" value="#{ingred.ingredName}"></h:outputText>
			<h:form>
				<h:inputText value="#{adminIngredientsPageViewBean.editText}"></h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editIngredientName}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Image "/>
			</f:facet>
			<h:graphicImage width="100" height="100" value="#{ingred.imgPath}"/>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Allergen"></h:outputText>
			</f:facet>
			<h:outputText id="allergen" value="#{ingred.allergen}"></h:outputText>
			<h:form>
				<h:inputText value="#{adminIngredientsPageViewBean.editText}"></h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editIngredientAllergen}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
			
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Price"></h:outputText>
			</f:facet>
			<h:outputText id="price" value="#{ingred.price}">
				<f:convertNumber type="currency"></f:convertNumber>
			</h:outputText>
			<h:form>
				<h:inputText value=""></h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editIngredientPrice}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Reference Count"></h:outputText>
			</f:facet>
			<h:outputText id="refCount" value="#{ingred.refCount}"></h:outputText>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Foods Associated"></h:outputText>
			</f:facet>
			<h:outputText id="food_foodName" value="#{adminFoodsPageViewBean.getFoodsAssociated(ingred)}"></h:outputText>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Description " />
			</f:facet>
			<h:outputText value="#{ingred.description}" />
			<h:form >
				<h:inputText value="#{adminIngredientsPageViewBean.editText}">
				</h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editDescFor(ingred)}" ></h:commandLink>
			</h:form>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Action "></h:outputText>
			</f:facet>
			<h:form>
				<h:commandLink value="Delete" action="#{adminIngredientsPageViewBean.deleteIngred}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
				<p/>
				<h:commandLink value="Edit Nutrition Facts" action="#{adminIngredientsPageViewBean.editNutritions}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
			<h:form enctype="multipart/form-data">
				<h:inputFile value="#{adminIngredientsPageViewBean.file}"/>
				<h:commandButton value="Submit" action="#{adminIngredientsPageViewBean.submitImageFor(ingred)}" />
			</h:form>
		</h:column>
		<f:facet name="footer">
		<h:form>
			<h:outputText value="New Ingredient"></h:outputText>
			<h:inputText value="#{adminIngredientsPageViewBean.editText}"
				maxlength="255"></h:inputText>
			<h:commandButton 
				id="submitNewMenuButton" value="Submit" action="#{adminIngredientsPageViewBean.createIngred}">
			</h:commandButton>
		</h:form>
			
		</f:facet>
	</h:dataTable>
	<h:button outcome="Return" value="Return"></h:button>
</h:body>
</html><commit_msg>fixed a bug where price wasn't being set<commit_after><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Administrative Page - Edit Foods</title>
<link rel="stylesheet" type="text/css" href="./style/adminpages.css"/>
</head>
<h:body styleClass="body">
<h2>Administrative Page - Ingredients</h2>
<h:messages/>
	<h:dataTable var="ingred"
		value="#{adminIngredientsPageViewBean.ingredients}" border="1">
		<h:column>
			<f:facet name="header">
				<h:outputText value="Ingredient Name"></h:outputText>
			</f:facet>
			<h:outputText id="ingredName" value="#{ingred.ingredName}"></h:outputText>
			<h:form>
				<h:inputText value="#{adminIngredientsPageViewBean.editText}"></h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editIngredientName}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Image "/>
			</f:facet>
			<h:graphicImage width="100" height="100" value="#{ingred.imgPath}"/>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Allergen"></h:outputText>
			</f:facet>
			<h:outputText id="allergen" value="#{ingred.allergen}"></h:outputText>
			<h:form>
				<h:inputText value="#{adminIngredientsPageViewBean.editText}"></h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editIngredientAllergen}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
			
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Price"></h:outputText>
			</f:facet>
			<h:outputText id="price" value="#{ingred.price}">
				<f:convertNumber type="currency"></f:convertNumber>
			</h:outputText>
			<h:form>
				<h:inputText value="#{adminIngredientsPageViewBean.editText}"></h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editIngredientPrice}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Reference Count"></h:outputText>
			</f:facet>
			<h:outputText id="refCount" value="#{ingred.refCount}"></h:outputText>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Foods Associated"></h:outputText>
			</f:facet>
			<h:outputText id="food_foodName" value="#{adminFoodsPageViewBean.getFoodsAssociated(ingred)}"></h:outputText>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Description " />
			</f:facet>
			<h:outputText value="#{ingred.description}" />
			<h:form >
				<h:inputText value="#{adminIngredientsPageViewBean.editText}">
				</h:inputText>
				<h:commandLink value="Edit" action="#{adminIngredientsPageViewBean.editDescFor(ingred)}" ></h:commandLink>
			</h:form>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Action "></h:outputText>
			</f:facet>
			<h:form>
				<h:commandLink value="Delete" action="#{adminIngredientsPageViewBean.deleteIngred}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
				<p/>
				<h:commandLink value="Edit Nutrition Facts" action="#{adminIngredientsPageViewBean.editNutritions}">
					<f:setPropertyActionListener
						target="#{adminIngredientsPageViewBean.ingredId}"
						value="#{ingred.ingredientid}">
					</f:setPropertyActionListener>
				</h:commandLink>
			</h:form>
			<h:form enctype="multipart/form-data">
				<h:inputFile value="#{adminIngredientsPageViewBean.file}"/>
				<h:commandButton value="Submit" action="#{adminIngredientsPageViewBean.submitImageFor(ingred)}" />
			</h:form>
		</h:column>
		<f:facet name="footer">
		<h:form>
			<h:outputText value="New Ingredient"></h:outputText>
			<h:inputText value="#{adminIngredientsPageViewBean.editText}"
				maxlength="255"></h:inputText>
			<h:commandButton 
				id="submitNewMenuButton" value="Submit" action="#{adminIngredientsPageViewBean.createIngred}">
			</h:commandButton>
		</h:form>
			
		</f:facet>
	</h:dataTable>
	<h:button outcome="Return" value="Return"></h:button>
</h:body>
</html>
{'fraction_non_alphanumeric': 0.18735291108155122, 'fraction_numerical': 0.0071625908114192165, 'mean_word_length': 5.166561514195584, 'pattern_counts': {'":': 0, '<': 271, '<?xml version=': 2, '>': 271, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, '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': '1187925', 'n_tokens_mistral': 4234, 'n_tokens_neox': 3543, 'n_words': 444}