<commit_before><%@ taglib uri="http://htmlcompressor.googlecode.com/taglib/compressor" prefix="compress" %>
<compress:html>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
    <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@page pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <c:choose>
        <c:when test="${fn:contains(pageContext.response.locale, '_')}">
            <c:set var="lang">
                ${fn:substringBefore(pageContext.response.locale, "_")}
            </c:set>
        </c:when>
        <c:otherwise>
            <c:set var="lang" value="${pageContext.response.locale}"/>
        </c:otherwise>
    </c:choose>
    <html lang="${lang}">
        <c:set var="title" value="Tanaguru Contrast-Finder"/>
        <%@include file='/WEB-INF/template/head.jspf' %>

        <body id="contrast-finder-page">
            <%@include file='/WEB-INF/template/header.jspf' %>
            <main class="container" role="main">
                <span id="forkongithub" lang="en"><a href="https://github.com/Tanaguru/Contrast-Finder">Fork me on GitHub</a></span>
                
                <div id="set-up-form" class="row">
                    <div class="col-lg-12">
                        <h2 class="main-title"><fmt:message key="form.description"/></h2>
                        <c:set var="actionUrl">
                            <c:url value="result.html"></c:url>
                        </c:set>
                        <form:form name="formulaire" commandName="colorModel" method="GET" role="form" action="${actionUrl}">
                            <c:set var="foregroundOnError">
                                <form:errors path="foreground"/>
                            </c:set>
                            <c:choose>
                                <c:when test="${not empty foregroundOnError}">
                                    <c:set var="foregroundOnError" value="has-error"/>
                                </c:when>
                                <c:otherwise>
                                </c:otherwise>
                            </c:choose>
                            <div class="form-group ${foregroundOnError}">
                                <fieldset>
                                    <legend><fmt:message key="form.foregroundColor"/></legend>
                                    <span class="help-block"><fmt:message key="form.rgbHelp"/></span>
                                    <label>
                                        <fmt:message key="form.red"/><input id="foreground-red" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.green"/><input id="foreground-green" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.blue"/><input id="foreground-blue" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <span id="help-block-foreground" class="help-block"><fmt:message key="form.help"/></span> 
                                    <label for="foreground-input">
                                        <fmt:message key="form.hexadecimal"/><input id="foreground-input" name="foreground" class="form-control" type="text" value="#468847" aria-describedby="help-block-foreground">
                                    </label>
                                </fieldset>
                                <form:input id="foreground-input" path="foreground" type="text" class="form-control"/>
                                <div id="foreground-sample" class="color-sample sample-bordered">
                                    <span id="foreground-sample-invalid" class="invalid-color"><fmt:message key="form.invalidColor"/></span>
                                </div>   
                            </div>
                            <c:set var="backgroundOnError">
                                <form:errors path="background"/>
                            </c:set>
                            <c:choose>
                                <c:when test="${not empty backgroundOnError}">
                                    <c:set var="backgroundOnError" value="has-error"/>
                                </c:when>
                                <c:otherwise>
                                </c:otherwise>
                            </c:choose>
                            <div class="form-group ${backgroundOnError}">
                                <fieldset>
                                    <legend><fmt:message key="form.backgroundColor"/></legend>
                                    <span class="help-block"><fmt:message key="form.rgbHelp"/></span>
                                    <label>
                                        <fmt:message key="form.red"/><input id="background-red" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.green"/><input id="background-green" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.blue"/><input id="background-blue" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <span id="help-block-background" class="help-block"><fmt:message key="form.help"/></span>
                                    <label for="background-input" class="control-label">
                                        <fmt:message key="form.hexadecimal"/><input id="background-input" name="background" class="form-control" type="text" value="#DFF0D8" aria-describedby="help-block-background">
                                    </label>
                                </fielset>
                                <form:input id="background-input" path="background" type="text" class="form-control"/>
                                <div id="background-sample" class="color-sample sample-bordered">
                                    <span id="background-sample-invalid" class="invalid-color"><fmt:message key="form.invalidColor"/></span>
                                </div>
                            </div>
                            <c:set var="ratioOnError">
                                <form:errors path="ratio"/>
                            </c:set>
                            <c:choose>
                                <c:when test="${not empty ratioOnError}">
                                    <c:set var="ratioOnError" value="has-error"/>
                                </c:when>
                                <c:otherwise>
                                </c:otherwise>
                            </c:choose>
                            <div class="form-group ${ratioOnError}">
                                <label for="ratio" class="control-label"><fmt:message key="form.ratio"/></label>
                                <form:select class="form-control" path="ratio">
                                    <form:option value="3"></form:option>
                                    <form:option value="4.5"></form:option>
                                    <form:option value="7"></form:option>
                                </form:select>
                                <form:errors path="ratio" cssClass="help-block"/>
                                <div><commit_msg>Update form.jsp template<commit_after><%@ taglib uri="http://htmlcompressor.googlecode.com/taglib/compressor" prefix="compress" %>
