- Vorlage widget now add an empty element to the beginning of the drop

down box
- Bugfix message write controller:
	- JS function getVorlageText was missing
	- Wrong URL in form action
This commit is contained in:
bison-paolo
2017-03-13 16:39:38 +01:00
parent 39d63d287a
commit 14aab3dd56
3 changed files with 35 additions and 2 deletions
+19 -1
View File
@@ -3,7 +3,6 @@
<body>
<?php
$href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER["REQUEST_URI"]);
$href = substr($href, 0, strrpos($href, '?'));
?>
<form id="sendForm" method="post" action="<?php echo $href; ?>">
@@ -166,5 +165,24 @@
}
});
}
function getVorlageText(vorlage_kurzbz)
{
<?php
$url = str_replace("/system/Messages/write", "/system/Messages/getVorlage", $_SERVER["REQUEST_URI"]);
?>
$.ajax({
dataType: "json",
url: "<?php echo $url; ?>",
data: {"vorlage_kurzbz": vorlage_kurzbz},
success: function(data, textStatus, jqXHR) {
tinyMCE.get("bodyTextArea").setContent(data.retval[0].text);
},
error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus + " - " + errorThrown);
}
});
}
</script>
</html>