form.html 1.79 KB
<html lang="en">
<head>
    <script src="{{url_for('static',filename='Scripts/ArmadoDeForm.js')}}"></script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="{{url_for('static',filename='Style/ArmadoDeForm.css')}}">
    <link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet">
    <title>Generador de Formularios</title>
    <link rel="icon" href="{{url_for('static',filename='Assets/ICONO ANACSOFT 48 SIN TRASNSF.png')}}" type="image/png">
</head>
<body onload="
    HabilitarTab(document.getElementById('TabsContainer'),0),
    HabilitarButton(document.getElementById('BotonesContainer'),0),
    document.documentElement.style.setProperty('--Color','{{ color }}'), 
    Boton(document.getElementById('TabsContainer'), '{{ send }}')">

<h1 style="margin: 2% 0% 2% 0; font-size: 5vw;"> {{ title|title }}</h1>
    <section id="BotonesContainer" class="BotonesContainer">
        {% set m = tabs|length %}
        {% for i in range(m) %}
        <button id="Boton{{i}}" class="Botones" style="width: {{ 100/m }}%;" 
        onclick="
            HabilitarTab(document.getElementById('TabsContainer'),parseInt(this.id[this.id.length - 1])),
            HabilitarButton(document.getElementById('BotonesContainer'),parseInt(this.id[this.id.length - 1]))">
        {% endfor %}
    </section>
    <section id="TabsContainer">
        {% from "tab.html" import tab %}
        {% for i in range(m) %}
            <div id="Tab{{i}}" class="Tabs">
                <div class="TabCard">
                    {{ tab(title=tabs[i]['title']|title, fields=tabs[i]['fields']) }}
                </div>
            </div>
        {% endfor %}
    </section>

</body>
</html>