From 7f7c6b10bb324b9d2812f85b7cf0effa3a18b94e Mon Sep 17 00:00:00 2001
From: Antoine Goutenoir <antoine.goutenoir@irap.omp.eu>
Date: Tue, 29 Oct 2019 10:16:06 +0100
Subject: [PATCH] Disable RFI in the form.

---
 flaskr/controllers/main_controller.py |  1 +
 flaskr/forms.py                       | 32 ++++++++++++++++----------------
 flaskr/templates/estimate.html        |  8 ++++----
 3 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/flaskr/controllers/main_controller.py b/flaskr/controllers/main_controller.py
index 51b42ba..4ff3c13 100644
--- a/flaskr/controllers/main_controller.py
+++ b/flaskr/controllers/main_controller.py
@@ -48,6 +48,7 @@ def get_emission_models():
 
 
 @main.route('/favicon.ico')
+@cache.cached(timeout=10000)
 def favicon():  # we want it served from the root, not from static/
     return send_from_directory(
         join(main.root_path, '..', 'static', 'img'),
diff --git a/flaskr/forms.py b/flaskr/forms.py
index 83f60b4..7469ec1 100644
--- a/flaskr/forms.py
+++ b/flaskr/forms.py
@@ -81,22 +81,22 @@ class EstimateForm(FlaskForm):
             "placeholder": form_content['destination_addresses']['placeholder']
         },
     )
-    compute_optimal_destination = BooleanField(
-        label=form_content['compute_optimal_destination']['label'],
-        description=form_content['compute_optimal_destination']['description'],
-        default=False,
-        validators=[
-            validators.Optional(),
-        ],
-    )
-    use_atmosfair_rfi = BooleanField(
-        label=form_content['use_atmosfair_rfi']['label'],
-        description=form_content['use_atmosfair_rfi']['description'],
-        default=False,
-        validators=[
-            validators.Optional(),
-        ],
-    )
+    # compute_optimal_destination = BooleanField(
+    #     label=form_content['compute_optimal_destination']['label'],
+    #     description=form_content['compute_optimal_destination']['description'],
+    #     default=False,
+    #     validators=[
+    #         validators.Optional(),
+    #     ],
+    # )
+    # use_atmosfair_rfi = BooleanField(
+    #     label=form_content['use_atmosfair_rfi']['label'],
+    #     description=form_content['use_atmosfair_rfi']['description'],
+    #     default=False,
+    #     validators=[
+    #         validators.Optional(),
+    #     ],
+    # )
 
     def validate(self):
         check_validate = super(EstimateForm, self).validate()
diff --git a/flaskr/templates/estimate.html b/flaskr/templates/estimate.html
index faa19b8..86adeda 100644
--- a/flaskr/templates/estimate.html
+++ b/flaskr/templates/estimate.html
@@ -84,10 +84,10 @@
 {#            <div class="form-check form-group">#}
 {#                {{ render_checkbox(form.compute_optimal_destination) }}#}
 {#            </div>#}
-            <div class="form-check form-group">
-                {{ render_checkbox(form.use_atmosfair_rfi) }}
-                <small class="form-text text-muted">Disabled. Work in Progress. RFI=1.9</small>
-            </div>
+{#            <div class="form-check form-group">#}
+{#                {{ render_checkbox(form.use_atmosfair_rfi) }}#}
+{#                <small class="form-text text-muted">Disabled. Work in Progress. RFI=1.9</small>#}
+{#            </div>#}
             <div class="form-group">
                 {{ render_field(form.comment) }}
             </div>
--
libgit2 0.21.2