Skip to content

Commit bfd5dbe

Browse files
committed
maint(pat depends demo): Add demo with optional date fields.
1 parent 85a824a commit bfd5dbe

2 files changed

Lines changed: 30 additions & 126 deletions

File tree

src/pat/depends/index--plone-app-event.html

Lines changed: 0 additions & 123 deletions
This file was deleted.

src/pat/depends/index.html

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
></script>
1414
</head>
1515
<body>
16-
<div id="pat-depends-demo">
17-
<form action="#">
16+
<section id="pat-depends-demo">
17+
<h2>pat-depends with checkboxes, radiobuttons and multiselects</h2>
18+
<form>
1819
<fieldset class="horizontal">
1920
<fieldset class="group checklist radio">
2021
<legend>Flavour</legend>
@@ -112,6 +113,32 @@
112113

113114
</fieldset>
114115
</form>
115-
</div>
116+
</section>
117+
118+
<section id="pat-depends-demo-2">
119+
<h2>pat-depends with optional date/time inputs</h2>
120+
<form>
121+
<label>Start
122+
<input type="date" name="start-date" />
123+
<input type="time" name="start-time"
124+
class="pat-depends"
125+
data-pat-depends="condition: not whole_day" />
126+
</label>
127+
<label
128+
class="pat-depends"
129+
data-pat-depends="condition: not open_end">End
130+
<input type="date" name="end-date" />
131+
<input type="time" name="end-time"
132+
class="pat-depends"
133+
data-pat-depends="condition: not whole_day" />
134+
</label>
135+
<label>Whole day
136+
<input type="checkbox" name="whole_day" />
137+
</label>
138+
<label>Open end
139+
<input type="checkbox" name="open_end" />
140+
</label>
141+
</form>
142+
</section>
116143
</body>
117144
</html>

0 commit comments

Comments
 (0)