{% extends frame.html %}

{% block body %}
<div class="w3-container w3-blue" style="margin-top: 32px;">
    <h3>New Build</h3>
</div>

<form id="build_add" class="w3-card w3-padding" action="{{request.path}}" method="POST">
    {% raw xsrf_form_html() %}
    <p>
        <label><b>Branch Name</b> {% if errors.get('branch') %}<br/><span class="w3-text-red">{{errors['branch']}}</span>{% end %}</label>
        <input class="w3-input {% if errors.get('branch') %}w3-border w3-border-red{% end %}" type="text" name="branch" value="{{build.get('branch') or ''}}" placeholder="[required]" />
    </p>

    <p>
        <label><b>Revision Hash</b> {% if errors.get('revision') %}<br/><span class="w3-text-red">{{errors['revision']}}</span>{% end %}</label>
        <input class="w3-input {% if errors.get('revision') %}w3-border w3-border-red{% end %}" type="text" name="revision" value="{{build.get('revision') or ''}}" placeholder="[optional, default HEAD]" />
    </p>

    <div class="w3-center w3-padding">
        <input type="submit" class="w3-button w3-blue w3-center" value="Add Build"/>
        <br/><br/><a class="w3-right w3-text-blue" href="/admin/build">Cancel</a>
    </div>
    <br/>

</form>
{% end %}
