Explorar el Código

Minor - WIP - add mail.ajax for the use of mail templates BT#14894

Julio Montoya hace 6 años
padre
commit
5769c197e3
Se han modificado 1 ficheros con 19 adiciones y 0 borrados
  1. 19 0
      main/inc/ajax/mail.ajax.php

+ 19 - 0
main/inc/ajax/mail.ajax.php

@@ -0,0 +1,19 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+require_once __DIR__.'/../global.inc.php';
+
+api_protect_admin_script();
+
+$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
+
+switch ($action) {
+    case 'select_option':
+        $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
+        $mail = new MailTemplateManager();
+        $item = $mail->get($id);
+        echo $item['template'];
+        break;
+}
+
+