From cf20dfc36b9a8c9422ed57ddcdce9a24187ba862 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 20 Apr 2022 09:54:48 -0700 Subject: [PATCH] Fixes #4759 - javascript missing in admin notify. --- e107_admin/notify.php | 54 ++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/e107_admin/notify.php b/e107_admin/notify.php index 1dbea55b4..35a11ab08 100644 --- a/e107_admin/notify.php +++ b/e107_admin/notify.php @@ -18,6 +18,26 @@ if (!getperms('O')) e107::coreLan('notify', true); +$js = " + + + function mail_field(val,id) + { + if(val == 'email') + { + document.getElementById(id).style.display =''; + } + else + { + document.getElementById(id).style.display ='none'; + } + } + +"; + + +e107::js('inline', $js); + class plugin_notify_admin extends e_admin_dispatcher { @@ -151,6 +171,8 @@ class plugin_notify_admin_ui extends e_admin_ui else { $legacy = 1; // Legacy Mode. + // $config_category = 'Other'; + // $config_events = array(); } // foreach ($config_events as $event_id => $event_text) @@ -271,7 +293,7 @@ class plugin_notify_admin_ui extends e_admin_ui "; - ; + if(!empty($this->pluginConfig[$plugin_id]['events'])) { @@ -326,7 +348,7 @@ class plugin_notify_admin_ui extends e_admin_ui $text = " - ".$description.":"; + ".$description.":"; @@ -350,7 +372,7 @@ class plugin_notify_admin_ui extends e_admin_ui $value= ""; } - $text .= "\n"; + $text .= "\n"; $text .= $frm->hidden("event[".$id."][include]", $include); $text .= $frm->hidden("event[".$id."][legacy]", $legacy); // function or method @@ -464,29 +486,3 @@ e107::getAdminUI()->runPage(); require_once(e_ADMIN."footer.php"); -// todo use e107::js('inline') -if(!function_exists('headerjs')) -{ - function headerjs() - { - - $js = " - "; - - return $js; - } -}