add and remove all
This commit is contained in:
parent
e4647c0702
commit
a39985fe62
@ -658,10 +658,10 @@ class course extends common
|
|||||||
|
|
||||||
// Construction du tableau
|
// Construction du tableau
|
||||||
self::$courseUsers[] = [
|
self::$courseUsers[] = [
|
||||||
|
template::checkbox($userId, true, '', ['class' => 'checkboxSelect']),
|
||||||
$userId,
|
$userId,
|
||||||
$this->getData(['user', $userId, 'firstname']),
|
$this->getData(['user', $userId, 'firstname']),
|
||||||
$this->getData(['user', $userId, 'lastname']),
|
$this->getData(['user', $userId, 'lastname']),
|
||||||
template::checkbox($userId, true, '', ['class' => 'checkboxSelect'])
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -802,10 +802,10 @@ class course extends common
|
|||||||
|
|
||||||
// Construction du tableau
|
// Construction du tableau
|
||||||
self::$courseUsers[] = [
|
self::$courseUsers[] = [
|
||||||
|
template::checkbox($userId, true, '', ['class' => 'checkboxSelect']),
|
||||||
$userId,
|
$userId,
|
||||||
$this->getData(['user', $userId, 'firstname']),
|
$this->getData(['user', $userId, 'firstname']),
|
||||||
$this->getData(['user', $userId, 'lastname']),
|
$this->getData(['user', $userId, 'lastname']),
|
||||||
template::checkbox($userId, true, '', ['class' => 'checkboxSelect'])
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,15 @@
|
|||||||
|
|
||||||
$(document).ready((function () {
|
$(document).ready((function () {
|
||||||
|
|
||||||
|
$('#courseUserAddSelectAll').on('click', function() {
|
||||||
|
$('.checkboxSelect').prop('checked', true);
|
||||||
|
saveCheckboxState();
|
||||||
|
});
|
||||||
|
$('#courseUserAddSelectNone').on('click', function() {
|
||||||
|
$('.checkboxSelect').prop('checked', false);
|
||||||
|
saveCheckboxState();
|
||||||
|
});
|
||||||
|
|
||||||
$("#courseFilterGroup, #courseFilterFirstName, #courseFilterLastName").change(function () {
|
$("#courseFilterGroup, #courseFilterFirstName, #courseFilterLastName").change(function () {
|
||||||
saveCheckboxState();
|
saveCheckboxState();
|
||||||
$("#courseUsersAddForm").submit();
|
$("#courseUsersAddForm").submit();
|
||||||
@ -24,7 +33,7 @@ $(document).ready((function () {
|
|||||||
},
|
},
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
target: 3,
|
target: 0,
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
}
|
}
|
||||||
@ -45,7 +54,6 @@ $(document).ready((function () {
|
|||||||
|
|
||||||
// Empty local storage after submit
|
// Empty local storage after submit
|
||||||
$("#courseUsersAddSubmit").on("click", function () {
|
$("#courseUsersAddSubmit").on("click", function () {
|
||||||
|
|
||||||
localStorage.setItem('checkboxState', JSON.stringify({}));
|
localStorage.setItem('checkboxState', JSON.stringify({}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -7,12 +7,22 @@
|
|||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col1 offset7">
|
||||||
<div class="col2 offset10">
|
<?php echo template::button('courseUserAddSelectAll', [
|
||||||
|
'value' => 'Tout'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1">
|
||||||
|
<?php echo template::button('courseUserAddSelectNone', [
|
||||||
|
'value' => 'Aucun'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col2">
|
||||||
<?php echo template::submit('courseUsersAddSubmit', [
|
<?php echo template::submit('courseUsersAddSubmit', [
|
||||||
'value' => 'Inscrire'
|
'value' => 'Inscrire'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row" id="Bfrtip">
|
<div class="row" id="Bfrtip">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
|
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
|
||||||
@ -34,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($module::$courseUsers): ?>
|
<?php if ($module::$courseUsers): ?>
|
||||||
<?php echo template::table([4, 4, 4, 1], $module::$courseUsers, ['Id', 'Prénom', 'Nom', ''], ['id' => 'dataTables']); ?>
|
<?php echo template::table([1, 4, 4, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom'], ['id' => 'dataTables']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun inscrit'); ?>
|
<?php echo template::speech('Aucun inscrit'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -13,6 +13,14 @@
|
|||||||
|
|
||||||
$(document).ready((function () {
|
$(document).ready((function () {
|
||||||
|
|
||||||
|
$('#courseUserDeleteSelectAll').on('click', function() {
|
||||||
|
$('.checkboxSelect').prop('checked', true);
|
||||||
|
saveCheckboxState();
|
||||||
|
});
|
||||||
|
$('#courseUserDeleteSelectNone').on('click', function() {
|
||||||
|
$('.checkboxSelect').prop('checked', false);
|
||||||
|
saveCheckboxState();
|
||||||
|
});
|
||||||
|
|
||||||
$("#courseFilterGroup, #courseFilterFirstName, #courseFilterLastName").change(function () {
|
$("#courseFilterGroup, #courseFilterFirstName, #courseFilterLastName").change(function () {
|
||||||
saveCheckboxState();
|
saveCheckboxState();
|
||||||
@ -25,7 +33,7 @@ $(document).ready((function () {
|
|||||||
},
|
},
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
target: 3,
|
target: 0,
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
}
|
}
|
||||||
@ -46,9 +54,7 @@ $(document).ready((function () {
|
|||||||
|
|
||||||
// Empty local storage after submit
|
// Empty local storage after submit
|
||||||
$("#courseUsersDeleteSubmit").on("click", function () {
|
$("#courseUsersDeleteSubmit").on("click", function () {
|
||||||
|
|
||||||
localStorage.setItem('checkboxState', JSON.stringify({}));
|
localStorage.setItem('checkboxState', JSON.stringify({}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Restore checkbox state on page load
|
// Restore checkbox state on page load
|
||||||
|
@ -1,19 +1,29 @@
|
|||||||
<?php echo template::formOpen('courseUsersDeleteForm'); ?>
|
<?php echo template::formOpen('courseUsersDeleteForm'); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col1">
|
<div class="col1">
|
||||||
<?php echo template::button('courseUserAddBack', [
|
<?php echo template::button('courseUserDeleteBack', [
|
||||||
'class' => 'buttonGrey',
|
'class' => 'buttonGrey',
|
||||||
'href' => helper::baseUrl() . 'course/users/' . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course/users/' . $this->getUrl(2),
|
||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col1 offset7">
|
||||||
<div class="col2 offset10">
|
<?php echo template::button('courseUserDeleteSelectAll', [
|
||||||
|
'value' => 'Tout'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col1">
|
||||||
|
<?php echo template::button('courseUserDeleteSelectNone', [
|
||||||
|
'value' => 'Aucun'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col2">
|
||||||
<?php echo template::submit('courseUsersDeleteSubmit', [
|
<?php echo template::submit('courseUsersDeleteSubmit', [
|
||||||
'class' => 'buttonRed',
|
'class' => 'buttonRed',
|
||||||
'value' => 'Désinscrire'
|
'value' => 'Désinscrire'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row" id="Bfrtip">
|
<div class="row" id="Bfrtip">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
|
<?php echo template::select('courseFilterGroup', $module::$courseGroups, [
|
||||||
@ -35,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($module::$courseUsers): ?>
|
<?php if ($module::$courseUsers): ?>
|
||||||
<?php echo template::table([4, 4, 4, 1], $module::$courseUsers, ['Id', 'Prénom', 'Nom', ''], ['id' => 'dataTables']); ?>
|
<?php echo template::table([1, 4, 4, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom'], ['id' => 'dataTables']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun inscrit'); ?>
|
<?php echo template::speech('Aucun inscrit'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
2
core/vendor/datatables/french.json
vendored
2
core/vendor/datatables/french.json
vendored
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"processing": "Traitement en cours...",
|
"processing": "Traitement en cours...",
|
||||||
"search": "Rechercher :",
|
"search": "Rechercher :",
|
||||||
"lengthMenu": "Afficher _MENU_ éléments",
|
"lengthMenu": "Éléments par page _MENU_",
|
||||||
"info": "Affichage de l'élement _START_ à _END_ sur _TOTAL_ éléments",
|
"info": "Affichage de l'élement _START_ à _END_ sur _TOTAL_ éléments",
|
||||||
"infoEmpty": "Affichage de l'élement 0 à 0 sur 0 éléments",
|
"infoEmpty": "Affichage de l'élement 0 à 0 sur 0 éléments",
|
||||||
"infoFiltered": "(filtré de _MAX_ éléments au total)",
|
"infoFiltered": "(filtré de _MAX_ éléments au total)",
|
||||||
|
Loading…
Reference in New Issue
Block a user