enabled sending messages with person ids as receivers, person data can be retrieved by uid, link in infocenter details to send message

This commit is contained in:
alex
2018-02-01 10:26:37 +01:00
parent 77da816b5e
commit b9e7dc38cc
7 changed files with 251 additions and 50 deletions
@@ -29,7 +29,8 @@ $this->load->view(
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Infocenter
Details: <?php echo $stammdaten->vorname.' '.$stammdaten->nachname ?></h3>
Details: <?php echo $stammdaten->vorname.' '.$stammdaten->nachname ?>
</h3>
</div>
</div>
<section>
@@ -132,11 +133,26 @@ $this->load->view(
<?php endforeach; ?>
</tbody>
</table>
<?php if (isset($stammdaten->zugangscode)): ?>
Zugang Bewerbung: <a
href="<?php echo base_url('addons/bewerbung/cis/registration.php?code='.html_escape($stammdaten->zugangscode)) ?>"
target='_blank'><?php echo html_escape($stammdaten->zugangscode) ?></a>
<?php endif; ?>
<div class="row">
<div class="col-lg-6">
<form id="sendmsgform" method="post" action="<?php echo $messagelink ?>"
target="_blank">
<input type="hidden" name="person_id"
value="<?php echo $stammdaten->person_id ?>">
<a id="sendmsglink" href="javascript:void(0);"><i
class="fa fa-envelope"></i>&nbsp;Nachricht senden</a>
</form>
</div>
<?php if (isset($stammdaten->zugangscode)): ?>
<div class="col-lg-6 text-right">
<a
href="<?php echo base_url('addons/bewerbung/cis/registration.php?code='.html_escape($stammdaten->zugangscode)) ?>"
target='_blank'><i
class="glyphicon glyphicon-new-window"></i>&nbspZugang
Bewerbung</a>
</div>
<?php endif; ?>
</div>
</div> <!-- ./column -->
</div> <!-- ./row -->
</div> <!-- ./panel-body -->
@@ -727,11 +743,19 @@ $this->load->view(
"dateFormat": "dd.mm.yy"
});
//javascript hack - not nice!
//javascript bootstrap hack - not nice!
$("select").addClass('form-control');
$("table").addClass('table-condensed');
$("#logtable, #notiztable").addClass('table-hover');
//add submit event to message send link
$("#sendmsglink").click(
function()
{
$("#sendmsgform").submit();
}
);
//add click events to "formal geprüft" checkboxes
<?php foreach($dokumente as $dokument): ?>
+13 -2
View File
@@ -126,8 +126,9 @@
<?php
foreach($receivers as $receiver)
{
$receiverid = isset($receiver->prestudent_id) ? $receiver->prestudent_id : $receiver->person_id;
?>
<option value="<?php echo $receiver->prestudent_id; ?>"><?php echo $receiver->Nachname . " " . $receiver->Vorname; ?></option>
<option value="<?php echo $receiverid; ?>"><?php echo $receiver->Vorname . " " . $receiver->Nachname; ?></option>
<?php
}
?>
@@ -156,7 +157,17 @@
for($i = 0; $i < count($receivers); $i++)
{
$receiver = $receivers[$i];
echo '<input type="hidden" name="prestudents[]" value="' . $receiver->prestudent_id . '">' . "\n";
if (isset($receiver->prestudent_id))
{
$receiverid = $receiver->prestudent_id;
$fieldname= 'prestudents[]';
}
else
{
$receiverid = $receiver->person_id;
$fieldname= 'persons[]';
}
echo '<input type="hidden" name="' . $fieldname . '" value="' . $receiverid . '">' . "\n";
}
?>