Skip to content

Commit ff7f119

Browse files
authored
Merge pull request #127 from dedis/front-ui-create-election
Fix Front UI create election
2 parents 7ed2f27 + 3f42bf4 commit ff7f119

17 files changed

+1133
-404
lines changed

web/frontend/package-lock.json

-59
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/frontend/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"react": "^17.0.2",
3232
"react-beautiful-dnd": "^13.1.0",
3333
"react-dom": "^17.0.2",
34-
"react-dropzone": "^12.0.4",
3534
"react-i18next": "^11.15.3",
3635
"react-router": "^6.2.1",
3736
"react-router-dom": "^6.2.1",

web/frontend/src/language/en.json

+39-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,34 @@
2020
"goHome": "Go to home page",
2121
"results": "results",
2222
"showing": "Showing",
23+
"saveQuestion": "Save",
24+
"addRank": "Add rank",
25+
"editrank": "Edit rank",
26+
"removerank": "Remove rank",
27+
"addSelect": "Add select",
28+
"editselect": "Edit select",
29+
"removeselect": "Remove select",
30+
"addText": "Add text",
31+
"edittext": "Edit text",
32+
"removetext": "Remove text",
33+
"subject": "Subject",
34+
"choices": "Choices",
35+
"answers": "Answers",
36+
"enterMaxLength": "Enter the MaxLength",
37+
"maxChoices": "Max number of choices",
38+
"minChoices": "Min number of choices",
39+
"enterMinN": "Enter the MinN",
40+
"enterMaxN": "Enter the MaxN",
41+
"enterRegex": "Enter your regex",
42+
"enterTitle": "Enter your Title",
43+
"mainProperties": "Main properties",
44+
"additionalProperties": "Additional properties",
45+
"removeSubject": "Remove subject",
46+
"addSubject": "Add subject",
47+
"addQuestionrank": "Rank",
48+
"addQuestionselect": "Select",
49+
"addQuestiontext": "Text",
50+
"importFile": "Import JSON file",
2351
"enterSciper": "Please give the sciper of the user",
2452
"adminDetails": "Add or remove roles of users from the admin table",
2553
"navBarCreateElection": "Create election",
@@ -38,11 +66,20 @@
3866
"add": "Add",
3967
"exportJSON": "Export as JSON",
4068
"delete": "Delete",
41-
"clearElection": "Clear election",
69+
"combineShares": "Combine shares",
70+
"createElec": "Create election",
71+
"clearElec": "Clear election",
72+
"confirmRemovesubject": "Do you really want to remove this subject?",
73+
"confirmRemovetext": "Do you really want to remove this text?",
74+
"confirmRemoverank": "Do you really want to remove this rank?",
75+
"confirmRemoveselect": "Do you really want to remove this select?",
4276
"upload": "Choose a json file from your computer:",
4377
"notJson": "The file needs to have the .json extension.",
4478
"noFile": "No file found",
45-
"create": "Create a new election by filling out the information below or by uploading a json file",
79+
"createElecDesc": "Create a new election by filling out the information below or by",
80+
"uploadJSON": "uploading a JSON file",
81+
"enterMainTitle": "Enter the Main Title",
82+
"enterSubjectTitle": "Enter the Subject Title",
4683
"errorCandidates": "You must add at least one candidate!",
4784
"errorNewCandidate": "Are you sure you don't want to add ",
4885
"errorRetrievingElections": "An error seems to have occurred while retrieving all the elections from our server. Contact the administrator of this website.",

web/frontend/src/pages/election/New.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ const ElectionCreate: FC = () => {
77
const { t } = useTranslation();
88

99
return (
10-
<div className="font-sans">
11-
<div className="px-4 py-4">
10+
<div className="w-[70rem] font-sans md:px-4 md:py-4">
11+
<div className="px-4 pt-4">
1212
<h2 className="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:truncate">
1313
{t('navBarCreate')}
1414
</h2>
15-
<div className="pt-2">{t('create')}</div>
1615
</div>
1716
<ElectionForm />
1817
</div>

0 commit comments

Comments
 (0)