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

{% block htmlclass%}{{super}} dashboard_form{% endblock %}

{% block extrahead %}
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
{% endblock %}

{% block extrabody %}
{{ block.super }}
<script defer src="{{STATIC_URL}}js/libs/bootstrap-modal.js"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&amp;region=NZ"></script>
<script type="text/javascript" src="{{STATIC_URL}}js/dashboard_form.js"></script>
<script type="text/javascript">td.stopfusionTableId = {{ stopFusionTableId }};</script>
{% endblock %}

{% block content %}
  <div class="content">
    <div class="page-header">
    {% if dashboard %}
      <p class="headLinks">
        <a href="{{ dashboard.get_absolute_url }}" class="btn small">View Dashboard</a>
      </p>
      <h1>{{ dashboard.name }}</h1>
    {% else %}
      <h1>New Dashboard</h1>
    {% endif %}
    </div>

    <form method="post" action="">
      {% csrf_token %}

      <div class="dashboardForm">
      {{ form }}
      </div>

      {{ route_formset.management_form }}
      <script>tdStopInfo = {};</script>

      {% for routeform in route_formset.forms %}
      <div class="routeForm">
        {% if not forloop.first %}
        <h3>Add another route if you need to...</h3>
        {% endif %}

        {{ routeform }}
        {{ routeform.id }}
        <script>tdStopInfo["{{routeform.prefix|safe}}"] = {{ routeform.stop_json|safe }};</script>
      </div>
      {% endfor %}

      <div class="actions">
        {% if dashboard %}
        <a href="{% url dashboard-delete dashboard.pk %}" class="delete btn danger">Delete this Dashboard</a>
        {% endif %}
        <button type="submit" class="btn primary">Save</button>
        {% if dashboard %}
        <a href="{{ dashboard.get_absolute_url }}" class="btn">Cancel</a>
        {% endif %}
      </div>
    </form>
    <div class="clear" ></div>

    <div id="getstop-modal" class="modal hide fade">
      <div class="modal-header">
        <a href="#" class="close">&times;</a>
        <h3>Select a Stop</h3>
      </div>
      <div class="modal-body">
        <div id="map"></div>

        <div id="address-select">
          <input id="address" class="span4" type="text" placeholder="Jump to a place"/>
          <button class="btn small" id="address-btn">Go</button>
        </div>
      </div>
      <div class="modal-footer">
        <p id="getstop-name"></p>
        <button id="getstop-save" href="#" class="btn primary">Save</button>
        <button id="getstop-cancel" href="#" class="btn secondary">Cancel</button>
      </div>
    </div>
  </div>
{% endblock %}<commit_msg>Validation error fixes for invalid routes<commit_after>{% extends "base.html" %}

{% block htmlclass%}{{super}} dashboard_form{% endblock %}

{% block extrahead %}
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
{% endblock %}

{% block extrabody %}
{{ block.super }}
<script defer src="{{STATIC_URL}}js/libs/bootstrap-modal.js"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&amp;region=NZ"></script>
<script type="text/javascript" src="{{STATIC_URL}}js/dashboard_form.js"></script>
<script type="text/javascript">td.stopfusionTableId = {{ stopFusionTableId }};</script>
{% endblock %}

{% block content %}
  <div class="content">
    <div class="page-header">
    {% if dashboard %}
      <p class="headLinks">
        <a href="{{ dashboard.get_absolute_url }}" class="btn small">View Dashboard</a>
      </p>
      <h1>{{ dashboard.name }}</h1>
    {% else %}
      <h1>New Dashboard</h1>
    {% endif %}
    </div>

    <form method="post" action="">
      {% csrf_token %}

      <div class="dashboardForm">
      {{ form }}
      </div>

      {{ route_formset.management_form }}
      <script>tdStopInfo = {};</script>

      {% for routeform in route_formset.forms %}
      <div class="routeForm">
        {% if not forloop.first %}
        <h3>Add another route if you need to...</h3>
        {% endif %}

        {% if routeform.non_field_errors %}
          <div class="alert-message block-message error">
            {{ routeform.non_field_errors }}
          </div>
        {% endif %}

        {{ routeform }}
        {{ routeform.id }}
        <script>tdStopInfo["{{routeform.prefix|safe}}"] = {{ routeform.stop_json|safe }};</script>
      </div>
      {% endfor %}

      <div class="actions">
        {% if dashboard %}
        <a href="{% url dashboard-delete dashboard.pk %}" class="delete btn danger">Delete this Dashboard</a>
        {% endif %}
        <button type="submit" class="btn primary">Save</button>
        {% if dashboard %}
        <a href="{{ dashboard.get_absolute_url }}" class="btn">Cancel</a>
        {% endif %}
      </div>
    </form>
    <div class="clear" ></div>

    <div id="getstop-modal" class="modal hide fade">
      <div class="modal-header">
        <a href="#" class="close">&times;</a>
        <h3>Select a Stop</h3>
      </div>
      <div class="modal-body">
        <div id="map"></div>

        <div id="address-select">
          <input id="address" class="span4" type="text" placeholder="Jump to a place"/>
          <button class="btn small" id="address-btn">Go</button>
        </div>
      </div>
      <div class="modal-footer">
        <p id="getstop-name"></p>
        <button id="getstop-save" href="#" class="btn primary">Save</button>
        <button id="getstop-cancel" href="#" class="btn secondary">Cancel</button>
      </div>
    </div>
  </div>
{% endblock %}
{'fraction_non_alphanumeric': 0.1951828724353256, 'fraction_numerical': 0.00392506690454951, 'mean_word_length': 2.8214042263122017, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '7481446', 'n_tokens_mistral': 1890, 'n_tokens_neox': 1746, 'n_words': 362}