Toolkit: Fix text input label, add basic checkbox
This commit is contained in:
parent
d3e62b7cd1
commit
8253a211ae
12
toolkit/templates/checkbox.rs.html
Normal file
12
toolkit/templates/checkbox.rs.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
@(name: &str, title: &str, checked: bool)
|
||||
|
||||
<div>
|
||||
<label>
|
||||
@if checked {
|
||||
<input type="checkbox" name="@name" checked />
|
||||
} else {
|
||||
<input type="checkbox" name="@name" />
|
||||
}
|
||||
<span>@title</span>
|
||||
</label>
|
||||
</div>
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<div class="@text_input.class_string()">
|
||||
@if let Some(title) = text_input.title.as_ref() {
|
||||
<label for="@text_input.input.name" class="toolkit-input--label">
|
||||
<label class="toolkit-input--label">
|
||||
<span class="toolkit-input--title">@title</span>
|
||||
@:input(&text_input.input)
|
||||
</label>
|
||||
|
|
Loading…
Reference in a new issue