Skip to content

Commit 8602ed3

Browse files
committed
feat(mockup): add recurring rule option
1 parent db5cf05 commit 8602ed3

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

apps/mockup/calendar-edit-entry.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,30 @@ <h3>New Entry</h3>
364364
</div>
365365
</div>
366366

367+
<br />
368+
369+
<div class="Options js-OptionInput" id="input-1">
370+
<div class="OptionInput">
371+
<input
372+
id="input-1-field-0"
373+
type="checkbox"
374+
name="uid-2-group"
375+
/>
376+
<label for="input-1-field-0">Add recurring rule</label>
377+
</div>
378+
</div>
379+
<label id="recurring-rule-input" style="display: none">
380+
Only occurs every
381+
<input
382+
type="number"
383+
style="width: 5rem; margin-inline: 0.5rem"
384+
class="Input"
385+
min="2"
386+
value="2"
387+
/>
388+
weeks.
389+
</label>
390+
367391
<!-- component: FormButtons -->
368392
<div class="FormButtons">
369393
<!-- component: Button -->
@@ -527,6 +551,18 @@ <h3>New Entry</h3>
527551
<!-- component: ContentArea -->
528552
</main>
529553
<script>
554+
document
555+
.getElementById("input-1-field-0")
556+
.addEventListener("change", (event) => {
557+
if (event.target.checked) {
558+
document.getElementById("recurring-rule-input").style.display =
559+
"block";
560+
} else {
561+
document.getElementById("recurring-rule-input").style.display =
562+
"none";
563+
}
564+
});
565+
530566
document.getElementById("from-date-picker").value = new Date()
531567
.toISOString()
532568
.substring(0, 10);

apps/mockup/calendar-new-entry.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,30 @@ <h3>New Entry</h3>
364364
</div>
365365
</div>
366366

367+
<br />
368+
369+
<div class="Options js-OptionInput" id="input-1">
370+
<div class="OptionInput">
371+
<input
372+
id="input-1-field-0"
373+
type="checkbox"
374+
name="uid-2-group"
375+
/>
376+
<label for="input-1-field-0">Add recurring rule</label>
377+
</div>
378+
</div>
379+
<label id="recurring-rule-input" style="display: none">
380+
Only occurs every
381+
<input
382+
type="number"
383+
style="width: 5rem; margin-inline: 0.5rem"
384+
class="Input"
385+
min="2"
386+
value="2"
387+
/>
388+
weeks.
389+
</label>
390+
367391
<!-- component: FormButtons -->
368392
<div class="FormButtons">
369393
<!-- component: Button -->
@@ -529,6 +553,18 @@ <h3>New Entry</h3>
529553
</main>
530554

531555
<script>
556+
document
557+
.getElementById("input-1-field-0")
558+
.addEventListener("change", (event) => {
559+
if (event.target.checked) {
560+
document.getElementById("recurring-rule-input").style.display =
561+
"block";
562+
} else {
563+
document.getElementById("recurring-rule-input").style.display =
564+
"none";
565+
}
566+
});
567+
532568
document.getElementById("from-date-picker").value = new Date()
533569
.toISOString()
534570
.substring(0, 10);

0 commit comments

Comments
 (0)