]> git.parisson.com Git - teleforma.git/commitdiff
Skin missing time modal and update relative messages : https://trackers.pilotsystems...
authorYoan Le Clanche <yoanl@pilotsystems.net>
Tue, 29 Nov 2022 16:11:39 +0000 (17:11 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Tue, 29 Nov 2022 16:11:39 +0000 (17:11 +0100)
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/teleforma/seminar_detail.html
teleforma/views/pro.py

index 4027046e958be6616d473d3a1177e2f7f13b1f79..be449c8f4f164d4f9af7b3c7c11cf1a4b3a93072 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index 7cc7c467153839208f75bbd7a9ca876299e13884..d3f924d1395c522abc466704cd5e676cdceef781 100644 (file)
@@ -2082,7 +2082,7 @@ msgstr ""
 "Vous avez franchi avec succès toutes les étapes de votre formation. "
 "Une attestation de formation vous sera délivrée dès que vos réponses aux "
 "consultations fictives auront été validées par notre équipe pédagogique "
-"(2 jours ouvrés maximum) sous réserve d'un temps de connexion suffisant."
+"(2 jours ouvrés maximum)."
 
 #: views/pro.py:186
 msgid ""
index 1a8d5ba20e00c1f32df1c5d0d5d96d141cb20aeb..1d8c5715a5cfa45529dba8bd65df9fe91bbd948e 100644 (file)
@@ -1676,6 +1676,28 @@ form.add_actus #id_text_parent{
 }
 
 
+.modal-warning .ui-dialog-titlebar {
+    background-image: none;
+    color: white;
+    background-color: red;
+    font-size: 20px;
+
+}
+.modal-warning .ui-dialog-buttonpane {
+    background-color: red;
+    color: white;
+}
+.modal-warning .ui-button {
+    background-color: white;
+    font-weight: 600;
+}
+/* modal dialog */
+.modal-warning .ui-dialog-content {
+    padding: 2em;
+    background-color: #f5f5f5;
+}
+
+
 
 .desk_center {
     float: left;
index ed0ea018405123574a7f5f1630a0c3099884091c..ccfc7bd5912d90b244f9c5d41014b81a4a44a342 100644 (file)
       userCollapseText: 'Cacher le texte',
     });
 
-
     {% if popup_message %}
       // show a warning popup and set a cookie to not display the popup each visit
       if(getCookie('time-popup-view') != 1){
         $( "#warning-message" ).dialog({
           modal: true,
+          width: 400,
+          height: 400,
+          dialogClass: 'modal-warning',
           buttons: {
             Ok: function() {
               $( this ).dialog( "close" );
index f0a486b657e8c8edac9f768a13621396a080fa3b..b455ef532dd21de4799dbba38f29ae55a50f3c1f 100644 (file)
@@ -258,9 +258,18 @@ class SeminarView(SeminarAccessMixin, DetailView):
         context['seminar_progress'] = progress
         context['seminar_validated'] = validated
         delta_sec = context['delta_sec']
+        minutes = -delta_sec / 60
+        hours = minutes / 60
+        missing = "%d minutes" % minutes
+        if hours >= 1:
+            missing = "%dh%02d" % (hours, minutes % 60)
         if progress == 100 and not validated and self.template_name == 'teleforma/seminar_detail.html':
-            messages.info(self.request, _(
-                "You have successfully terminated your e-learning seminar. A training testimonial will be available as soon as the pedagogical team validate all your answers (48h maximum)."))
+            if delta_sec < 0:
+                messages.info(self.request, _(
+                    "You have successfully terminated your e-learning seminar. A training testimonial will be available as soon as the pedagogical team validate all your answers (48h maximum)."))
+            else:
+                messages.warning(self.request, _("Your connexion time is not sufficient. In order to get your testimonial, you "
+                                             "still have to work at least %(time)s.") % {'time': missing})
         elif progress < 100 and validated and self.template_name == 'teleforma/seminar_detail.html' and missing_steps == set('5'):
             messages.info(self.request, _(
                 "All your answers have been validated. You can now read the corrected documents (step 5)."))
@@ -275,11 +284,6 @@ class SeminarView(SeminarAccessMixin, DetailView):
                 messages.warning(self.request, _(
                     "You still need to complete step %(step)s in order to get yout testimonial.") % {'step': missing_steps.pop()})
         if progress == 100 and validated and delta_sec < 0:
-            minutes = -delta_sec / 60
-            hours = minutes / 60
-            missing = "%d minutes" % minutes
-            if hours >= 1:
-                missing = "%dh%02d" % (hours, minutes % 60)
             messages.warning(self.request, _("Your connexion time is not sufficient. In order to get your testimonial, you "
                                              "still have to work at least %(time)s.") % {'time': missing})
             context['popup_message'] = _("Your connexion time is not sufficient. In order to get your testimonial, you "