diff --git a/app/dialplans/dialplan_edit.php b/app/dialplans/dialplan_edit.php index d0751d2968..1839fc19c2 100644 --- a/app/dialplans/dialplan_edit.php +++ b/app/dialplans/dialplan_edit.php @@ -468,7 +468,7 @@ permission_exists('fifo_add') || permission_exists('time_condition_add') ) { - echo button::create(['type'=>'submit','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'action','value'=>'copy','style'=>$button_margin,'onclick'=>"if (!confirm('".$text['confirm-copy']."')) { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','style'=>$button_margin,'onclick'=>"modal_open('modal-copy','btn_copy');"]); unset($button_margin); } if ( @@ -479,7 +479,7 @@ permission_exists('fifo_delete') || permission_exists('time_condition_delete') ) { - echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'action','value'=>'delete','style'=>$button_margin,'onclick'=>"if (!confirm('".$text['confirm-delete']."')) { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','style'=>$button_margin,'onclick'=>"modal_open('modal-delete','btn_delete');"]); unset($button_margin); } } @@ -488,6 +488,28 @@ echo "
\n"; echo "\n"; + if ($action == 'update') { + if ( + permission_exists('dialplan_add') || + permission_exists('inbound_route_add') || + permission_exists('outbound_route_add') || + permission_exists('fifo_add') || + permission_exists('time_condition_add') + ) { + echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]); + } + if ( + permission_exists('dialplan_delete') || + permission_exists('dialplan_detail_delete') || + permission_exists('inbound_route_delete') || + permission_exists('outbound_route_delete') || + permission_exists('fifo_delete') || + permission_exists('time_condition_delete') + ) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]); + } + } + echo $text['description-dialplan-edit']."\n"; echo "