Von: dev-bounces@otrs.org [mailto:dev-bounces@otrs.org]
Im Auftrag von Obee, Daniel
Gesendet: Montag, 14. Januar 2013 16:08
An: Development community of OTRS
Betreff: [dev] document.compose.Body.value won't be updated on text input (OTRS 2.4.9)
Hi all,
we’re currently running 2.4.9 with RichText enabled.
I’m trying to block email sending if a mail contains placeholders (XXX). Therefor I tried to modify the function submit_compose in the AgentTicketCompose.dtl.
function submit_compose() {
var reg = /(xxx|XXX)/ ;
[snip]
else if ( reg.test(document.compose.Body.value) == true ) {
alert('$JSText{"There are still placeholders to be filled out!"}');
document.compose.Body.focus();
return false;
}
[snip]
The RegEx works and if the text is found I get the alert. Unfortunately it seems the document.compose.Body.value is not updated when I alter the text in the RichText editor. Reading out the variable I continue to get
the original body instead of the current content of the editor field.
Any ideas?
Greets & thanks
Daniel