|
|
|
@ -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
|
|
|
|
|
</option>
|
|
|
|
|
));
|
|
|
|
|
console.log(isTimeLimited);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="input-group-append">
|
|
|
|
|
<Button onClick={toggle}
|
|
|
|
@ -193,6 +195,7 @@ console.log(isTimeLimited);
|
|
|
|
|
<Label htmlFor="title" className="m-0">{t("Voting time")}</Label>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col l xs="2">
|
|
|
|
|
|
|
|
|
|
<div className="radio-group">
|
|
|
|
|
<input
|
|
|
|
|
className="radio"
|
|
|
|
@ -260,7 +263,7 @@ console.log(isTimeLimited);
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Row className="mt-2">
|
|
|
|
|
<Row className="">
|
|
|
|
|
|
|
|
|
|
<Col xs="12" md="12" lg="6" className="time-container">
|
|
|
|
|
<input
|
|
|
|
@ -268,6 +271,7 @@ console.log(isTimeLimited);
|
|
|
|
|
type="date"
|
|
|
|
|
value={dateToISO(finish)}
|
|
|
|
|
min={dateToISO(start)}
|
|
|
|
|
dateFormat="MMMM d, yyyy h:mm aa"
|
|
|
|
|
onChange={(e) => {
|
|
|
|
|
setFinish(
|
|
|
|
|
new Date(
|
|
|
|
@ -343,7 +347,16 @@ console.log(isTimeLimited);
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
<hr className="confirmation-divider" />
|
|
|
|
|
{/* {restrictResult ? (
|
|
|
|
|
{restrictResult ? (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="small recap-vote-label p-3 mt-2 ">
|
|
|
|
|
<h6 className="m-0 p-0 recap-vote-content">
|
|
|
|
|
{t("Results available at any time")}
|
|
|
|
|
</h6>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="small recap-vote-label p-3 mt-2">
|
|
|
|
|
<h6 className="m-0 p-0 recap-vote-content">
|
|
|
|
@ -364,15 +377,7 @@ console.log(isTimeLimited);
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="small recap-vote-label p-3 mt-2 ">
|
|
|
|
|
<h6 className="m-0 p-0 recap-vote-content">
|
|
|
|
|
{t("Results available at any time")}
|
|
|
|
|
</h6>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)} */}</Col>
|
|
|
|
|
)}</Col>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
@ -382,6 +387,7 @@ console.log(isTimeLimited);
|
|
|
|
|
|
|
|
|
|
<Button onClick={() => { confirmCallback(); }} className="cursorPointer btn-transparent btn-validation mb-5 ml-auto mr-auto" >{t("Start the election")}<img src="/arrow-white.svg" /></Button>
|
|
|
|
|
</ModalFooter>
|
|
|
|
|
<Footer />
|
|
|
|
|
</Modal>
|
|
|
|
|
</div >
|
|
|
|
|
)
|
|
|
|
|