Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,6 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk
*.zip
connecthys/debug.log.1
connecthys/journal.log.1
32 changes: 31 additions & 1 deletion connecthys/application/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ class LoginForm(FlaskForm):
password = PasswordField('password', [validators.Required(), validators.Length(min=0, max=20)])
remember = BooleanField("remember", default=False)

class CreatePassword(FlaskForm):
password1 = PasswordField('password1', [validators.Required(), validators.Length(min=0, max=20)])
password2 = PasswordField('password2', [validators.Required(), validators.Length(min=0, max=20)])
accept = BooleanField("accept", default=False)
nom = HiddenField('nom')
#civilite = HiddenField('civilite')
prenom = HiddenField('prenom')
date_naiss = HiddenField('date_naiss')
rue_resid = HiddenField('rue_resid')
cp_resid = HiddenField('cp_resid')
ville_resid = HiddenField('ville_resid')
tel_domicile = HiddenField('tel_domicile')
tel_mobile = HiddenField('tel_mobile')
mail = HiddenField('mail')
identifiant = HiddenField('identifiant')

class ChangePassword(FlaskForm):
password1 = PasswordField('password1', [validators.Required(), validators.Length(min=0, max=20)])
password2 = PasswordField('password2', [validators.Required(), validators.Length(min=0, max=20)])
Expand Down Expand Up @@ -51,7 +67,6 @@ class RetourTipi(FlaskForm):
HEURTRANS = TextField('heurtrans', [validators.Required(), validators.Length(min=0, max=20)])

class Renseignements(FlaskForm):
idindividu = HiddenField("idindividu")
nom = TextField('nom')
prenom = TextField('prenom')
date_naiss = TextField('date_naiss')
Expand All @@ -69,3 +84,18 @@ class Renseignements(FlaskForm):
travail_mail = TextField('travail_mail')
adresse_auto = SelectField('adresse_auto', coerce=int)

class InscriptionFamille(FlaskForm):
nom = TextField('nom')
prenom = TextField('prenom')
#civilite = SelectField('civilite', choices=[(1, "Mme"), (2, "Mr")])
date_naiss = TextField('date_naiss')
cp_naiss = TextField('cp_naiss')
ville_naiss = TextField('ville_naiss')
rue_resid = TextField('rue_resid')
cp_resid = TextField('cp_resid')
ville_resid = TextField('ville_resid')
tel_domicile = TextField('tel_domicile')
tel_mobile = TextField('tel_mobile')
mail = TextField('mail')
identifiant = TextField('identifiant')

21 changes: 18 additions & 3 deletions connecthys/application/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,15 @@ class Paiement(Base):
numauto = Column(String(10))
dattrans = Column(String(15))
heurtrans = Column(String(15))
systeme_paiement = Column(String(50))
resultat = Column(String(50))
message = Column(String(450))
ventilation = Column(String(100000))
horodatage = Column(DateTime)

