course membre filtre form template

This commit is contained in:
Fred Tempez 2023-10-09 19:40:59 +02:00
parent d94bd3d57b
commit ae372e1d9c
3 changed files with 12 additions and 12 deletions

View File

@ -55,7 +55,7 @@ class course extends common
public static $alphabet = [];
public static $courseGroups = [
'all' => 'Tous'
'all' => 'Tout'
];
public static $courses = [];
@ -402,7 +402,7 @@ class course extends common
self::$alphabet = range('A', 'Z');
$alphabet = range('A', 'Z');
self::$alphabet = array_combine($alphabet, self::$alphabet);
self::$alphabet = array_merge(['all'=>'Toute'], self::$alphabet );
self::$alphabet = array_merge(['all'=>'Tout'], self::$alphabet );
// Liste des inscrits dans le cours sélectionné.
$courseId = $this->getUrl(2);
$users = $this->getData(['enrolment', $courseId]);

View File

@ -19,31 +19,31 @@
</div>
<?php echo template::formOpen('courseFilterUserForm'); ?>
<div class="row">
<div class="col10 offset1">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Filtres'); ?>
</h4>
<div class="row">
<div class="col2">
<div class="col3">
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
'label' => 'Groupes / Profils',
'selected' => isset($_POST['courseFilterGroup']) ? $_POST['courseFilterGroup'] : 'all',
]); ?>
</div>
<div class="col2">
<div class="col3">
<?php echo template::select('courseFilterFirstName', $module::$alphabet, [
'label' => 'Prénom commence par',
'selected' => isset($_POST['courseFilterFirstName']) ? $_POST['courseFilterFirstName'] : 'all',
]); ?>
</div>
<div class="col2">
<div class="col3">
<?php echo template::select('courseFilterLastName', $module::$alphabet, [
'label' => 'Nom commence par',
'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all',
]); ?>
</div>
<div class="col2 offset4">
<div class="col2 offset1">
<?php echo template::submit('courseFilterSubmit', [
'value' => 'Filtrer',
'uniqueSubmission' => true

View File

@ -40,31 +40,31 @@
</div>
<?php echo template::formOpen('userFilterUserForm'); ?>
<div class="row">
<div class="col10 offset1">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Filtres'); ?>
</h4>
<div class="row">
<div class="col2">
<div class="col3">
<?php echo template::select('userFilterGroup', $module::$courseGroups, [
'label' => 'Groupes / Profils',
'selected' => isset($_POST['userFilterGroup']) ? $_POST['userFilterGroup'] : 'all',
]); ?>
</div>
<div class="col2">
<div class="col3">
<?php echo template::select('userFilterFirstName', $module::$alphabet, [
'label' => 'Prénom commence par',
'selected' => isset($_POST['userFilterFirstName']) ? $_POST['userFilterFirstName'] : 'all',
]); ?>
</div>
<div class="col2">
<div class="col3">
<?php echo template::select('userFilterLastName', $module::$alphabet, [
'label' => 'Nom commence par',
'selected' => isset($_POST['userFilterLastName']) ? $_POST['userFilterLastName'] : 'all',
]); ?>
</div>
<div class="col2 offset4">
<div class="col2 offset1">
<?php echo template::submit('userFilterSubmit', [
'value' => 'Filtrer',
'uniqueSubmission' => true