modify using open mode newTab or window with multiple Recipients via post request

This commit is contained in:
Harald Bamberger
2025-12-02 07:54:13 +01:00
parent be2b578f82
commit afb3ce4cae
6 changed files with 93 additions and 37 deletions
+8 -1
View File
@@ -20,11 +20,18 @@ class NeueNachricht extends Auth_Controller
*/
public function _remap()
{
$typeid = $this->input->post('typeid');
$ids = ($this->input->post('ids') && strpos($this->input->post('ids'), ','))
? explode(',', $this->input->post('ids'))
: $this->input->post('ids');
//now working
$this->load->view('Nachrichten', [
'permissions' => [
'assistenz_schreibrechte' => $this->permissionlib->isBerechtigt('assistenz','suid'),
]
],
'ids' => $ids,
'typeid' => $typeid
]);
}
}
@@ -122,6 +122,9 @@ class Messages extends FHCAPI_Controller
public function getMsgVarsPrestudent($typeId)
{
$ids = $this->input->post('ids');
if(!is_array($ids)) {
$ids = array($ids);
}
$messageVarsPrestudent = [];
if($typeId == 'uid')
@@ -169,6 +172,9 @@ class Messages extends FHCAPI_Controller
public function getNameOfDefaultRecipients($type_id)
{
$ids = $this->input->post('ids');
if(!is_array($ids)) {
$ids = array($ids);
}
$recipients = [];
if (empty($ids)) {
@@ -301,6 +307,10 @@ class Messages extends FHCAPI_Controller
if (isset($_POST['ids']))
{
$ids = json_decode($_POST['ids']);
if(!is_array($ids))
{
$ids = array($ids);
}
unset($_POST['ids']);
}
else
+4
View File
@@ -40,6 +40,10 @@ $configArray = [
cis-root="<?= CIS_ROOT; ?>"
:permissions="<?= htmlspecialchars(json_encode($permissions)); ?>"
:config="<?= htmlspecialchars(json_encode($configArray)); ?>"
<?php if($ids !== null && $typeid !== null) { ?>
:id ="<?= htmlspecialchars(json_encode($ids)); ?>"
type-id ="<?= htmlspecialchars($typeid); ?>"
<?php } ?>
>
</router-view>
</div>