Commit | Line | Data |
---|---|---|
dd8de1ec PH |
1 | <?php |
2 | /******************************************************************************** | |
3 | * include/plugin_autoreply.inc.php : The class for auto-replies | |
4 | * -------------------------------- | |
5 | * | |
6 | * This file is part of the philter distribution | |
7 | * Copyright: See COPYING files that comes with this distribution | |
8 | ********************************************************************************/ | |
9 | ||
10 | class AutoReplyPlugin extends ActionPlugin { | |
11 | function FwdPlugin() { $this->ActionPlugin(); } | |
12 | function rtti() { return 2; } | |
13 | function name() { return "Auto-Reply"; } | |
14 | ||
15 | function to_js() { | |
16 | $res = "function(Node, data) {\n" | |
17 | . " var i,j;\n" | |
18 | . " var ta = document.createElement('textarea');\n" | |
19 | . " ta.setAttribute('name', Node.name+'[1]');\n" | |
20 | . " ta.setAttribute('cols', '74');\n" | |
693b6ec6 | 21 | . " ta.setAttribute('rows', '2');\n" |
dd8de1ec | 22 | . " ta.setAttribute('onfocus', 'ta_onfocus(this);');\n" |
693b6ec6 | 23 | . " ta.setAttribute('onblur', 'ta_onblur(this);');\n" |
dd8de1ec PH |
24 | . " if(data[1]) ta.value = data[1];\n" |
25 | . "\n" | |
26 | . " Node.appendChild(document.createElement('br'));\n" | |
27 | . " Node.appendChild(document.createTextNode(' Your mail : '));\n" | |
28 | . " Node.appendChild(document.createElement('br'));\n" | |
29 | . " Node.appendChild(ta);\n" | |
30 | . "}"; | |
31 | ||
32 | return $res; | |
33 | } | |
34 | } | |
35 | ||
36 | /******************************************************************************** | |
37 | * $Id$ | |
38 | * vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100: | |
39 | ********************************************************************************/ | |
40 | ?> |