Skip to content
Snippets Groups Projects
Commit eb6dc492 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Refactoring some filter stuff

parent 7cefbc14
No related branches found
No related tags found
1 merge request!3New version 4 1
......@@ -92,9 +92,15 @@ class QueueController extends ActionController {
}
array_unshift($templates, '');
$this->view->assign('templatesFilter', $templates);
$languages = BackendService::getLanguages();
array_unshift($languages, '');
$this->view->assign('languages', $languages);
$templateLanguages = [];
foreach($languages as $key => $value) {
$templateLanguages[$value] = $value;
}
$this->view->assign('languages', $templateLanguages);
$this->view->assign('mode', 'queue');
if (!$filters['sent']) {
$filters['sent'] = 0;
......@@ -103,12 +109,12 @@ class QueueController extends ActionController {
$this->view->assign('queue', $queue);
$this->view->assign(
'filterFields', [
LocalizationUtility::translate('backend.filter.from', 'SgMail'),
LocalizationUtility::translate('backend.filter.to', 'SgMail'),
LocalizationUtility::translate('backend.filter.subject', 'SgMail'),
LocalizationUtility::translate('backend.filter.mailtext', 'SgMail'),
LocalizationUtility::translate('backend.filter.cc', 'SgMail'),
LocalizationUtility::translate('backend.filter.bcc', 'SgMail')
BackendService::SENDER_FILTER_OPTION => LocalizationUtility::translate('backend.filter.from', 'SgMail'),
BackendService::RECIPIENT_FILTER_OPTION => LocalizationUtility::translate('backend.filter.to', 'SgMail'),
BackendService::SUBJECT_FILTER_OPTION => LocalizationUtility::translate('backend.filter.subject', 'SgMail'),
BackendService::MAILTEXT_FILTER_OPTION => LocalizationUtility::translate('backend.filter.mailtext', 'SgMail'),
BackendService::CC_FILTER_OPTION => LocalizationUtility::translate('backend.filter.cc', 'SgMail'),
BackendService::BCC_FILTER_OPTION => LocalizationUtility::translate('backend.filter.bcc', 'SgMail')
]
);
} else {
......
......@@ -7,7 +7,7 @@
<f:translate key="backend.filters.fields" />
<small><f:translate key="backend.filter.fields.description" /></small>
</label>
<f:form.select class="form-control" multiple="1" size="4" property="filterfields" options="{filterFields}" id="filter-fields" />
<f:form.select class="form-control" multiple="1" size="4" property="filterFields" optionValueField="value" options="{filterFields}" id="filter-fields" />
</div>
</div>
<div class="col-xs-4">
......@@ -35,17 +35,17 @@
</div>
<div class="form-group">
<label for="filter-search"><f:translate key="backend.filter.search" /></label>
<f:form.textfield class="form-control" property="search" id="filter-search" />
<f:form.textfield class="form-control" property="filterSearch" id="filter-search" />
</div>
<div class="form-group">
<label for="filter-template"><f:translate key="backend.filter.template" /></label>
<f:form.select class="form-control" multiple="0" size="1" property="filtertemplate" optionValueField="key" options="{templatesFilter}" id="filter-template" />
<f:form.select class="form-control" multiple="0" size="1" property="filterTemplate" optionValueField="key" options="{templatesFilter}" id="filter-template" />
</div>
</div>
<div class="col-xs-3">
<div class="form-group">
<label for="filter-languages"><f:translate key="backend.filter.language" /></label>
<f:form.select class="form-control" multiple="0" size="1" options="{languages}" id="filter-languages" />
<f:form.select class="form-control" multiple="0" size="1" property="filterLanguage" optionValueField="key" options="{languages}" id="filter-languages" />
</div>
<div class="form-group">
<br />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment