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

{% from "form_macros.html" import input%}

{% macro checkbox(id, value) %}
<tr>
  <td>
    <input type="checkbox" id="{{ id }}" name="{{ id }}" value="{{ value }}" />
  </td>
  <td>{{ value }}</td>
</tr>
{% endmacro %}

{% block title %}{{ _('create couch app') }}{% endblock %}

{% block content %}
  <h2>{{ _('Create couch app') }}</h2>
  <form method="POST" class="form-horizontal">
    {{ form.csrf_token }}
    {{ input(form.couch_url) }}
    <h3>{{ _('raster layers') }}</h3>
    <table class="table table-striped">
    {% for layer in raster_layers %}
      {{ checkbox('raster_%d' % loop.index, layer['name']) }}
    {% endfor %}
    </table>
    <h3>{{ _('vector layer') }}</h3>
    <table class="table table-striped">
    {% for layer in vector_layers %}
      {{ checkbox('vector_%d' % loop.index, layer['name']) }}
    {% endfor %}
    </table>
    <button class="btn btn-small pull-right" type="submit">{{ _('create') }}</button>
  </form>
{% endblock %}<commit_msg>Show checkboxes in table<commit_after>{% extends "base.html" %}

{% from "form_macros.html" import input%}

{% macro checkbox(id, value, label) %}
<tr>
  <td>
    <input type="checkbox" id="{{ id }}" name="{{ id }}" value="{{ value }}" />
  </td>
  <td>{{ label }}</td>
</tr>
{% endmacro %}

{% block title %}{{ _('create couch app') }}{% endblock %}

{% block content %}
  <h2>{{ _('Create couch app') }}</h2>
  <form method="POST" class="form-horizontal">
    {{ form.csrf_token }}
    {{ input(form.couch_url) }}
    <h3>{{ _('raster layers') }}</h3>
    <table class="table table-striped">
    {% for layer in raster_layers %}
      {{ checkbox('raster_%d' % loop.index, layer['name'], layer['title']) }}
    {% endfor %}
    </table>
    <h3>{{ _('vector layer') }}</h3>
    <table class="table table-striped">
    {% for layer in vector_layers %}
      {{ checkbox('vector_%d' % loop.index, layer['name'], layer['title']) }}
    {% endfor %}
    </table>
    <button class="btn btn-small" type="submit">{{ _('create') }}</button>
  </form>
{% endblock %}
{'fraction_non_alphanumeric': 0.24315233061028352, 'fraction_numerical': 0.005766458433445459, 'mean_word_length': 3.5557986870897156, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '4887221', 'n_tokens_mistral': 786, 'n_tokens_neox': 729, 'n_words': 175}