validation_form.html 3.04 KB
Newer Older
Pierre Dittgen's avatar
wip  
Pierre Dittgen committed
1
2
3
4
{% extends "base_template.html" %} {% block title %}{{ title }}{% endblock %} {%
block head %}
{{ super() }}
{% endblock %} {% block content %}
Pierre Dittgen's avatar
Pierre Dittgen committed
5
6
<h1 class="my-4">{{ title }}</h1>

Pierre Dittgen's avatar
wip  
Pierre Dittgen committed
7
8
{% set cols_my_classes = 'my-md-0 my-4' %}
<div class="row">
Pierre Dittgen's avatar
Pierre Dittgen committed
9
10
11
12
13
14
    <div class="col-md-4 {{ cols_my_classes }}">
        <div class="card bg-faded">
            <div class="card-body">
                    {% include 'schema_info_part.html' %}
            </div>
        </div>
Pierre Dittgen's avatar
wip  
Pierre Dittgen committed
15
    </div>
Pierre Dittgen's avatar
Pierre Dittgen committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    <div class="col-md-8 {{ cols_my_classes }}">
        <h2>Outil de validation</h2>
        <!-- Tab validator -->
        <p class="text">Validez ici le fichier de votre choix</p>
        <ul class="nav nav-tabs" id="myTab" role="tablist">
            <li class="nav-item">
                <a class="nav-link active" id="file-tab" data-toggle="tab" href="#file" role="tab" aria-controls="file"
                    aria-selected="true">Fichier</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" id="url-tab" data-toggle="tab" href="#url" role="tab" aria-controls="url"
                    aria-selected="false">URL</a>
            </li>
        </ul>
        {% set padding_class = 'p-3' %}
        <div class="tab-content" id="myTabContent">
            <div class="tab-pane fade show active {{ padding_class }}" id="file" role="tabpanel" aria-labelledby="file-tab">
                <form method="POST" enctype="multipart/form-data">
                    <input type="hidden" name="input" value="file" />
35
36
37
                    {% for key, value in schema_params.items() %}
                    <input type="hidden" name="{{ key }}" value="{{ value }}" />
                    {% endfor %}
Pierre Dittgen's avatar
Pierre Dittgen committed
38
39
40
41
42
43
44
45
46
47
48
                    <div class="form-group">
                        <label for="file">Choisissez un fichier tabulaire à valider (.xlsx, .xls, .ods, .csv, .tsv,
                            etc.)</label>
                        <input type="file" class="form-control-file" name="file" id="file" accept=".csv, .xls, .xlsx, .ods" />
                    </div>
                    <button type="submit" class="btn btn-primary">Valider</button>
                </form>
            </div>
            <div class="tab-pane fade {{ padding_class }}" id="url" role="tabpanel" aria-labelledby="url-tab">
                <form method="GET">
                    <input type="hidden" name="input" value="url" />
49
50
51
                    {% for key, value in schema_params.items() %}
                    <input type="hidden" name="{{ key }}" value="{{ value }}" />
                    {% endfor %}
Pierre Dittgen's avatar
Pierre Dittgen committed
52
53
54
55
                    <div class="form-group">
                        <label for="url">Indiquez l'URL de la table à valider</label>
                        <input name="url" type="url" class="form-control" id="url" aria-describedby="urlHelp"
                            placeholder="https://..." />
Pierre Dittgen's avatar
wip  
Pierre Dittgen committed
56

Pierre Dittgen's avatar
Pierre Dittgen committed
57
58
59
60
61
                    </div>
                    <button type="submit" class="btn btn-primary">Valider</button>
                </form>
            </div>
        </div>
Pierre Dittgen's avatar
wip  
Pierre Dittgen committed
62
63
64
    </div>
</div>

Pierre Dittgen's avatar
Pierre Dittgen committed
65

Pierre Dittgen's avatar
wip  
Pierre Dittgen committed
66
{% endblock %} {% block footer %} {% endblock %}