diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 86e950db92..60141a9f5c 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -466,11 +466,11 @@ } //add an empty row to the options array - if (count($ring_group_destinations) == 0) { + if (!is_array($ring_group_destinations) || count($ring_group_destinations) == 0) { $rows = $_SESSION['ring_group']['destination_add_rows']['numeric']; $id = 0; } - if (count($ring_group_destinations) > 0) { + if (is_array($ring_group_destinations) && count($ring_group_destinations) > 0) { $rows = $_SESSION['ring_group']['destination_edit_rows']['numeric']; $id = count($ring_group_destinations)+1; } @@ -566,20 +566,22 @@ } //show the content - echo "
\n"; + echo "\n"; + + echo "
\n"; + echo "
".$text['title-ring_group']."
\n"; + echo "
\n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'ring_groups.php']); + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'style'=>'margin-left: 15px;']); + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo $text['description']."\n"; + echo "

\n"; + + echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; echo ""; echo " "; echo "
".$text['label-ring-group']."\n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo $text['description']."

\n"; - echo "
\n"; @@ -834,9 +836,9 @@ echo "
".$text['label-user_list'].""; - echo " \n"; if (is_array($ring_group_users) && @sizeof($ring_group_users) != 0) { - foreach($ring_group_users as $field) { + echo "
\n"; + foreach ($ring_group_users as $field) { echo " \n"; echo " \n"; echo " \n"; echo " \n"; } + echo "
".escape($field['username'])."\n"; @@ -844,18 +846,21 @@ echo "
\n"; + echo "
\n"; } - echo "
\n"; - echo "
\n"; echo " "; - echo " \n"; + echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'collapse'=>'never']); echo "
\n"; echo " ".$text['description-user_list']."\n"; echo "
\n"; @@ -983,24 +988,20 @@ echo "\n"; echo "\n"; - echo " \n"; - echo " \n"; - if (is_uuid($dialplan_uuid)) { - echo " \n"; - } - if (is_uuid($ring_group_uuid)) { - echo " \n"; - } - echo " \n"; - echo "
"; - echo " \n"; - echo " \n"; - echo " "; echo ""; echo "

"; + + if (is_uuid($dialplan_uuid)) { + echo "\n"; + } + if (is_uuid($ring_group_uuid)) { + echo "\n"; + } + echo "\n"; + echo "
"; //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file