diff options
author | ivan <ivan> | 2009-06-30 01:42:56 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-06-30 01:42:56 +0000 |
commit | 665067cef48a5516e0bfb2dd79d99b8495e25ee5 (patch) | |
tree | 40b11281ad950b57c1dc940e35a691ae62811a17 /httemplate/misc | |
parent | f544c8f095cfb2e844810d31b6230b96033cb1e8 (diff) |
phone devices (for netsapiens integration), RT#5226
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-x | httemplate/misc/delete-phone_device.html | 23 | ||||
-rw-r--r-- | httemplate/misc/part_device-import.html | 53 | ||||
-rw-r--r-- | httemplate/misc/process/part_device-import.html | 9 |
3 files changed, 85 insertions, 0 deletions
diff --git a/httemplate/misc/delete-phone_device.html b/httemplate/misc/delete-phone_device.html new file mode 100755 index 000000000..7220c41e3 --- /dev/null +++ b/httemplate/misc/delete-phone_device.html @@ -0,0 +1,23 @@ +% if ( $error ) { +% errorpage($error); +% } else { +<% $cgi->redirect($p. "view/svc_phone.cgi?". $svcnum) %> +% } +<%init> + +# :/ needs agent-virt so you can't futz with arbitrary devices + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? + +#untaint devicenum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/ || die "Illegal devicenum"; +my $devicenum = $1; + +my $phone_device = qsearchs('phone_device', { 'devicenum' => $devicenum } ); +my $svcnum = $phone_device->svcnum; + +my $error = $phone_device->delete; + +</%init> diff --git a/httemplate/misc/part_device-import.html b/httemplate/misc/part_device-import.html new file mode 100644 index 000000000..7bd640459 --- /dev/null +++ b/httemplate/misc/part_device-import.html @@ -0,0 +1,53 @@ +<% include("/elements/header.html", 'Import device types') %> + +Import a file containing phone device types, one per line. +<BR><BR> + +<% include( '/elements/form-file_upload.html', + 'name' => 'PartDeviceImportForm', + 'action' => 'process/part_device-import.html', + 'num_files' => 1, + 'fields' => [ 'format', ], + 'message' => 'Device type import successful', + 'url' => $p.'browse/part_device.html', + ) +%> + +<% &ntable("#cccccc", 2) %> + + <INPUT TYPE="hidden" NAME="format" VALUE="default"> + + <% include( '/elements/file-upload.html', + 'field' => 'file', + 'label' => 'Filename', + ) + %> + + <TR> + <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px"> + <INPUT TYPE = "submit" + ID = "submit" + VALUE = "Import file" + onClick = "document.PartDeviceImportForm.submit.disabled=true;" + > + </TD> + </TR> + +</TABLE> + +</FORM> + +<BR> + +Upload file can be a text file or Excel spreadsheet. If an Excel spreadsheet, + should have an .XLS extension. +<BR><BR> + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); + +</%init> diff --git a/httemplate/misc/process/part_device-import.html b/httemplate/misc/process/part_device-import.html new file mode 100644 index 000000000..eac111a40 --- /dev/null +++ b/httemplate/misc/process/part_device-import.html @@ -0,0 +1,9 @@ +<% $server->process %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); + +my $server = new FS::UI::Web::JSRPC 'FS::part_device::process_batch_import', $cgi; + +</%init> |