<commit_before><?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
<body>
<ui:composition template="../layout.xhtml">
    <ui:define name="content">
        <div class="page-header">
            <h1>#{bundle.webSource}</h1>
        </div>
        <h:form id="form">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label for="member">#{bundle.member}</label>
                        <h:selectOneMenu id="member" label="#{bundle.member}" value="#{webSourceMBean.selectedMember}" class="form-control" required="true">
                            <f:selectItem itemLabel="#{bundle.select}" itemValue=""/>
                            <f:selectItems value="#{webSourceMBean.membersWithWebsite}" var="member" itemLabel="#{member.fullName}" itemValue="#{member.id}"/>
                            <f:ajax render="website title feed"/>
                        </h:selectOneMenu>
                        <h:message for="member" errorClass="errorMessage"/>
                        
                        <p:ajaxStatus style="width: 16px; height: 16px; vertical-align: bottom;" id="ajaxStatusPanel">
                            <f:facet name="start">
                                <h:graphicImage name="ajax-loader.gif" library="images" alt="Loading ..."/>
                            </f:facet>
                            <f:facet name="complete">
                                <h:outputText value=""/>
                            </f:facet>
                        </p:ajaxStatus>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label for="website">#{bundle.website}</label><br/>
                        <h:inputText id="website" value="#{webSourceMBean.website}" styleClass="form-control">
                            <f:ajax listener="#{webSourceMBean.updateWebSource}" render="member title feed"/>
                        </h:inputText>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="title">#{bundle.title}</label>
                <h:inputText id="title" styleClass="form-control" value="#{webSourceMBean.title}"/>
            </div>
            <div class="form-group">
                <label for="feed">#{bundle.feed}</label>
                <h:inputText id="feed" styleClass="form-control" value="#{webSourceMBean.feed}"/>
            </div>
            <h:inputHidden value="#{webSourceMBean.webSource.id}"/>

            <h:commandButton styleClass="btn btn-primary" value="#{bundle.save}" action="#{webSourceMBean.save}"/>&nbsp;
            <h:button outcome="web_sources" value="#{bundle.back}" styleClass="btn btn-default"/>
        </h:form>
    </ui:define>
</ui:composition><commit_msg>Issue #139: Added validation to title and feed.<commit_after><?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
<body>
<ui:composition template="../layout.xhtml">
    <ui:define name="content">
        <div class="page-header">
            <h1>#{bundle.webSource}</h1>
        </div>
        <h:form id="form">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label for="member">#{bundle.member}</label>
                        <h:selectOneMenu id="member" label="#{bundle.member}" value="#{webSourceMBean.selectedMember}" class="form-control">
                            <f:selectItem itemLabel="#{bundle.select}" itemValue=""/>
                            <f:selectItems value="#{webSourceMBean.membersWithWebsite}" var="member" itemLabel="#{member.fullName}" itemValue="#{member.id}"/>
                            <f:ajax render="website title feed"/>
                        </h:selectOneMenu>

                        <p:ajaxStatus style="width: 16px; height: 16px; vertical-align: bottom;" id="ajaxStatusPanel">
                            <f:facet name="start">
                                <h:graphicImage name="ajax-loader.gif" library="images" alt="Loading ..."/>
                            </f:facet>
                            <f:facet name="complete">
                                <h:outputText value=""/>
                            </f:facet>
                        </p:ajaxStatus>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label for="website">#{bundle.website}</label><br/>
                        <h:inputText id="website" value="#{webSourceMBean.website}" styleClass="form-control">
                            <f:ajax listener="#{webSourceMBean.updateWebSource}" render="member title feed"/>
                        </h:inputText>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="title">#{bundle.title}</label>
                <h:inputText id="title" styleClass="form-control" value="#{webSourceMBean.title}" required="true"/>
                <h:message for="title" errorClass="errorMessage"/>
            </div>
            <div class="form-group">
                <label for="feed">#{bundle.feed}</label>
                <h:inputText id="feed" styleClass="form-control" value="#{webSourceMBean.feed}" required="true"/>
                <h:message for="feed" errorClass="errorMessage"/>
            </div>
            <h:inputHidden value="#{webSourceMBean.webSource.id}"/>

            <h:commandButton styleClass="btn btn-primary" value="#{bundle.save}" action="#{webSourceMBean.save}"/>&nbsp;
            <h:button outcome="web_sources" value="#{bundle.back}" styleClass="btn btn-default"/>
        </h:form>
    </ui:define>
</ui:composition>
{'fraction_non_alphanumeric': 0.1692472788594205, 'fraction_numerical': 0.007205273647094895, 'mean_word_length': 1.7597292724196278, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 2, '>': 122, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 12}, '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': '2882939', 'n_tokens_mistral': 1902, 'n_tokens_neox': 1798, 'n_words': 276}