profileShare

rasmusjy / splitapp-backend-clean-onion

Read-only snapshot

No repository description.

main default branch 429 files Expires Sep 13, 2026, 9:06 AM
Create.cshtml 4,964 bytes
1
2 @{
3 ViewData["Title"] = Localizer["Create Poll"];
4 var tripId = (Guid)ViewData["TripId"]!;
5 }
6
7 <div class="row justify-content-center">
8 <div class="col-md-8 col-lg-6">
9 <div class="sa-card-static sa-card-accent" style="border-top-color: #6366f1;">
10 <div class="sa-card-body" style="padding: var(--sa-space-8);">
11 <div class="text-center mb-4">
12 <div style="font-size: 2rem; color: #6366f1; margin-bottom: var(--sa-space-2);">
13 <i class="bi bi-bar-chart-fill"></i>
14 </div>
15 <h1 style="font-size: 1.5rem; margin-bottom: 4px;">@Localizer["Create Poll"]</h1>
16 <p class="sa-text-muted">@Localizer["Help your group make decisions together"]</p>
17 </div>
18
19 <form asp-action="Create" asp-route-tripId="@tripId" method="post" data-sa-loading>
20 <div asp-validation-summary="ModelOnly" class="text-danger"></div>
21
22 <div class="mb-4">
23 <label for="question" class="form-label">@Localizer["Question"]</label>
24 <input type="text" id="question" name="question" class="form-control"
25 required maxlength="500" placeholder="@Localizer["What should the group decide?"]"
26 style="font-size: 1.1rem; font-weight: 600;" />
27 </div>
28
29 <div class="d-flex gap-4 mb-4" style="padding: var(--sa-space-4); background: var(--sa-gray-50); border-radius: var(--sa-radius-md);">
30 <div class="form-check form-switch">
31 <input type="checkbox" id="allowMultipleVotes" name="allowMultipleVotes" value="true" class="form-check-input" />
32 <label for="allowMultipleVotes" class="form-check-label" style="font-size: 0.9rem;">
33 <i class="bi bi-check2-all me-1"></i>@Localizer["Allow multiple votes"]
34 </label>
35 </div>
36 <div class="form-check form-switch">
37 <input type="checkbox" id="isAnonymous" name="isAnonymous" value="true" class="form-check-input" />
38 <label for="isAnonymous" class="form-check-label" style="font-size: 0.9rem;">
39 <i class="bi bi-incognito me-1"></i>@Localizer["Anonymous voting"]
40 </label>
41 </div>
42 </div>
43
44 <div class="mb-3">
45 <div class="d-flex justify-content-between align-items-center mb-2">
46 <label class="form-label mb-0">@Localizer["Options"]</label>
47 <small class="sa-text-muted">@Localizer["At least 2 required"]</small>
48 </div>
49
50 <div id="pollOptionsContainer" class="d-flex flex-column gap-2">
51 <div class="poll-option-row d-flex gap-2">
52 <input type="text" name="option1" class="form-control" placeholder="@Localizer["Option"] 1 *" required maxlength="300" />
53 </div>
54 <div class="poll-option-row d-flex gap-2">
55 <input type="text" name="option2" class="form-control" placeholder="@Localizer["Option"] 2 *" required maxlength="300" />
56 </div>
57 <div class="poll-option-row d-flex gap-2">
58 <input type="text" name="option3" class="form-control" placeholder="@Localizer["Option"] 3" maxlength="300" />
59 </div>
60 <div class="poll-option-row d-flex gap-2">
61 <input type="text" name="option4" class="form-control" placeholder="@Localizer["Option"] 4" maxlength="300" />
62 </div>
63 <div class="poll-option-row d-flex gap-2">
64 <input type="text" name="option5" class="form-control" placeholder="@Localizer["Option"] 5" maxlength="300" />
65 </div>
66 </div>
67 </div>
68
69 <div class="d-flex gap-3 mt-4">
70 <button type="submit" class="sa-btn flex-grow-1" style="background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;">
71 <i class="bi bi-check-lg"></i> @Localizer["Create Poll"]
72 </button>
73 <a asp-action="Index" asp-route-tripId="@tripId" class="sa-btn sa-btn-ghost">@Localizer["Cancel"]</a>
74 </div>
75 </form>
76 </div>
77 </div>
78 </div>
79 </div>
80
81 @section Scripts {
82 <partial name="_ValidationScriptsPartial" />
83 }
84