<commit_before>{% extends "base.html" %}

{% block title %}{{event.key_name}} - Edit{% endblock %}

{% block content %}

<p class="pull-right"><a class="btn btn-danger btn-small" href="/admin/event/delete/{{event.key_name}}"><span class="glyphicon glyphicon-trash"></span> Delete</a></p>

<h1>Edit {{ event.key_name }}</h1>

<form action="/admin/event/edit/{{event.key_name}}" method="post">
    <legend>Edit {{ event.year }} {{ event.name }}</legend>
    <table class="table table-striped table-hover table-condensed">
        <tr>
            <td>Name</td>
            <td><input type="text" name="name" value="{{event.name}}" /></td>
        </tr>
        <tr>
            <td>Dates</td>
            <td>
                <input type="text" name="start_date" value="{{ event.start_date|date:"Y-m-d" }}" placeholder="2012-04-04"/> to <input type="text" name="end_date" value="{{ event.end_date|date:"Y-m-d" }}" placeholder="2012-04-06" />
            </td>
        </tr>

        <tr>
            <td>Dates</td>
            <td>{{ event.start_date|date:"M d, Y" }} to {{ event.end_date|date:"M d, Y" }}</td>
        </tr>
        <tr>
            <td>Short Name</td>
            <td><input type="text" name="short_name" value="{{event.short_name}}" /></td>
        </tr>
        <tr>
            <td>Website</td>
            <td><input type="text" name="website" value="{{event.website}}" /></td>
        </tr>
        <tr>
            <td>Year</td>
            <td><input type="text" name="disabled_year" value="{{event.year}}" disabled="disabled" /><input type="hidden" name="year" value="{{event.year}}" /></td>
        </tr>
        <tr>
            <td>Event Short</td>
            <td><input type="text" name="disabled_event_short" value="{{event.event_short}}" disabled="disabled" /><input type="hidden" name="event_short" value="{{event.event_short}}" /></td>
        </tr>
        <tr>
            <td>FIRST API Code</td>
            <td><input type="text" name="first_code" placeholder="ct" {% if event.first_code %}value="{{ event.first_code }}"{% endif %}/></td>
        </tr>
        <tr>
            <td>Event Type</td>
            <td><select name="event_type">
                {% for type, name in event_types.iteritems %}
                  <option value="{{ type }}" {% if type == event.event_type_enum %}selected{% endif %}>{{ name }}</option>
                {% endfor %}
            </select></td>
        </tr>
        <tr>
            <td>Event District Key</td>
            <td><input type="text" name="event_district_key" value="{{event.event_district_key}}" /></td>
        </tr>
        <tr>
            <td>Playoff Type</td>
            <td><select name="playoff_type">
                {% for type, name in playoff_types.iteritems %}
                  <option value="{{ type }}" {% if type == event.playoff_type %}selected{% endif %}>{{ name }}</option>
                {% endfor %}
            </select></td>
        </tr>
        <tr>
            <td>Event Venue</td>
            <td><input type="text" name="venue" value="{{event.venue}}" /></td>
        </tr>
        <tr>
            <td>Event Venue Address</td>
            <td><textarea name="venue_address" />{{event.venue_address}}</td>
        </tr>
        <tr>
            <td>Event City</td>
            <td><input type="text" name="city" value="{{event.city}}" /></td>
        </tr>
        <tr>
            <td>Event State/Prov</td>
            <td><input type="text" name="state_prov" value="{{event.state_prov}}" /></td>
        </tr>
        <tr>
            <td>Postal Code</td>
            <td><input type="text" name="postalcode" value="{{event.postalcode}}" /></td>
        </tr>
        <tr>
            <td>Event Country</td>
            <td><input type="text" name="country" value="{{event.country}}" /></td>
        </tr>
        <tr>
            <td>Official</td>
            <td><input type="text" name="official" value="{{event.official}}" /></td>
        </tr>
        <tr>
            <td>FIRST Event ID</td>
            <td><input type="text" name="first_eid" value="{{event.first_eid}}" /></td>
        </tr>
        <tr>
            <td>Enable Predictions</td>
            <td><input type="text" name="enable_predictions" value="{{event.enable_predictions}}" /></td>
        </tr>
        <tr>
            <td>Facebook Event ID</td>
            <td><input type="text" name="facebook_eid" value="{{event.facebook_eid}}" /></td>
        </tr>
        <tr>
            <td>Custom Hashtag</td>
            <td><input type="text" name="custom_hashtag" value="{{event.custom_hashtag}}" /></td>
        </tr>
        <tr>
            <td>Parent Event</td>
            <td><input type="text" name="parent_event" value="{% if event.parent_event %}{{ event.parent_event.id }}{% endif %}"/></td>
        </tr>
        <tr>
            <td>Event Divisions</td>
            <td><input type="text" name="divisions" value="{{ event.division_keys_json }}"</td>
        </tr>
        <tr>
            <td>Webcast JSON</td>
            <td>
                <textarea name="webcast_json">{{event.webcast_json}}</textarea>
            </td>
        </tr>
        <tr>
            <td>Alliances</td>
            <td><textarea name="alliance_selections_json" >{{alliance_selections}}</textarea></td>
        </tr>
        <tr>
            <td>Rankings</td>
            <td><textarea name="rankings_json" >{{rankings}}</textarea></td>
        </tr>
    </table>

    <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-thumbs-up"></span> Save Event</button>
    <a href="/admin/event/{{event.key_name}}" class="btn btn-default"><span class="glyphicon glyphicon-thumbs-down"></span> Cancel Edit</a>
