diff --git a/components/form/ConfirmModal.jsx b/components/form/ConfirmModal.jsx index 328d376..3d81fd7 100644 --- a/components/form/ConfirmModal.jsx +++ b/components/form/ConfirmModal.jsx @@ -1,5 +1,6 @@ import { useTranslation } from "next-i18next"; import { useState } from "react"; +import Footer from "@components/layouts/Footer"; import TrashButton from "./TrashButton"; import { faExclamationTriangle, @@ -49,7 +50,8 @@ const ConfirmModal = ({ CreateElection, handleRestrictResultCheck, handleIsTimeL {i}h00 )); -console.log(isTimeLimited); + + return (
*/}
- - - - + + + + + + + +
+ +
+ + +
+
+ + + - {t("Starting date")} - -
- -
+ + { + setStart( + new Date( + timeMinusDate(start) + + new Date(e.target.valueAsNumber).getTime() + ) + ); + }} + /> - -
-
- - - - {t("Starting date")} - - - { - setStart( - new Date( - timeMinusDate(start) + - new Date(e.target.valueAsNumber).getTime() - ) - ); - }} - /> - - - + setStart( + new Date( + dateMinusTime(start).getTime() + + e.target.value * 3600000 ) - } - > - {displayClockOptions()} - - - + ) + } + > + {displayClockOptions()} + + + - + - - { - setFinish( - new Date( - timeMinusDate(finish) + - new Date(e.target.valueAsNumber).getTime() - ) - ); - }} - /> - - - { + setFinish( + new Date( + timeMinusDate(finish) + + new Date(e.target.valueAsNumber).getTime() ) - } - > - {displayClockOptions()} - - - -
+ ); + }} + /> + + + + + +

@@ -343,36 +347,37 @@ console.log(isTimeLimited); )}
- {/* {restrictResult ? ( -
-
-
- - {t("Results available at the close of the vote")} -
-

- - {t( - "The results page will not be accessible until the end date is reached." - )}{" "} - ({finish.toLocaleDateString()} {t("at")}{" "} - {finish.toLocaleTimeString()}) - -

+ {restrictResult ? ( +
+
+
+ {t("Results available at any time")} +
+
-
- ) : ( -
-
-
- {t("Results available at any time")} -
+ + ) : ( +
+
+
+ + {t("Results available at the close of the vote")} +
+

+ + {t( + "The results page will not be accessible until the end date is reached." + )}{" "} + ({finish.toLocaleDateString()} {t("at")}{" "} + {finish.toLocaleTimeString()}) + +

+
-
- )} */} + )}
@@ -382,6 +387,7 @@ console.log(isTimeLimited); +
)