From 40bc5066f8b688ee56486df26d7b7afdf8aac70b Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 13 Apr 2020 16:40:05 -0600 Subject: [PATCH] MOH - Add: Hide select when no Categories exist to select from. --- app/music_on_hold/music_on_hold.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index c31dbbebe2..c377e41046 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -352,10 +352,11 @@ echo "
".$text['title-music_on_hold']."
\n"; echo "
\n"; if (permission_exists('music_on_hold_add')) { + $modify_add_action = !is_array($streams) || @sizeof($streams) == 0 ? "name_mode('new'); $('#btn_select').hide();" : null; //hide categories select box when none exist echo "
\n"; echo "\n"; echo "\n"; - echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','onclick'=>"$(this).fadeOut(250, function(){ $('span#form_upload').fadeIn(250); });"]); + echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','onclick'=>"$(this).fadeOut(250, function(){ ".$modify_add_action." $('span#form_upload').fadeIn(250); });"]); echo "