</form>

{% endblock %}<commit_msg>Fix Event edit admin page - unable to change anything after Event Venue Address<commit_after>{% extends "base.html" %}

{% block title %}{{event.key_name}} - Edit{% endblock %}

{% block content %}

<p class="pull-right"><a class="btn btn-danger btn-small" href="/admin/event/delete/{{event.key_name}}"><span class="glyphicon glyphicon-trash"></span> Delete</a></p>

<h1>Edit {{ event.key_name }}</h1>

<form action="/admin/event/edit/{{event.key_name}}" method="post">
    <legend>Edit {{ event.year }} {{ event.name }}</legend>
    <table class="table table-striped table-hover table-condensed">
        <tr>
            <td>Name</td>
            <td><input type="text" name="name" value="{{event.name}}" /></td>
        </tr>
        <tr>
            <td>Dates</td>
            <td>
                <input type="text" name="start_date" value="{{ event.start_date|date:"Y-m-d" }}" placeholder="2012-04-04"/> to <input type="text" name="end_date" value="{{ event.end_date|date:"Y-m-d" }}" placeholder="2012-04-06" />
            </td>
        </tr>

        <tr>
            <td>Dates</td>
            <td>{{ event.start_date|date:"M d, Y" }} to {{ event.end_date|date:"M d, Y" }}</td>
        </tr>
        <tr>
            <td>Short Name</td>
            <td><input type="text" name="short_name" value="{{event.short_name}}" /></td>
        </tr>
        <tr>
            <td>Website</td>
            <td><input type="text" name="website" value="{{event.website}}" /></td>
        </tr>
        <tr>
            <td>Year</td>
            <td><input type="text" name="disabled_year" value="{{event.year}}" disabled="disabled" /><input type="hidden" name="year" value="{{event.year}}" /></td>
        </tr>
        <tr>
            <td>Event Short</td>
            <td><input type="text" name="disabled_event_short" value="{{event.event_short}}" disabled="disabled" /><input type="hidden" name="event_short" value="{{event.event_short}}" /></td>
        </tr>
        <tr>
            <td>FIRST API Code</td>
            <td><input type="text" name="first_code" placeholder="ct" {% if event.first_code %}value="{{ event.first_code }}"{% endif %}/></td>
        </tr>
        <tr>
            <td>Event Type</td>
            <td><select name="event_type">
                {% for type, name in event_types.iteritems %}
                  <option value="{{ type }}" {% if type == event.event_type_enum %}selected{% endif %}>{{ name }}</option>
                {% endfor %}
            </select></td>
        </tr>
        <tr>
            <td>Event District Key</td>
            <td><input type="text" name="event_district_key" value="{{event.event_district_key}}" /></td>
        </tr>
        <tr>
            <td>Playoff Type</td>
            <td><select name="playoff_type">
                {% for type, name in playoff_types.iteritems %}
                  <option value="{{ type }}" {% if type == event.playoff_type %}selected{% endif %}>{{ name }}</option>
                {% endfor %}
            </select></td>
        </tr>
        <tr>
            <td>Event Venue</td>
            <td><input type="text" name="venue" value="{{event.venue}}" /></td>
        </tr>
        <tr>
            <td>Event Venue Address</td>
            <td><textarea name="venue_address">{{event.venue_address}}</textarea></td>
        </tr>
        <tr>
            <td>Event City</td>
            <td><input type="text" name="city" value="{{event.city}}" /></td>
        </tr>
        <tr>
            <td>Event State/Prov</td>
            <td><input type="text" name="state_prov" value="{{event.state_prov}}" /></td>
        </tr>
        <tr>
            <td>Postal Code</td>
            <td><input type="text" name="postalcode" value="{{event.postalcode}}" /></td>
        </tr>
        <tr>
            <td>Event Country</td>
            <td><input type="text" name="country" value="{{event.country}}" /></td>
        </tr>
        <tr>
            <td>Official</td>
            <td><input type="text" name="official" value="{{event.official}}" /></td>
        </tr>
        <tr>
            <td>FIRST Event ID</td>
            <td><input type="text" name="first_eid" value="{{event.first_eid}}" /></td>
        </tr>
        <tr>
            <td>Enable Predictions</td>
            <td><input type="text" name="enable_predictions" value="{{event.enable_predictions}}" /></td>
        </tr>
        <tr>
            <td>Facebook Event ID</td>
            <td><input type="text" name="facebook_eid" value="{{event.facebook_eid}}" /></td>
        </tr>
        <tr>
            <td>Custom Hashtag</td>
            <td><input type="text" name="custom_hashtag" value="{{event.custom_hashtag}}" /></td>
        </tr>
        <tr>
            <td>Parent Event</td>
            <td><input type="text" name="parent_event" value="{% if event.parent_event %}{{ event.parent_event.id }}{% endif %}"/></td>
        </tr>
        <tr>
            <td>Event Divisions</td>
            <td><input type="text" name="divisions" value="{{ event.division_keys_json }}"</td>
        </tr>
        <tr>
            <td>Webcast JSON</td>
            <td>
                <textarea name="webcast_json">{{event.webcast_json}}</textarea>
            </td>
        </tr>
        <tr>
            <td>Alliances</td>
            <td><textarea name="alliance_selections_json">{{alliance_selections}}</textarea></td>
        </tr>
        <tr>
            <td>Rankings</td>
            <td><textarea name="rankings_json">{{rankings}}</textarea></td>
        </tr>
    </table>

    <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-thumbs-up"></span> Save Event</button>
    <a href="/admin/event/{{event.key_name}}" class="btn btn-default"><span class="glyphicon glyphicon-thumbs-down"></span> Cancel Edit</a>
</form>

{% endblock %}
{'fraction_non_alphanumeric': 0.20473597787572378, 'fraction_numerical': 0.00311122634171636, 'mean_word_length': 2.0842217484008527, 'pattern_counts': {'":': 0, '<': 448, '<?xml version=': 0, '>': 446, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '645479', 'n_tokens_mistral': 3827, 'n_tokens_neox': 3617, 'n_words': 705}