Resources/Private/Partials/Backend/Filter.html
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:form action="{list}" object="{filter}" objectName="filter" class="mb-3">
<div class="row">
<div class="col-12 col-md-6 mb-3">
<label for="user" class="control-label">
<f:translate key="module.filter.user.label"/>
</label>
<f:form.select id="user"
class="form-select"
property="feUserId"
name="tx_securedownloads_web_securedownloadstrafficlog[filter][feUserId]"
value="{f:if(condition: '{filter.userType} < 0', then: '{filter.userType}', else: '{filter.feUserId}')}">
<f:form.select.optgroup label="{f:translate(key:'module.filter.user.label.general')}">
<f:form.select.option value="0">{f:translate(key:'module.filter.user.label.all')}</f:form.select.option>
<f:form.select.option value="-1">{f:translate(key:'module.filter.user.label.logged_in')}</f:form.select.option>
<f:form.select.option value="-2">{f:translate(key:'module.filter.user.label.not_logged_in')}</f:form.select.option>
</f:form.select.optgroup>
<f:form.select.optgroup label="{f:translate(key:'module.filter.user.label.by_user')}">
<f:for each="{users}" as="user">
<f:form.select.option value="{user.uid}">{user.uid}: {user.username}</f:form.select.option>
</f:for>
</f:form.select.optgroup>
</f:form.select>
</div>
<div class="col-12 col-md-6 mb-3">
<label for="fileType" class="control-label">
<f:translate key="module.filter.file_type.label"/>
</label>
<f:form.select id="filetype"
class="form-select"
property="fileType"
options="{fileTypes}"
optionValueField="media_type"
optionLabelField="media_type"
prependOptionValue="0"
prependOptionLabel="{f:translate(key:'module.filter.file_type.label.all')}"/>
</div>
</div>
<div class="row">
<div class="col-12 col-md-6 mb-3">
<div class="form-group">
<label for="from" class="control-label">
{f:translate(key: 'module.filter.period.label')} {f:translate(key: 'module.filter.placeholder.period.from') -> f:format.case(mode: 'lower')}
</label>
<div class="input-group">
<f:form.textfield id="from"
name="from"
placeholder="{f:translate(key:'module.filter.placeholder.period.from')}: H:i d-m-Y"
additionalAttributes="{'autocomplete': 'off'}"
class="form-control form-control-clearable t3js-datetimepicker t3js-clearable"
value="{f:if(condition: filter.from, then: '{filter.from -> f:format.date(format: \'H:i d-m-Y\')}')}"
data="{date-type: 'datetime'}"
/>
<f:form.hidden property="from"
value="{f:if(condition: filter.from, then: '{filter.from -> f:format.date(format: \'H:i d-m-Y\')}')}"
/>
<label class="btn btn-default" for="from">
<core:icon identifier="actions-calendar" />
</label>
</div>
</div>
</div>
<div class="col-12 col-md-6 mb-3">
<div class="form-group">
<label for="till" class="control-label">
{f:translate(key: 'module.filter.period.label')} {f:translate(key: 'module.filter.placeholder.period.to') -> f:format.case(mode: 'lower')}
</label>
<div class="input-group">
<f:form.textfield id="till"
name="till"
placeholder="{f:translate(key:'module.filter.placeholder.period.to')}: H:i d-m-Y"
additionalAttributes="{'autocomplete': 'off'}"
class="form-control form-control-clearable t3js-datetimepicker t3js-clearable"
value="{filter.till -> f:format.date(format: 'H:i d-m-Y')}"
data="{date-type: 'datetime'}"
/>
<f:form.hidden property="till"
value="{filter.till -> f:format.date(format: 'H:i d-m-Y')}"
/>
<label class="btn btn-default" for="till">
<core:icon identifier="actions-calendar" />
</label>
</div>
</div>
</div>
</div>
<div class="row justify-content-end mt-1">
<div class="col-auto col-md-3 mb-3">
<f:link.action action="{list}" arguments="{reset: 1}" class="btn btn-default btn-block">
<f:translate key="module.filter.button.reset"/>
</f:link.action>
</div>
<div class="col-auto col-md-3 mb-3">
<button type="submit" class="btn btn-primary btn-block">
<f:translate key="module.filter.button.submit" />
</button>
</div>
</div>
</f:form>