Added replacement variables to Preordernotifcation
This commit is contained in:
@@ -229,6 +229,27 @@
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var menu_vars = [
|
||||
['vorname', "Vorname"],
|
||||
['nachname', "Nachname"],
|
||||
['firma', "Firma"],
|
||||
['firma_oder_name', "Firma oder Name"],
|
||||
['email', "Emailadresse"],
|
||||
['anschluss_oaid', "Anschluss OAID"],
|
||||
['anschluss_strasse', "Anschluss Straße"],
|
||||
['anschluss_hausnummer', "Anschluss Hausnummer"],
|
||||
['anschluss_plz', "Anschluss PLZ"],
|
||||
['anschluss_ort', "Anschluss Ort"],
|
||||
['anschluss_gemeinde', "Anschluss Gemeinde"],
|
||||
['preorder_code', "Bestellcode"],
|
||||
];
|
||||
|
||||
var menu_vars_items = "";
|
||||
menu_vars.forEach((item) => { menu_vars_items += " " + item[0]});
|
||||
menu_vars_items = menu_vars_items.trim();
|
||||
console.log(menu_vars_items);
|
||||
|
||||
$(function () {
|
||||
tinymce.init({
|
||||
//font_formats: "Arial=arial,sans-serif;",
|
||||
@@ -240,9 +261,55 @@
|
||||
paste_as_text: true,
|
||||
paste_data_images: false,
|
||||
promotion: false,
|
||||
toolbar: 'undo redo | styles | bold italic underline strikethrough | fontfamily fontsize fontcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | table | link unlink | code',
|
||||
toolbar1: 'undo redo | styles | bold italic underline strikethrough | fontfamily fontsize fontcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | table | link unlink | code',
|
||||
toolbar2: 'vorname nachname firma',
|
||||
content_css: "<?=self::getResourcePath()?>/assets/css/tinymce.css",
|
||||
font_family_formats: "Arial=arial,sans-serif; Courier New=courier new,courier,monospace; Georgia=georgia,palatino,serif; Helvetica=helvetica,sans-serif; Lucida Sans=lucida sans unicode,sans-serif; Tahoma=tahoma,arial,helvetica,sans-serif; Times New Roman=times new roman,times,serif"
|
||||
font_family_formats: "Arial=arial,sans-serif; Courier New=courier new,courier,monospace; Georgia=georgia,palatino,serif; Helvetica=helvetica,sans-serif; Lucida Sans=lucida sans unicode,sans-serif; Tahoma=tahoma,arial,helvetica,sans-serif; Times New Roman=times new roman,times,serif",
|
||||
menubar: 'file edit view insert format tools table variables',
|
||||
menu: {
|
||||
variables: { title: 'Textbausteine', items: menu_vars_items }
|
||||
},
|
||||
setup: function (editor) {
|
||||
menu_vars.forEach(function(item) {
|
||||
editor.ui.registry.addMenuItem(item[0], {
|
||||
text: item[1],
|
||||
onAction: function () {
|
||||
editor.insertContent('{{' + item[0].toUpperCase() + '}}');
|
||||
}
|
||||
});
|
||||
});
|
||||
/*
|
||||
editor.ui.registry.addMenuItem('vorname', {
|
||||
text: 'Vorname',
|
||||
onAction: function () {
|
||||
editor.insertContent('{{VORNAME}}');
|
||||
}
|
||||
});
|
||||
editor.ui.registry.addMenuItem('nachname', {
|
||||
text: 'Nachname',
|
||||
onAction: function () {
|
||||
editor.insertContent('{{NACHNAME}}');
|
||||
}
|
||||
});
|
||||
editor.ui.registry.addMenuItem('firma', {
|
||||
text: 'Firma',
|
||||
onAction: function () {
|
||||
editor.insertContent('{{FIRMA}}');
|
||||
}
|
||||
});
|
||||
editor.ui.registry.addMenuItem('firmaodername', {
|
||||
text: 'Firma oder Name',
|
||||
onAction: function () {
|
||||
editor.insertContent('{{FIRMA_ODER_NAME}}');
|
||||
}
|
||||
});
|
||||
editor.ui.registry.addMenuItem('email', {
|
||||
text: 'Emailadresse',
|
||||
onAction: function () {
|
||||
editor.insertContent('{{EMAIL}}');
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user