Files
FHC-Core/application/views/system/messageWriteReply.php
T
alex 249f273091 - beautified reply page
- added bootstrap "messageSent" page
- layout changes in messageWrite views
2018-06-12 17:24:24 +02:00

90 lines
2.0 KiB
PHP

<?php
$this->load->view(
'templates/FHC-Header',
array(
'title' => 'MessageReply',
'jquery' => true,
'bootstrap' => true,
'fontawesome' => true,
'tinymce' => true,
'sbadmintemplate' => true,
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageWrite.css'),
'customJSs' => array('public/js/bootstrapper.js')
)
);
?>
<body>
<?php
$href = site_url().'/ViewMessage/sendReply';
?>
<div id="wrapper">
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Send message</h3>
</div>
</div>
<form id="sendForm" method="post" action="<?php echo $href; ?>">
<?php $this->load->view('system/messageForm.php'); ?>
<?php
for ($i = 0; $i < count($receivers); $i++)
{
$receiver = $receivers[$i];
$receiverid = $receiver->person_id;
$fieldname = 'persons[]';
echo '<input type="hidden" name="'.$fieldname.'" value="'.$receiverid.'">'."\n";
}
?>
<?php
if (isset($message))
{
?>
<input type="hidden" name="relationmessage_id" value="<?php echo $message->message_id; ?>">
<?php
}
if (isset($token))
{
?>
<input type="hidden" name="token" value="<?php echo $token; ?>">
<?php
}
?>
</form>
</div>
</div>
</div>
<script>
tinymce.init({
selector: "#bodyTextArea",
plugins: "autoresize",
autoresize_min_height: 150,
autoresize_max_height: 600,
autoresize_bottom_margin: 10,
auto_focus: "bodyTextArea"
});
$(document).ready(function ()
{
if ($("#sendButton") && $("#sendForm"))
{
$("#sendButton").click(function ()
{
if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '')
{
$("#sendForm").submit();
}
else
{
alert("Subject and text are required fields!");
}
});
}
});
</script>
</body>
<?php $this->load->view("templates/FHC-Footer"); ?>