mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-12 23:27:22 +00:00
Merge branch 'v1.9.11'
This commit is contained in:
commit
1cf825808b
@ -17,11 +17,11 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from flask import request
|
||||
from wtforms.ext.dateutil.fields import DateField
|
||||
from wtforms.fields.core import StringField, SelectField
|
||||
from wtforms.validators import Optional
|
||||
|
||||
from indico.web.forms.base import IndicoForm
|
||||
from indico.web.forms.fields import IndicoDateField
|
||||
|
||||
from indico_search import _
|
||||
|
||||
@ -37,8 +37,8 @@ FIELD_CHOICES = [('', _('Anywhere')),
|
||||
class SearchForm(IndicoForm):
|
||||
phrase = StringField(_('Phrase'))
|
||||
field = SelectField(_('Search in'), choices=FIELD_CHOICES, default='')
|
||||
start_date = DateField('Start Date', [Optional()], parse_kwargs={'dayfirst': True})
|
||||
end_date = DateField('End Date', [Optional()], parse_kwargs={'dayfirst': True})
|
||||
start_date = IndicoDateField('Start Date', [Optional()])
|
||||
end_date = IndicoDateField('End Date', [Optional()])
|
||||
|
||||
def is_submitted(self):
|
||||
return 'search-phrase' in request.args
|
||||
|
||||
@ -82,8 +82,6 @@
|
||||
var text = container.is(':hidden') ? $this.data('msgShow') : $this.data('msgHide');
|
||||
$('#toggle-advanced-options').text(text);
|
||||
});
|
||||
|
||||
$('#search-start_date, #search-end_date').datepicker();
|
||||
</script>
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user