From 3dcfa213c9673a24d2b02fc208418b15caea132e Mon Sep 17 00:00:00 2001 From: gaazzopa Date: Thu, 5 Nov 2020 14:03:15 +0100 Subject: [PATCH] Added disclaimer and code license --- cara/apps/calculator/static/form.html | 15 +++++++++++++++ cara/apps/calculator/static/js/form.js | 24 +++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/cara/apps/calculator/static/form.html b/cara/apps/calculator/static/form.html index 10c3ee2f..af166154 100644 --- a/cara/apps/calculator/static/form.html +++ b/cara/apps/calculator/static/form.html @@ -6,6 +6,7 @@ + @@ -168,5 +169,19 @@ You should specify if the event is a one off (give date) or recurrent use of the



+ +
+

This software is provided with a disclaimer and code license.


+

+
+ \ No newline at end of file diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js index c1bdaaf1..43f1301f 100644 --- a/cara/apps/calculator/static/js/form.js +++ b/cara/apps/calculator/static/js/form.js @@ -130,4 +130,26 @@ function require_lunch(option) { /* -------UI------- */ $(function() { $("#datepicker").datepicker(); -}); \ No newline at end of file +}); + +$( function() { + $(".dialog").dialog({modal:true}); +}); + +function show_disclaimer() { + var dots = document.getElementById("dots"); + var moreText = document.getElementById("more"); + var btnText = document.getElementById("myBtn"); + + if (dots.style.display === "none") { + dots.style.display = "inline"; + btnText.innerHTML = "Read more"; + moreText.style.display = "none"; + $("#DIALOG_welcome").dialog("option", "height", 185); + } else { + dots.style.display = "none"; + btnText.innerHTML = "Read less"; + moreText.style.display = "inline"; + $("#DIALOG_welcome").dialog("option", "height", 600); + } +} \ No newline at end of file