parent
e4cc1e78ab
commit
e369178d98
@ -24,7 +24,7 @@ pub struct EventChangeset {
|
||||
pub voluntary_wachhabender: bool,
|
||||
#[garde(custom(can_unset_fuehrungsassistent))]
|
||||
pub voluntary_fuehrungsassistent: bool,
|
||||
#[garde(range(min = ctx.as_ref().map(|c: &EventContext| c.amount_of_assigned_posten).unwrap_or(1), max = 100))]
|
||||
#[garde(range(min = ctx.as_ref().map(|c: &EventContext| c.amount_of_assigned_posten).unwrap_or(0), max = 100))]
|
||||
pub amount_of_posten: i16,
|
||||
pub clothing: String,
|
||||
pub note: Option<String>,
|
||||
|
@ -163,7 +163,7 @@
|
||||
{% let posten_planned = event.is_some() && amount_of_planned_posten > 0 %}
|
||||
<div class="control">
|
||||
<input class="input" type="number" name="amount"
|
||||
min="{% if posten_planned %}{{ amount_of_planned_posten }}{% else %}1{% endif %}" max="100" required
|
||||
min="{% if posten_planned %}{{ amount_of_planned_posten }}{% else %}0{% endif %}" max="100" required
|
||||
{% if let Some(event)=event %} value="{{ event.amount_of_posten }}" {% endif %} {{
|
||||
disabled|cond_show("disabled") }} />
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user