--- /dev/null
+<?php
+/********************************************************************************
+* include/plugin_forward.inc.php : The class for forwards
+* ------------------------------
+*
+* This file is part of the philter distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+class AddHdrPlugin extends ActionPlugin {
+ function AddHdrPlugin() { $this->ActionPlugin(); }
+ function rtti() { return 3; }
+ function name() { return _i18n('3_add_hdr'); }
+
+ function to_js() {
+ return <<<EOF
+function(Node, data) {
+ var i,j;
+ var sel = 0;
+
+ Node.appendChild(document.createElement('br'));
+ Node.appendChild(document.createTextNode('X-'));
+
+ var hdr_i = document.createElement('input');
+ hdr_i.setAttribute('type', 'text');
+ hdr_i.setAttribute('name', Node.name+'[1]');
+ hdr_i.setAttribute('value', (data[1] ? data[1] :'') );
+ Node.appendChild(hdr_i);
+
+ Node.appendChild(document.createTextNode(': '));
+
+ var val_i = document.createElement('input');
+ val_i.setAttribute('type', 'text');
+ val_i.setAttribute('name', Node.name+'[2]');
+ val_i.setAttribute('value', (data[2] ? data[2] :'') );
+ Node.appendChild(val_i);
+}
+EOF;
+ }
+
+ function to_string($_data) {
+ return " xfilter \"reformail -A 'X-"
+ .addslashes($_data[1]).": "
+ .addslashes($_data[2])."'\"\n";
+ }
+}
+
+/********************************************************************************
+* $Id$
+* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
+********************************************************************************/
+?>
--- /dev/null
+<?php
+/********************************************************************************
+* i18n file
+*
+* This file is part of the philter distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+$philter->config['i18n']['3_add_hdr'] = 'Add Header';
+
+/********************************************************************************
+* $Id$
+* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
+********************************************************************************/
+?>
--- /dev/null
+<?php
+/********************************************************************************
+* i18n file
+*
+* This file is part of the philter distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+$philter->config['i18n']['3_add_hdr'] = 'Ajouter entĂȘte';
+
+/********************************************************************************
+* $Id$
+* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
+********************************************************************************/
+?>