Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
E
ethikis_survey
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Le Filament
Ethikis
ethikis_survey
Validations
ceb99a32
Valider
ceb99a32
rédigé
23 juin 2021
par
Juliana
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[ADD] Add notif to answers done + send mail when answers done
parent
29c18242
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
controllers/main.py
+5
-0
5 ajouts, 0 suppression
controllers/main.py
models/survey_survey.py
+1
-8
1 ajout, 8 suppressions
models/survey_survey.py
static/src/css/ethikis_survey.css
+57
-3
57 ajouts, 3 suppressions
static/src/css/ethikis_survey.css
avec
63 ajouts
et
11 suppressions
controllers/main.py
+
5
−
0
Voir le fichier @
ceb99a32
...
...
@@ -49,6 +49,11 @@ class WebsiteSurveyExtend(Survey):
vals
=
{
'
last_displayed_page_id
'
:
page_id
}
if
next_page
is
None
and
not
go_back
:
vals
.
update
({
'
state
'
:
'
done
'
})
if
user_input
.
survey_id
.
is_mail_auto
:
# Send mail auto if survey configurated
user_input
.
action_send_mail
()
# Send notification to followers
survey
.
message_post
(
body
=
"
Sondage terminé
"
,
message_type
=
"
notification
"
,
subtype
=
"
ethikis_survey.survey_state_change
"
)
else
:
vals
.
update
({
'
state
'
:
'
skip
'
})
user_input
.
sudo
(
user
=
user_id
).
write
(
vals
)
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
models/survey_survey.py
+
1
−
8
Voir le fichier @
ceb99a32
...
...
@@ -38,7 +38,7 @@ class Survey(models.Model):
def
_track_subtype
(
self
,
init_values
):
self
.
ensure_one
()
if
((
'
stage_id
'
in
init_values
)
and
(
self
.
stage_id
.
name
==
"
F
ermé
"
)):
if
((
'
stage_id
'
in
init_values
)
and
(
self
.
stage_id
.
name
==
"
T
erm
in
é
"
)):
return
'
ethikis_survey.survey_state_change
'
return
super
(
Survey
,
self
).
_track_subtype
(
init_values
)
...
...
@@ -92,13 +92,6 @@ class SurveyUserInput(models.Model):
'
url
'
:
'
/survey/%s/%s/%s
'
%
(
url_tag
,
self
.
survey_id
.
id
,
self
.
token
)
}
@api.onchange
(
'
state
'
)
def
on_change_state
(
self
):
# At the end of the survey, send a mail if survey is configured for that
if
self
.
state
==
'
done
'
:
if
self
.
survey_id
.
is_mail_auto
:
self
.
action_send_mail
()
@api.multi
def
action_send_mail
(
self
):
self
.
ensure_one
()
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
static/src/css/ethikis_survey.css
+
57
−
3
Voir le fichier @
ceb99a32
...
...
@@ -185,14 +185,57 @@ input[type=range] {
input
[
type
=
range
]
:focus
{
outline
:
none
;
}
input
[
type
=
range
]
::-ms-track
{
width
:
100%
;
height
:
4px
;
cursor
:
pointer
;
animate
:
0.2s
;
background
:
#61C4E1
;
background-color
:
#61C4E1
;
border-radius
:
25px
;
}
input
[
type
=
range
]
::-moz-range-track
{
width
:
100%
;
height
:
4px
;
cursor
:
pointer
;
animate
:
0.2s
;
background
:
#61C4E1
;
background-color
:
#61C4E1
;
border-radius
:
25px
;
}
input
[
type
=
range
]
::-webkit-slider-runnable-track
{
width
:
100%
;
height
:
4px
;
cursor
:
pointer
;
animate
:
0.2s
;
background
:
#61C4E1
;
background-color
:
#61C4E1
;
border-radius
:
25px
;
}
input
[
type
=
range
]
::-moz-range-thumb
{
height
:
20px
;
width
:
20px
;
border-radius
:
50%
;
background
:
#fff
;
box-shadow
:
0
0
4px
0
rgba
(
0
,
0
,
0
,
1
);
cursor
:
pointer
;
-webkit-appearance
:
none
;
margin-top
:
-8px
;
}
input
[
type
=
range
]
::-ms-thumb
{
height
:
20px
;
width
:
20px
;
border-radius
:
50%
;
background
:
#fff
;
box-shadow
:
0
0
4px
0
rgba
(
0
,
0
,
0
,
1
);
cursor
:
pointer
;
-webkit-appearance
:
none
;
margin-top
:
-8px
;
}
input
[
type
=
range
]
::-webkit-slider-thumb
{
height
:
20px
;
width
:
20px
;
...
...
@@ -203,9 +246,20 @@ input[type=range]::-webkit-slider-thumb {
-webkit-appearance
:
none
;
margin-top
:
-8px
;
}
input
[
type
=
range
]
:focus::-ms-track
{
background
:
#61C4E1
;
background-color
:
#61C4E1
;
}
input
[
type
=
range
]
:focus::-moz-range-track
{
background
:
#61C4E1
;
background-color
:
#61C4E1
;
}
input
[
type
=
range
]
:focus::-webkit-slider-runnable-track
{
background
:
#61C4E1
;
background-color
:
#61C4E1
;
}
.range-wrap
{
position
:
relative
;
}
...
...
@@ -246,7 +300,7 @@ input[type=range]:focus::-webkit-slider-runnable-track {
box-shadow
:
0
0
0
0.2rem
rgba
(
0
,
160
,
157
,
0
);
}
.form-control
{
input
#range
{
background-color
:
transparent
!important
;
border
:
0px
solid
#ced4da
!important
;
}
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter