mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-21 18:36:31 +00:00
Devices, Profiles & Vendors: Modal integration.
This commit is contained in:
@@ -786,7 +786,7 @@
|
||||
echo " </select>";
|
||||
}
|
||||
if (permission_exists('device_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"var new_mac = prompt('".$text['message_device']."'); if (new_mac != null) { window.location='device_copy.php?id=".escape($device_uuid)."&mac=' + new_mac; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','new_mac_address');"]);
|
||||
}
|
||||
if (
|
||||
permission_exists('device_delete') ||
|
||||
@@ -794,7 +794,7 @@
|
||||
permission_exists('device_key_delete') ||
|
||||
permission_exists('device_setting_delete')
|
||||
) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'action','value'=>'delete','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','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
|
||||
@@ -802,6 +802,32 @@
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('device_add')) {
|
||||
echo modal::create([
|
||||
'id'=>'modal-copy',
|
||||
'type'=>'general',
|
||||
'message'=>$text['message_device']."...<br /><br /><input class='formfld' style='font-family: monospace;' type='text' id='new_mac_address' maxlength='17' placeholder='FF-FF-FF-FF-FF-FF'>",
|
||||
'actions'=>button::create([
|
||||
'type'=>'button',
|
||||
'label'=>$text['button-continue'],
|
||||
'icon'=>'check',
|
||||
'id'=>'btn_copy',
|
||||
'style'=>'float: right; margin-left: 15px;',
|
||||
'collapse'=>'never',
|
||||
'onclick'=>"modal_close(); if (document.getElementById('new_mac_address').value != '') { window.location='device_copy.php?id=".urlencode($device_uuid)."&mac=' + document.getElementById('new_mac_address').value; }"
|
||||
]),
|
||||
'onclose'=>"document.getElementById('new_mac_address').value = '';",
|
||||
]);
|
||||
}
|
||||
if (
|
||||
permission_exists('device_delete') ||
|
||||
permission_exists('device_line_delete') ||
|
||||
permission_exists('device_key_delete') ||
|
||||
permission_exists('device_setting_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-device']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user