[freeside-commits] freeside/httemplate/misc part_device-import.html, NONE, 1.1 delete-phone_device.html, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Mon Jun 29 18:42:58 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv27146/httemplate/misc
Added Files:
part_device-import.html delete-phone_device.html
Log Message:
phone devices (for netsapiens integration), RT#5226
--- NEW FILE: part_device-import.html ---
<% 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>
--- NEW FILE: delete-phone_device.html ---
% 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>
More information about the freeside-commits
mailing list