{% set current_theme = current_theme() %} {{ current_theme.headertags() }} {{ _("Crear Cupón") }} - {{ curso.nombre }} {{ current_theme.local_style() }} {{ current_theme.navbar() }}

{{ _("Crear Nuevo Cupón") }}

{{ _("Curso:") }} {{ curso.nombre }}

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
{{ form.csrf_token }}
{{ form.code(class="form-control", id="code", required=True) }}
Ingrese un código único para el cupón (ej: DESCUENTO50)
{% if form.code.errors %}
{% for error in form.code.errors %} {{ error }} {% endfor %}
{% endif %}
{{ form.discount_type(class="form-select", id="discount_type", required=True, onchange="updateDiscountHelp()") }} {% if form.discount_type.errors %}
{% for error in form.discount_type.errors %} {{ error }} {% endfor %}
{% endif %}
{{ form.discount_value(class="form-control", id="discount_value", required=True, step="0.01", min="0") }}
Ingrese el valor del descuento
{% if form.discount_value.errors %}
{% for error in form.discount_value.errors %} {{ error }} {% endfor %}
{% endif %}
{{ form.max_uses(class="form-control", id="max_uses", min="1") }}
Dejar vacío para usos ilimitados
{% if form.max_uses.errors %}
{% for error in form.max_uses.errors %} {{ error }} {% endfor %}
{% endif %}
{{ form.expires_at(class="form-control", id="expires_at") }}
Dejar vacío si no expira
{% if form.expires_at.errors %}
{% for error in form.expires_at.errors %} {{ error }} {% endfor %}
{% endif %}
{{ _("Información") }} del {{ _("Curso") }}

{{ _("Precio") }} actual: ${{ curso.precio }} USD


{{ _("Cancelar") }}