mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Added the ability to choose a template (Vorlage) as email text
This commit is contained in:
@@ -1,28 +1,52 @@
|
||||
<?php $this->load->view('templates/header'); ?>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url('vendor/tinymce/tinymce/tinymce.min.js');?>"></script>
|
||||
<?php $this->load->view("templates/header", array("title" => "MessageReply", "jquery" => true, "tinymce" => true)); ?>
|
||||
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<?php
|
||||
$href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER["REQUEST_URI"]);
|
||||
?>
|
||||
<form id="sendForm" method="post" action="<?php echo $href; ?>">
|
||||
<div class="span4">
|
||||
To: <?php echo $receiver->vorname . " " . $receiver->nachname; ?><br/>
|
||||
Subject: <input type="text" value="" name="subject"><br/>
|
||||
<textarea id="bodyTextArea" name="body"></textarea>
|
||||
</div>
|
||||
<button type="submit">Send</button>
|
||||
</form>
|
||||
<?php
|
||||
$href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER["REQUEST_URI"]);
|
||||
?>
|
||||
<form id="sendForm" method="post" action="<?php echo $href; ?>">
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
To: <?php echo $receiver->vorname . " " . $receiver->nachname; ?><br/>
|
||||
Subject: <input type="text" value="" name="subject"><br/>
|
||||
<textarea id="bodyTextArea" name="body"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: '#bodyTextArea'
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<button type="submit">Send</button>
|
||||
|
||||
<?php echo $this->templatelib->widget("Vorlage_widget", array("title" => "Vorlage")); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: "#bodyTextArea"
|
||||
});
|
||||
|
||||
<?php
|
||||
$url = str_replace("/system/Messages/write", "/system/Messages/getVorlage", $_SERVER["REQUEST_URI"]);
|
||||
?>
|
||||
|
||||
function getVorlageText(vorlage_kurzbz)
|
||||
{
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
url: "<?php echo $url; ?>",
|
||||
data: {"vorlage_kurzbz": vorlage_kurzbz},
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
tinyMCE.activeEditor.setContent(data.retval[0].text);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus + " - " + errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user