Beispiel #1
0
def contrib_labellisation(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        7,
        schema.get_section_fields(schema.SECTION_LABELS),
        "contrib/9-labellisation.html",
        "contrib_commentaire",
        prev_route="contrib_sanitaires",
        redirect_hash=schema.SECTION_LABELS,
        libelle_step={
            "current": schema.SECTION_LABELS,
            "next": schema.SECTION_COMMENTAIRE,
        },
    )
Beispiel #2
0
def contrib_commentaire(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        8,
        schema.get_section_fields(schema.SECTION_COMMENTAIRE),
        "contrib/10-commentaire.html",
        "contrib_publication",
        prev_route="contrib_labellisation",
        redirect_hash=schema.SECTION_COMMENTAIRE,
        libelle_step={
            "current": schema.SECTION_COMMENTAIRE,
            "next": "publication"
        },
    )
Beispiel #3
0
def contrib_accueil(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        5,
        schema.get_section_fields(schema.SECTION_ACCUEIL),
        "contrib/7-accueil.html",
        "contrib_sanitaires",
        prev_route="contrib_entree",
        redirect_hash=schema.SECTION_ACCUEIL,
        libelle_step={
            "current": schema.SECTION_ACCUEIL,
            "next": schema.SECTION_SANITAIRES,
        },
    )
Beispiel #4
0
def contrib_sanitaires(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        6,
        schema.get_section_fields(schema.SECTION_SANITAIRES),
        "contrib/8-sanitaires.html",
        "contrib_labellisation",
        prev_route="contrib_accueil",
        redirect_hash=schema.SECTION_SANITAIRES,
        libelle_step={
            "current": schema.SECTION_SANITAIRES,
            "next": schema.SECTION_LABELS,
        },
    )
Beispiel #5
0
def contrib_entree(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        4,
        schema.get_section_fields(schema.SECTION_ENTREE),
        "contrib/6-entree.html",
        "contrib_accueil",
        prev_route="contrib_exterieur",
        redirect_hash=schema.SECTION_ENTREE,
        libelle_step={
            "current": schema.SECTION_ENTREE,
            "next": schema.SECTION_ACCUEIL
        },
    )
Beispiel #6
0
def contrib_exterieur(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        3,
        schema.get_section_fields(schema.SECTION_CHEMINEMENT_EXT),
        "contrib/5-exterieur.html",
        "contrib_entree",
        prev_route="contrib_stationnement",
        redirect_hash=schema.SECTION_CHEMINEMENT_EXT,
        libelle_step={
            "current": schema.SECTION_CHEMINEMENT_EXT,
            "next": schema.SECTION_ENTREE,
        },
    )
Beispiel #7
0
def contrib_stationnement(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        2,
        schema.get_section_fields(schema.SECTION_STATIONNEMENT),
        "contrib/4-stationnement.html",
        "contrib_exterieur",
        prev_route="contrib_transport",
        redirect_hash=schema.SECTION_STATIONNEMENT,
        libelle_step={
            "current": schema.SECTION_STATIONNEMENT,
            "next": schema.SECTION_CHEMINEMENT_EXT,
        },
    )
Beispiel #8
0
def contrib_transport(request, erp_slug):
    return process_accessibilite_form(
        request,
        erp_slug,
        2,
        schema.get_section_fields(schema.SECTION_TRANSPORT),
        "contrib/3-transport.html",
        "contrib_stationnement",
        prev_route="contrib_localisation",
        redirect_hash=schema.SECTION_TRANSPORT,
        libelle_step={
            "current": schema.SECTION_TRANSPORT,
            "next": schema.SECTION_STATIONNEMENT,
        },
    )
Beispiel #9
0
def test_get_section_fields():
    result = schema.get_section_fields(schema.SECTION_ENTREE)
    assert type(result) == list
    assert "entree_reperage" in result
    assert "cheminement_ext_pente_presence" not in result
Beispiel #10
0
 def has_cheminement_ext(self):
     fields = schema.get_section_fields(schema.SECTION_CHEMINEMENT_EXT)
     return any(getattr(f) is not None for f in fields)