def __init__(self, IDpaiement=None, factures_ID=None, IDfamille=None, IDtransaction=None, refdet=None, \
montant = 0.0, objet=None, saisie=None, resultrans=None, numauto=None, \
dattrans=None, heurtrans=None):
montant = 0.0, objet=None, saisie=None, resultrans=None, numauto=None, dattrans=None, \
heurtrans=None, systeme_paiement=None, resultat=None, message=None, ventilation=None, horodatage=None):
if IDpaiement != None :
self.IDpaiement = IDpaiement
self.factures_ID = factures_ID
Expand All @@ -313,6 +318,11 @@ def __init__(self, IDpaiement=None, factures_ID=None, IDfamille=None, IDtransact
self.numauto = numauto
self.dattrans = dattrans
self.heurtrans = heurtrans
self.systeme_paiement = systeme_paiement
self.resultat = resultat
self.message = message
self.ventilation = ventilation
self.horodatage = horodatage

def __repr__(self):
return '<Paiement %d>' % (self.IDpaiement)
Expand Down Expand Up @@ -361,12 +371,15 @@ class Action(Base):
IDperiode = Column(Integer)
ref_unique = Column(String(50), index=True)
reponse = Column(String(450))
IDpaiement = Column(Integer)
ventilation = Column(String(100000))

reservations = relationship("Reservation")
renseignements = relationship("Renseignement")

def __init__(self, horodatage=None, IDfamille=None, IDindividu=None, IDutilisateur=None, categorie=None, action=None, description=None, \
commentaire=None, parametres=None, etat=None, traitement_date=None, IDperiode=None, ref_unique=None, reponse=None):
commentaire=None, parametres=None, etat=None, traitement_date=None, IDperiode=None, ref_unique=None, reponse=None, \
IDpaiement=None, ventilation=None):
if horodatage == None :
self.horodatage = datetime.datetime.now()
else :
Expand All @@ -387,6 +400,8 @@ def __init__(self, horodatage=None, IDfamille=None, IDindividu=None, IDutilisate
else :
self.ref_unique = ref_unique
self.reponse = reponse
self.IDpaiement = IDpaiement
self.ventilation = ventilation

def GetRefUnique(self):
horodatage = self.horodatage.strftime("%Y%m%d%H%M%S%f")
Expand Down
Binary file added connecthys/application/static/img/payzen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
217 changes: 217 additions & 0 deletions connecthys/application/templates/create_password.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
{% extends "adminlte/base_without_nav.html" %}
{% import "macros_password.html" as macros_password with context %}

{% block title %}Modification du mot de passe{% endblock %}
{% block description %}Modification du mot de passe{% endblock %}
{% block bodytag %}login-page {% block skin %}{{ GetParametre('SKIN', dict_parametres, 'skin-blue') }}{% endblock %}{% endblock %}

{% block head %}
{{ super() }}
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.ico') }}">
<!-- iCheck -->
<link href="{{ adminlte_find_resource('plugins/iCheck/all.css', cdn='local', use_minified=False) }}" rel="stylesheet" type="text/css">

<!-- <link href="{{ adminlte_find_resource('bootstrap/css/bootstrap.min.css', cdn='local', use_minified=False) }}" rel="stylesheet" type="text/css" /> -->
<script src="{{ adminlte_find_resource('plugins/jQuery/jquery-2.2.3.min.js', cdn='local', use_minified=False) }}"></script>
<script src="{{ adminlte_find_resource('plugins/jQueryUI/jquery-ui.min.js', cdn='local', use_minified=False) }}"></script>
<script src="{{ adminlte_find_resource('bootstrap/js/bootstrap.min.js', cdn='local', use_minified=False) }}"></script>


{# Affichage de l'image de fond #}
{% set IMAGE_FOND = GetParametre("IMAGE_FOND", dict_parametres) %}
{% if IMAGE_FOND == "" %}
{% set IMAGE_FOND = "bleu.jpg" %}
{% endif %}

<style type="text/css" media="screen">

html, body {
background-size: cover;
background: center fixed;
background-image:url({{ url_for('static', filename="fonds/" + IMAGE_FOND) }});
}
.login-page {
background-color:transparent;
}
.login-box-body
{
background:rgba(255, 255, 255, 0.8);
}
.login-box
{
width: 500px;
}



.login-footer {
position: fixed;
bottom: 0;
width: 100%;
display: block;
background-color: #222d32;
padding: 15px;
color: #fff;
font-size: 15px;
border-top: 1px solid #d2d6de;
-webkit-transition: -webkit-transform .3s ease-in-out,margin .3s ease-in-out;
-moz-transition: -moz-transform .3s ease-in-out,margin .3s ease-in-out;
-o-transition: -o-transform .3s ease-in-out,margin .3s ease-in-out;
transition: transform .3s ease-in-out,margin .3s ease-in-out;
z-index: 820;
}


/* Pour avoir un scrolling dans la modal */
.modal-dialog{
overflow-y: initial !important
}
.modal-body{
height: 400px;
overflow-y: auto;
}
.modal-header, .close {
color:white !important;
text-align: center;
font-size: 28px;
padding: 20px 20px;
}
.modal-footer {
background-color: #f9f9f9;
}

</style>



{% endblock %}



{% block body %}


<div class="login-box">
<div style="color: black" class="login-logo">
Le <strong>Portail</strong> Famille
</div>
<div class="login-box-body">
<p>Bienvenue dans votre portail famille !</p>
<p><b>2/2 Vous devez maintenant créer un nouveau mot de passe.</b></p>
<p>Attention, votre mot de passe doit comporter au moins 8 caractères, dont au minimum un chiffre, une lettre majuscule et une lettre minuscule.</p>
{# Display errors (if there are any). #}
{% with messages = get_flashed_messages(category_filter=["error"]) %}
{% if messages %}
{% for message in messages %}
<p><strong style="color: red">{{ message }}</strong></p>
{% endfor %}
{% endif %}
{% endwith %}
{# Render the form. #}
<form action="{{ url_for('create_password') }}" method="post">
{{ form.csrf_token }}
{{ form.nom(type='hidden', value=form.nom.data) }}
{{ form.prenom(type='hidden', value=form.prenom.data) }}
{{ form.date_naiss(type='hidden', value=form.date_naiss.data) }}
{{ form.rue_resid(type='hidden', value=form.rue_resid.data) }}
{{ form.cp_resid(type='hidden', value=form.cp_resid.data) }}
{{ form.ville_resid(type='hidden', value=form.ville_resid.data) }}
{{ form.tel_domicile(type='hidden', value=form.tel_domicile.data) }}
{{ form.tel_mobile(type='hidden', value=form.tel_mobile.data) }}
{{ form.mail(type='hidden', value=form.mail.data) }}
{{ form.identifiant(type='hidden', value=form.identifiant.data) }}
<div class="form-group has-feedback">
{{ form.password1(class='form-control', placeholder='Tapez un mot de passe', type='password', required='true', id='password1') }}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
{{ form.password2(class='form-control', placeholder='Retapez le mot de passe', type='password', required='true') }}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>

{{ macros_password.check_password() }}

<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
{{ form.accept(class='form-control', type='checkbox', required='true') }} J'accepte les <a href="#" data-toggle="modal" data-target="#modal_conditions">conditions d'utilisation</a>
</label>
</div>
</div>
<!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">Valider</button>
</div>
<!-- /.col -->
</div>
</form>
</div>
</div>



<footer class="login-footer">

<div class="pull-right hidden-xs">
{% block version %}
<b><a href="https://connecthys.com" title="Connecthys, le portail internet de Noethys">Connecthys</a></b> {{ config["VERSION_APPLICATION"] }}
{% endblock %}
</div>

{% block copyright %}{% if GetParametre('ORGANISATEUR_NOM', dict_parametres) != '' %}{{ GetParametre('ORGANISATEUR_NOM', dict_parametres) }}{% endif %}{% endblock %}

</footer>


<!-- Modal : Conditions d'utilisation -->
<div class="modal fade" id="modal_conditions" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">

<div class="modal-header bg-light-blue">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel"><strong>Conditions générales d'utilisation</strong></h4>
</div>

<div class="modal-body">

{% if conditions_utilisation != None %}
{{ conditions_utilisation|safe }}
{% endif %}

</div><!-- Fin modal body -->

<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
</div>

</div>
</div>
</div>


{% endblock %}


{% block scripts %}
{{ super() }}

<!-- iCheck -->
<script src="{{ adminlte_find_resource('plugins/iCheck/icheck.min.js', cdn='local', use_minified=False)}}"></script>
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
</script>

<!-- Validation du password -->
{{ macros_password.password_scripts(inputid='password1') }}



{%- endblock scripts %}
4 changes: 2 additions & 2 deletions connecthys/application/templates/csrf_error.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
Le <strong>Portail</strong> Famille
</div>
<div class="login-box-body">
<p>Votre session a expir�.</p>
<p>Veuillez rechargez la page dans votre navigateur afin d'acc�der de nouveau � la page d'identification.</p>
<p>Votre session a expiré.</p>
<p>Veuillez rechargez la page dans votre navigateur afin d'accéder de nouveau au portail.</p>
</div>
</div>

Expand Down
Loading