diff --git a/caimira/apps/calculator/static/js/form.js b/caimira/apps/calculator/static/js/form.js index cfd23c64..45656c78 100644 --- a/caimira/apps/calculator/static/js/form.js +++ b/caimira/apps/calculator/static/js/form.js @@ -332,8 +332,9 @@ function show_sensors_data(url) { } }, error: function(_, _, errorThrown) { - if (errorThrown != 'Unauthorized') alert(errorThrown); - else alert('Unauthorized - Something went wrong during the ARVE API authentication process.'); + $("#arve_api_error_message").val(errorThrown).show(); + $('#DIVsensors_data').hide(); + $('#arve_sensor_yes').prop('disabled', true) } }); } diff --git a/caimira/apps/templates/cern/calculator.form.html.j2 b/caimira/apps/templates/cern/calculator.form.html.j2 index 7a2f418a..4e5ae90a 100644 --- a/caimira/apps/templates/cern/calculator.form.html.j2 +++ b/caimira/apps/templates/cern/calculator.form.html.j2 @@ -15,7 +15,8 @@ -