app: Better handle ingredient selection form
This commit is contained in:
parent
b42de56755
commit
ce29b7b75d
1 changed files with 34 additions and 28 deletions
|
|
@ -118,7 +118,9 @@ pub(super) fn IngredientSelectBase(props: &IngredientSelectBaseProps) -> HtmlRes
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<script src="/awesomplete.min.js" async=true></script>
|
<script src="/awesomplete.min.js" async=true></script>
|
||||||
<div class="d-flex align-items-center mb-1">
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 d-flex align-items-center mb-1">
|
||||||
<label for="igSelect" class="pe-1">{"Name:"}</label>
|
<label for="igSelect" class="pe-1">{"Name:"}</label>
|
||||||
<input
|
<input
|
||||||
class="awesomplete form-control"
|
class="awesomplete form-control"
|
||||||
|
|
@ -131,7 +133,7 @@ pub(super) fn IngredientSelectBase(props: &IngredientSelectBaseProps) -> HtmlRes
|
||||||
{ for ig.keys().map(|k| html!{<option key={k.clone()}>{k}</option>}) }
|
{ for ig.keys().map(|k| html!{<option key={k.clone()}>{k}</option>}) }
|
||||||
</datalist>
|
</datalist>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex mw-50 align-items-center">
|
<div class="col-sm-6 d-flex align-items-center">
|
||||||
<label for="igAmount" class="px-1">{"Amount: "}</label>
|
<label for="igAmount" class="px-1">{"Amount: "}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input
|
<input
|
||||||
|
|
@ -146,9 +148,13 @@ pub(super) fn IngredientSelectBase(props: &IngredientSelectBaseProps) -> HtmlRes
|
||||||
<span class="input-group-text">{unit}</span>
|
<span class="input-group-text">{unit}</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
{props.children.clone()}
|
{props.children.clone()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Err(e) => Ok(html! {
|
Err(e) => Ok(html! {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue