Skip to content
Snippets Groups Projects
Verified Commit bf3d4991 authored by psy's avatar psy
Browse files

add min and max attributes to validuntil field

parent c5b46c6c
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,11 @@
</div>
<div class="form-group">
<label for="valid-until">{{_('Valid Until')}}</label>
<input class="form-control" type="datetime-local" id="valid-until" name="valid-until" value="{{ (datetime.now() + timedelta(hours=36)).replace(hour=23, minute=59, second=59, microsecond=0).isoformat(timespec='minutes') }}">
<input class="form-control" type="datetime-local" id="valid-until" name="valid-until"
value="{{ (datetime.now() + timedelta(hours=36)).replace(hour=23, minute=59, second=59, microsecond=0).isoformat(timespec='minutes') }}"
min="{{ (datetime.now() + timedelta(minutes=10)).isoformat(timespec='minutes') }}"
max="{{ (datetime.now() + timedelta(days=config['INVITE_MAX_VALID_DAYS'])).isoformat(timespec='minutes') }}"
>
<small class="text-muted">{{_('Must be within the next %(max_valid_days)d days', max_valid_days=config['INVITE_MAX_VALID_DAYS'])}}</small>
</div>
{% if allow_signup %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment