- Changes in view vw_msg_vars: added orgform, typ and switched anrede

- Before sending a message it checks if the subject and the body are
present
This commit is contained in:
bison-paolo
2017-03-13 17:42:24 +01:00
parent 14aab3dd56
commit 129eeb69a8
2 changed files with 50 additions and 29 deletions
+16 -2
View File
@@ -22,7 +22,7 @@
}
?>
<br>
Subject: <input type="text" value="" name="subject" size="70"><br/>
Subject: <input id="subject" type="text" value="" name="subject" size="70"><br/>
<textarea id="bodyTextArea" name="body"></textarea>
<?php
if (isset($variables))
@@ -48,7 +48,7 @@
<div class="row">
<div class="span4">
<button type="submit">Send</button>
<button id="sendButton" type="button">Send</button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php echo $this->templatelib->widget("Vorlage_widget", array("title" => "Vorlage")); ?>
</div>
@@ -129,6 +129,20 @@
{
$("#refresh").click(tinymcePreviewSetContent);
}
if ($("#sendButton") && $("#sendForm"))
{
$("#sendButton").click(function() {
if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '')
{
$("#sendForm").submit();
}
else
{
alert("Subject and text are required fields!");
}
});
}
});
function tinymcePreviewSetContent()