From: Mark Wells Date: Fri, 24 Jul 2015 04:34:35 +0000 (-0700) Subject: fix edit/process/svc_circuit.html redirect on error, #37420 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=7b2f4076e6e7b0331904699d9e3a53fc0194eec9 fix edit/process/svc_circuit.html redirect on error, #37420 --- diff --git a/httemplate/edit/svc_circuit.cgi b/httemplate/edit/svc_circuit.cgi deleted file mode 100644 index 3f9bad5b1..000000000 --- a/httemplate/edit/svc_circuit.cgi +++ /dev/null @@ -1,54 +0,0 @@ -<& elements/svc_Common.html, - 'table' => 'svc_circuit', - 'fields' => \@fields, -&> -<%init> - -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? - -my $conf = new FS::Conf; -my $date_format = $conf->config('date_format') || '%m/%d/%Y'; - -my @fields = ( - { field => 'providernum', - type => 'select-table', - table => 'circuit_provider', - name_col => 'provider', - disable_empty => 1, - }, - { field => 'typenum', - type => 'select-table', - table => 'circuit_type', - name_col => 'typename', - disable_empty => 1, - }, - { field => 'termnum', - type => 'select-table', - table => 'circuit_termination', - name_col => 'termination', - disable_empty => 1, - }, - { field => 'circuit_id', - size => 40, - }, - { field => 'desired_due_date', - type => 'input-date-field', - }, - { field => 'due_date', - type => 'input-date-field', - }, - 'vendor_order_id', - 'vendor_qual_id', - 'vendor_order_status', - 'endpoint_ip_addr', - { field => 'endpoint_mac_addr', - type => 'input-mac_addr', - }, -); - -# needed: a new_callback to migrate vendor quals over to circuits - -#my ($svc_new_callback, $svc_edit_callback, $svc_error_callback); - - diff --git a/httemplate/edit/svc_circuit.html b/httemplate/edit/svc_circuit.html new file mode 100644 index 000000000..3f9bad5b1 --- /dev/null +++ b/httemplate/edit/svc_circuit.html @@ -0,0 +1,54 @@ +<& elements/svc_Common.html, + 'table' => 'svc_circuit', + 'fields' => \@fields, +&> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? + +my $conf = new FS::Conf; +my $date_format = $conf->config('date_format') || '%m/%d/%Y'; + +my @fields = ( + { field => 'providernum', + type => 'select-table', + table => 'circuit_provider', + name_col => 'provider', + disable_empty => 1, + }, + { field => 'typenum', + type => 'select-table', + table => 'circuit_type', + name_col => 'typename', + disable_empty => 1, + }, + { field => 'termnum', + type => 'select-table', + table => 'circuit_termination', + name_col => 'termination', + disable_empty => 1, + }, + { field => 'circuit_id', + size => 40, + }, + { field => 'desired_due_date', + type => 'input-date-field', + }, + { field => 'due_date', + type => 'input-date-field', + }, + 'vendor_order_id', + 'vendor_qual_id', + 'vendor_order_status', + 'endpoint_ip_addr', + { field => 'endpoint_mac_addr', + type => 'input-mac_addr', + }, +); + +# needed: a new_callback to migrate vendor quals over to circuits + +#my ($svc_new_callback, $svc_edit_callback, $svc_error_callback); + + diff --git a/httemplate/view/svc_circuit.html b/httemplate/view/svc_circuit.html index 42bfc4b21..579ef5150 100644 --- a/httemplate/view/svc_circuit.html +++ b/httemplate/view/svc_circuit.html @@ -1,8 +1,9 @@ <& elements/svc_Common.html, - 'table' => 'svc_circuit', - 'labels' => \%labels, - 'fields' => \@fields, - 'html_foot' => sub { $self->call_method('.foot', @_) }, + 'table' => 'svc_circuit', + 'labels' => \%labels, + 'fields' => \@fields, + 'html_foot' => sub { $self->call_method('.foot', @_) }, + 'edit_url' => $fsurl.'edit/svc_circuit.html?', &> <%method .foot> % my $svc_circuit = shift;