<compress:html>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
    <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@page pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <c:choose>
        <c:when test="${fn:contains(pageContext.response.locale, '_')}">
            <c:set var="lang">
                ${fn:substringBefore(pageContext.response.locale, "_")}
            </c:set>
        </c:when>
        <c:otherwise>
            <c:set var="lang" value="${pageContext.response.locale}"/>
        </c:otherwise>
    </c:choose>
    <html lang="${lang}">
        <c:set var="title" value="Tanaguru Contrast-Finder"/>
        <%@include file='/WEB-INF/template/head.jspf' %>

        <body id="contrast-finder-page">
            <%@include file='/WEB-INF/template/header.jspf' %>
            <main class="container" role="main">
                <span id="forkongithub" lang="en"><a href="https://github.com/Tanaguru/Contrast-Finder">Fork me on GitHub</a></span>
                
                <div id="set-up-form" class="row">
                    <div class="col-lg-12">
                        <h2 class="main-title"><fmt:message key="form.description"/></h2>
                        <c:set var="actionUrl">
                            <c:url value="result.html"></c:url>
                        </c:set>
                        <form:form name="formulaire" commandName="colorModel" method="GET" role="form" action="${actionUrl}">
                            <c:set var="foregroundOnError">
                                <form:errors path="foreground"/>
                            </c:set>
                            <c:choose>
                                <c:when test="${not empty foregroundOnError}">
                                    <c:set var="foregroundOnError" value="has-error"/>
                                </c:when>
                                <c:otherwise>
                                </c:otherwise>
                            </c:choose>
                            <div class="form-group ${foregroundOnError}">
                                <fieldset>
                                    <legend><fmt:message key="form.foregroundColor"/></legend>
                                    <span class="help-block"><fmt:message key="form.rgbHelp"/></span>
                                    <label>
                                        <fmt:message key="form.red"/><input id="foreground-red" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.green"/><input id="foreground-green" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.blue"/><input id="foreground-blue" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <span id="help-block-foreground" class="help-block"><fmt:message key="form.help"/></span> 
                                    <label for="foreground-input">
                                        <fmt:message key="form.hexadecimal"/><form:input id="foreground-input" path="foreground" type="text" class="form-control" aria-describedby="help-block-foreground"/>
                                    </label>
                                </fieldset>
                                
                                <div id="foreground-sample" class="color-sample sample-bordered">
                                    <span id="foreground-sample-invalid" class="invalid-color"><fmt:message key="form.invalidColor"/></span>
                                </div>   
                            </div>
                            <c:set var="backgroundOnError">
                                <form:errors path="background"/>
                            </c:set>
                            <c:choose>
                                <c:when test="${not empty backgroundOnError}">
                                    <c:set var="backgroundOnError" value="has-error"/>
                                </c:when>
                                <c:otherwise>
                                </c:otherwise>
                            </c:choose>
                            <div class="form-group ${backgroundOnError}">
                                <fieldset>
                                    <legend><fmt:message key="form.backgroundColor"/></legend>
                                    <span class="help-block"><fmt:message key="form.rgbHelp"/></span>
                                    <label>
                                        <fmt:message key="form.red"/><input id="background-red" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.green"/><input id="background-green" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <label>
                                        <fmt:message key="form.blue"/><input id="background-blue" class="form-control" type="number" min="0" max="255">
                                    </label>
                                    <span id="help-block-background" class="help-block"><fmt:message key="form.help"/></span>
                                    <label for="background-input" class="control-label">
                                        <fmt:message key="form.hexadecimal"/><form:input id="background-input" path="background" type="text" class="form-control" aria-describedby="help-block-background"/>
                                    </label>
                                </fielset>
                                <div id="background-sample" class="color-sample sample-bordered">
                                    <span id="background-sample-invalid" class="invalid-color"><fmt:message key="form.invalidColor"/></span>
                                </div>
                            </div>
                            <c:set var="ratioOnError">
                                <form:errors path="ratio"/>
                            </c:set>
                            <c:choose>
                                <c:when test="${not empty ratioOnError}">
                                    <c:set var="ratioOnError" value="has-error"/>
                                </c:when>
                                <c:otherwise>
                                </c:otherwise>
                            </c:choose>
                            <div class="form-group ${ratioOnError}">
                                <label for="ratio" class="control-label"><fmt:message key="form.ratio"/></label>
                                <form:select class="form-control" path="ratio">
                                    <form:option value="3"></form:option>
                                    <form:option value="4.5"></form:option>
                                    <form:option value="7"></form:option>
                                </form:select>
                                <form:errors path="ratio" cssClass="help-block"/>
                                <div>
{'fraction_non_alphanumeric': 0.14140713655276763, 'fraction_numerical': 0.004665237674946413, 'mean_word_length': 1.14104467539479, 'pattern_counts': {'":': 0, '<': 305, '<?xml version=': 0, '>': 305, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 76, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '415899', 'n_tokens_mistral': 3966, 'n_tokens_neox': 3708, 'n_words': 561}