2023-02-26 21:24:07 +01:00
|
|
|
# -*- mode: python -*-
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# ScoDoc
|
|
|
|
#
|
|
|
|
# Copyright (c) 1999 - 2023 Emmanuel Viennet. All rights reserved.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
# Emmanuel Viennet emmanuel.viennet@viennet.net
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
"""
|
|
|
|
Formulaires configuration Exports Apogée (codes)
|
|
|
|
"""
|
|
|
|
|
|
|
|
from flask_wtf import FlaskForm
|
|
|
|
from wtforms import BooleanField, SubmitField
|
2023-02-27 10:20:59 +01:00
|
|
|
from wtforms.fields.simple import FileField, StringField, TextAreaField
|
2023-02-26 21:24:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
class ConfigCASForm(FlaskForm):
|
|
|
|
"Formulaire paramétrage CAS"
|
|
|
|
cas_enable = BooleanField("activer le CAS")
|
|
|
|
|
|
|
|
cas_server = StringField(
|
|
|
|
label="URL du serveur CAS",
|
|
|
|
description="""url complète. Commence en général par <tt>https://</tt>.""",
|
|
|
|
)
|
|
|
|
|
|
|
|
cas_attribute_id = StringField(
|
2023-02-27 12:01:26 +01:00
|
|
|
label="Attribut CAS utilisé comme id (laissez vide pour prendre l'id par défaut)",
|
2023-02-26 21:24:07 +01:00
|
|
|
description="""Le champs CAS qui sera considéré comme l'id unique des
|
|
|
|
comptes utilisateurs.""",
|
|
|
|
)
|
|
|
|
|
2023-02-26 23:27:40 +01:00
|
|
|
cas_ssl_verify = BooleanField("Vérification du certificat SSL")
|
2023-02-27 10:20:59 +01:00
|
|
|
cas_ssl_certificate_file = FileField(
|
2023-02-26 23:27:40 +01:00
|
|
|
label="Certificat (PEM)",
|
|
|
|
description="""Le contenu du certificat PEM
|
|
|
|
(commence typiquement par <tt>-----BEGIN CERTIFICATE-----</tt>)""",
|
|
|
|
)
|
|
|
|
|
2023-02-26 21:24:07 +01:00
|
|
|
submit = SubmitField("Valider")
|
|
|
|
cancel = SubmitField("Annuler", render_kw={"formnovalidate": True})
|