more self-service skinning config options, and start taking a stab at reorganizing...
authorivan <ivan>
Thu, 21 Jan 2010 08:38:54 +0000 (08:38 +0000)
committerivan <ivan>
Thu, 21 Jan 2010 08:38:54 +0000 (08:38 +0000)
38 files changed:
FS/FS/ClientAPI/MyAccount.pm
FS/FS/Conf.pm
fs_selfservice/FS-SelfService/cgi/ach_payment_results.html
fs_selfservice/FS-SelfService/cgi/change_bill.html
fs_selfservice/FS-SelfService/cgi/change_password.html
fs_selfservice/FS-SelfService/cgi/change_pay.html
fs_selfservice/FS-SelfService/cgi/change_ship.html
fs_selfservice/FS-SelfService/cgi/customer_change_pkg.html
fs_selfservice/FS-SelfService/cgi/customer_order_pkg.html
fs_selfservice/FS-SelfService/cgi/delete_svc.html
fs_selfservice/FS-SelfService/cgi/header.html
fs_selfservice/FS-SelfService/cgi/image.cgi [new file with mode: 0755]
fs_selfservice/FS-SelfService/cgi/make_ach_payment.html
fs_selfservice/FS-SelfService/cgi/make_payment.html
fs_selfservice/FS-SelfService/cgi/make_thirdparty_payment.html
fs_selfservice/FS-SelfService/cgi/myaccount.html
fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
fs_selfservice/FS-SelfService/cgi/order_pkg.html
fs_selfservice/FS-SelfService/cgi/payment_results.html
fs_selfservice/FS-SelfService/cgi/process_change_bill.html
fs_selfservice/FS-SelfService/cgi/process_change_password.html
fs_selfservice/FS-SelfService/cgi/process_change_pay.html
fs_selfservice/FS-SelfService/cgi/process_change_pkg.html
fs_selfservice/FS-SelfService/cgi/process_change_ship.html
fs_selfservice/FS-SelfService/cgi/process_order_pkg.html
fs_selfservice/FS-SelfService/cgi/process_order_recharge.html
fs_selfservice/FS-SelfService/cgi/process_svc_acct.html
fs_selfservice/FS-SelfService/cgi/process_svc_external.html
fs_selfservice/FS-SelfService/cgi/provision.html
fs_selfservice/FS-SelfService/cgi/provision_svc_acct.html
fs_selfservice/FS-SelfService/cgi/recharge_prepay.html
fs_selfservice/FS-SelfService/cgi/recharge_results.html
fs_selfservice/FS-SelfService/cgi/selfservice.cgi
fs_selfservice/FS-SelfService/cgi/view_cdr_details.html
fs_selfservice/FS-SelfService/cgi/view_invoice.html
fs_selfservice/FS-SelfService/cgi/view_usage.html
fs_selfservice/FS-SelfService/cgi/view_usage_details.html
httemplate/config/config-view.cgi

index dbc3552..a05c6f2 100644 (file)
@@ -100,7 +100,20 @@ sub skin_info {
       ( map { $_ => scalar( $conf->config($_, $agentnum) ) }
         qw( company_name ) ),
       ( map { $_ => scalar( $conf->config("selfservice-$_", $agentnum ) ) }
-        qw( body_bgcolor box_bgcolor) ),
+        qw( body_bgcolor box_bgcolor
+            text_color link_color vlink_color hlink_color alink_color
+            font title_color title_align title_size menu_bgcolor menu_fontsize
+          )
+      ),
+      ( map { $_ => $conf->exists("selfservice-$_", $agentnum ) }
+        qw( menu_skipblanks menu_skipheadings menu_nounderline )
+      ),
+      ( map { $_ => scalar($conf->config_binary("selfservice-$_", $agentnum)) }
+        qw( title_left_image title_right_image
+            menu_top_image menu_body_image menu_bottom_image
+          )
+      ),
+      'logo' => scalar($conf->config_binary('logo.png', $agentnum )),
       ( map { $_ => join("\n", $conf->config("selfservice-$_", $agentnum ) ) }
         qw( head body_header body_footer company_address ) ),
     };
@@ -571,6 +584,11 @@ sub process_payment {
   my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
     or return { 'error' => "unknown custnum $custnum" };
 
+  $p->{'amount'} =~ /^\s*(\d+(\.\d{2})?)\s*$/
+    or return { 'error' => gettext('illegal_amount') };
+  my $amount = $1;
+  return { error => 'Amount must be greater than 0' } unless $amount > 0;
+
   $p->{'payname'} =~ /^([\w \,\.\-\']+)$/
     or return { 'error' => gettext('illegal_name'). " payname: ". $p->{'payname'} };
   my $payname = $1;
@@ -641,7 +659,7 @@ sub process_payment {
     'CHEK' => [ qw( ss paytype paystate stateid stateid_state payip ) ],
   );
 
-  my $error = $cust_main->realtime_bop( $FS::payby::payby2bop{$payby}, $p->{'amount'},
+  my $error = $cust_main->realtime_bop( $FS::payby::payby2bop{$payby}, $amount,
     'quiet'    => 1,
     'payinfo'  => $payinfo,
     'paydate'  => $p->{'year'}. '-'. $p->{'month'}. '-01',
index f2960cd..a3e71d4 100644 (file)
@@ -564,6 +564,14 @@ worry that config_items is freeside-specific and icky.
                    logo.eps
                  );
 
+#Billing (81 items)
+#Invoicing (50 items)
+#UI (69 items)
+#Self-service (29 items)
+#...
+#Unclassified (77 items)
+
+
 @config_items = map { new FS::ConfItem $_ } (
 
   {
@@ -814,35 +822,35 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'emailinvoiceonly',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Disables postal mail invoices',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'disablepostalinvoicedefault',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Disables postal mail invoices as the default option in the UI.  Be careful not to setup customers which are not sent invoices.  See <a href ="#emailinvoiceauto">emailinvoiceauto</a>.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'emailinvoiceauto',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Automatically adds new accounts to the email invoice list',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'emailinvoiceautoalways',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'emailinvoice-apostrophe',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Allows the apostrophe (single quote) character in the email addresses in the email invoice list.',
     'type'        => 'checkbox',
   },
@@ -892,7 +900,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_subject',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Subject: header on email invoices.  Defaults to "Invoice".  The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
     'type'        => 'text',
     'per_agent'   => 1,
@@ -900,21 +908,21 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_usesummary',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Indicates that html and latex invoices should be in summary style and make use of invoice_latexsummary.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'invoice_template',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Text template file for invoices.  Used if no invoice_html template is defined, and also seen by users using non-HTML capable mail clients.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Plaintext_invoice_templates">billing documentation</a> for details.',
     'type'        => 'textarea',
   },
 
   {
     'key'         => 'invoice_html',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Optional HTML template for invoices.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#HTML_invoice_templates">billing documentation</a> for details.',
 
     'type'        => 'textarea',
@@ -922,7 +930,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_htmlnotes',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Notes section for HTML invoices.  Defaults to the same data in invoice_latexnotes if not specified.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -930,7 +938,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_htmlfooter',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Footer for HTML invoices.  Defaults to the same data in invoice_latexfooter if not specified.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -938,7 +946,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_htmlsummary',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Summary initial page for HTML invoices.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -946,21 +954,21 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_htmlreturnaddress',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Return address for HTML invoices.  Defaults to the same data in invoice_latexreturnaddress if not specified.',
     'type'        => 'textarea',
   },
 
   {
     'key'         => 'invoice_latex',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Optional LaTeX template for typeset PostScript invoices.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Typeset_.28LaTeX.29_invoice_templates">billing documentation</a> for details.',
     'type'        => 'textarea',
   },
 
   {
     'key'         => 'invoice_latexnotes',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Notes section for LaTeX typeset PostScript invoices.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -968,7 +976,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_latexfooter',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Footer for LaTeX typeset PostScript invoices.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -976,7 +984,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_latexsummary',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Summary initial page for LaTeX typeset PostScript invoices.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -984,7 +992,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_latexcoupon',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -992,14 +1000,14 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_latexreturnaddress',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Return address for LaTeX typeset PostScript invoices.',
     'type'        => 'textarea',
   },
 
   {
     'key'         => 'invoice_latexsmallfooter',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
     'type'        => 'textarea',
     'per_agent'   => 1,
@@ -1007,14 +1015,14 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice_email_pdf',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Send PDF invoice as an attachment to emailed invoices.  By default, includes the plain text invoice as the email body, unless invoice_email_pdf_note is set.',
     'type'        => 'checkbox'
   },
 
   {
     'key'         => 'invoice_email_pdf_note',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'If defined, this text will replace the default plain text invoice as the body of emailed PDF invoices.',
     'type'        => 'textarea'
   },
@@ -1022,7 +1030,7 @@ worry that config_items is freeside-specific and icky.
 
   { 
     'key'         => 'invoice_default_terms',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
     'type'        => 'select',
     'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 20', 'Net 30', 'Net 45', 'Net 60' ],
@@ -1030,35 +1038,35 @@ worry that config_items is freeside-specific and icky.
 
   { 
     'key'         => 'invoice_show_prior_due_date',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Show previous invoice due dates when showing prior balances.  Default is to show invoice date.',
     'type'        => 'checkbox',
   },
 
   { 
     'key'         => 'invoice_include_aging',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Show an aging line after the prior balance section.  Only valud when invoice_sections is enabled.',
     'type'        => 'checkbox',
   },
 
   { 
     'key'         => 'invoice_sections',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Split invoice into sections and label according to package category when enabled.',
     'type'        => 'checkbox',
   },
 
   { 
     'key'         => 'usage_class_as_a_section',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Split usage into sections and label according to usage class name when enabled.  Only valid when invoice_sections is enabled.',
     'type'        => 'checkbox',
   },
 
   { 
     'key'         => 'svc_phone_sections',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Create a section for each svc_phone when enabled.  Only valid when invoice_sections is enabled.',
     'type'        => 'checkbox',
   },
@@ -1072,7 +1080,7 @@ worry that config_items is freeside-specific and icky.
 
   { 
     'key'         => 'separate_usage',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Split the rated call usage into a separate line from the recurring charges.',
     'type'        => 'checkbox',
   },
@@ -1470,7 +1478,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup_server-payby',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Acceptable payment types for the signup server',
     'type'        => 'selectmultiple',
     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ],
@@ -1478,7 +1486,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup_server-default_agentnum',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Default agent for the signup server',
     'type'        => 'select-sub',
     'options_sub' => sub { require FS::Record;
@@ -1497,7 +1505,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup_server-default_refnum',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Default advertising source for the signup server',
     'type'        => 'select-sub',
     'options_sub' => sub { require FS::Record;
@@ -1517,21 +1525,21 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup_server-default_pkgpart',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Default package for the signup server',
     'type'        => 'select-part_pkg',
   },
 
   {
     'key'         => 'signup_server-default_svcpart',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Default service definition for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).',
     'type'        => 'select-part_svc',
   },
 
   {
     'key'         => 'signup_server-mac_addr_svcparts',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Service definitions which can receive mac addresses (current mapped to username for svc_acct).',
     'type'        => 'select-part_svc',
     'multiple'    => 1,
@@ -1539,14 +1547,14 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup_server-nomadix',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Signup page Nomadix integration',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'signup_server-service',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Service for the signup server - "Account (svc_acct)" is the default setting, or "Phone number (svc_phone)" for ITSP signup',
     'type'        => 'select',
     'select_hash' => [
@@ -1557,7 +1565,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice_server-base_url',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Base URL for the self-service web interface - necessary for some widgets to find their way, including retrieval of non-US state information and phone number provisioning.',
     'type'        => 'text',
   },
@@ -1571,27 +1579,27 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup_server-realtime',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Run billing for signup server signups immediately, and do not provision accounts which subsequently have a balance.',
     'type'        => 'checkbox',
   },
   {
     'key'         => 'signup_server-classnum2',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Package Class for first optional purchase',
     'type'        => 'select-pkg_class',
   },
 
   {
     'key'         => 'signup_server-classnum3',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Package Class for second optional purchase',
     'type'        => 'select-pkg_class',
   },
 
   {
     'key'         => 'backend-realtime',
-    'section'     => '',
+    'section'     => 'billing',
     'description' => 'Run billing for backend signups immediately.',
     'type'        => 'checkbox',
   },
@@ -1954,21 +1962,21 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice_server-primary_only',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Only allow primary accounts to access self-service functionality.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'selfservice_server-phone_login',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Allow login to self-service with phone number and PIN.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'selfservice_server-single_domain',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'If specified, only use this one domain for self-service access.',
     'type'        => 'text',
   },
@@ -2169,7 +2177,7 @@ worry that config_items is freeside-specific and icky.
   },
 
   { 'key'         => 'selfservice_server-cache_module',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Module used to store self-service session information.  All modules handle any number of self-service servers.  Cache::SharedMemoryCache is appropriate for a single database / single Freeside server.  Cache::FileCache is useful for multiple databases on a single server, or when IPC::ShareLite is not available (i.e. FreeBSD).', #  _Database stores session information in the database and is appropriate for multiple Freeside servers, but may be slower.',
     'type'        => 'select',
     'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
@@ -2184,7 +2192,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'cust_bill-ftpformat',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable FTP of raw invoice data - format.',
     'type'        => 'select',
     'select_enum' => [ '', 'default', 'billco', ],
@@ -2192,35 +2200,35 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'cust_bill-ftpserver',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable FTP of raw invoice data - server.',
     'type'        => 'text',
   },
 
   {
     'key'         => 'cust_bill-ftpusername',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable FTP of raw invoice data - server.',
     'type'        => 'text',
   },
 
   {
     'key'         => 'cust_bill-ftppassword',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable FTP of raw invoice data - server.',
     'type'        => 'text',
   },
 
   {
     'key'         => 'cust_bill-ftpdir',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable FTP of raw invoice data - server.',
     'type'        => 'text',
   },
 
   {
     'key'         => 'cust_bill-spoolformat',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable spooling of raw invoice data - format.',
     'type'        => 'select',
     'select_enum' => [ '', 'default', 'billco', ],
@@ -2228,7 +2236,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'cust_bill-spoolagent',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable per-agent spooling of raw invoice data.',
     'type'        => 'checkbox',
   },
@@ -2363,28 +2371,28 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'invoice-ship_address',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Include the shipping address on invoices.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'invoice-unitprice',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable unit pricing on invoices.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'invoice-smallernotes',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Display the notes section in a smaller font on invoices.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'invoice-smallerfooter',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Display footers in a smaller font on invoices.',
     'type'        => 'checkbox',
   },
@@ -2637,7 +2645,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'logo.png',
-    'section'     => 'billing',  #? 
+    'section'     => 'UI',  #'invoicing' ?
     'description' => 'Company logo for HTML invoices and the backoffice interface, in PNG format.  Suggested size somewhere near 92x62.',
     'type'        => 'image',
     'per_agent'   => 1, #XXX just view/logo.cgi, which is for the global
@@ -2646,7 +2654,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'logo.eps',
-    'section'     => 'billing',  #? 
+    'section'     => 'invoicing',
     'description' => 'Company logo for printed and PDF invoices, in EPS format.',
     'type'        => 'image',
     'per_agent'   => 1, #XXX as above, kinda
@@ -2654,14 +2662,14 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice-ignore_quantity',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Ignores service quantity restrictions in self-service context.  Strongly not recommended - just set your quantities correctly in the first place.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'selfservice-session_timeout',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Self-service session timeout.  Defaults to 1 hour.',
     'type'        => 'select',
     'select_enum' => [ '1 hour', '2 hours', '4 hours', '8 hours', '1 day', '1 week', ],
@@ -2778,7 +2786,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup_credit_type',
-    'section'     => 'billing',
+    'section'     => 'billing', #self-service?
     'description' => 'The group to use for new, automatically generated credit reasons resulting from signup and self-service declines.',
     'type'        => 'select-sub',
     'options_sub' => sub { require FS::Record;
@@ -2825,14 +2833,14 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'disable_previous_balance',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Disable inclusion of previous balancem payment, and credit lines on invoices',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'previous_balance-summary_only',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Only show a single line summarizing the total previous balance rather than one line per invoice.',
     'type'        => 'checkbox',
   },
@@ -2941,14 +2949,14 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'cust_bill-max_same_services',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Maximum number of the same service to list individually on invoices before condensing to a single line listing the number of services.  Defaults to 5.',
     'type'        => 'text',
   },
 
   {
     'key'         => 'cust_bill-consolidate_services',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Consolidate service display into fewer lines on invoices rather than one per service.',
     'type'        => 'checkbox',
   },
@@ -2969,7 +2977,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice-head',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'HTML for the HEAD section of the self-service interface, typically used for LINK stylesheet tags',
     'type'        => 'textarea', #htmlarea?
     'per_agent'   => 1,
@@ -2978,7 +2986,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice-body_header',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'HTML header for the self-service interface',
     'type'        => 'textarea', #htmlarea?
     'per_agent'   => 1,
@@ -2986,7 +2994,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice-body_footer',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'HTML header for the self-service interface',
     'type'        => 'textarea', #htmlarea?
     'per_agent'   => 1,
@@ -2995,7 +3003,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice-body_bgcolor',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'HTML background color for the self-service interface, for example, #FFFFFF',
     'type'        => 'text',
     'per_agent'   => 1,
@@ -3003,15 +3011,166 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice-box_bgcolor',
-    'section'     => '',
-    'description' => 'HTML color for self-service interface input boxes, for example, #C0C0C0"',
+    'section'     => 'self-service',
+    'description' => 'HTML color for self-service interface input boxes, for example, #C0C0C0',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-text_color',
+    'section'     => 'self-service',
+    'description' => 'HTML text color for the self-service interface, for example, #000000',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-link_color',
+    'section'     => 'self-service',
+    'description' => 'HTML link color for the self-service interface, for example, #0000FF',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-vlink_color',
+    'section'     => 'self-service',
+    'description' => 'HTML visited link color for the self-service interface, for example, #FF00FF',
     'type'        => 'text',
     'per_agent'   => 1,
   },
 
   {
+    'key'         => 'selfservice-hlink_color',
+    'section'     => 'self-service',
+    'description' => 'HTML hover link color for the self-service interface, for example, #808080',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-alink_color',
+    'section'     => 'self-service',
+    'description' => 'HTML active (clicked) link color for the self-service interface, for example, #808080',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-font',
+    'section'     => 'self-service',
+    'description' => 'HTML font CSS for the self-service interface, for example, 0.9em/1.5em Arial, Helvetica, Geneva, sans-serif',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-title_color',
+    'section'     => 'self-service',
+    'description' => 'HTML color for the self-service title, for example, #000000',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-title_align',
+    'section'     => 'self-service',
+    'description' => 'HTML alignment for the self-service title, for example, center',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+  {
+    'key'         => 'selfservice-title_size',
+    'section'     => 'self-service',
+    'description' => 'HTML font size for the self-service title, for example, 3',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-title_left_image',
+    'section'     => 'self-service',
+    'description' => 'Image used for the top of the menu in the self-service interface, in PNG format.',
+    'type'        => 'image',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-title_right_image',
+    'section'     => 'self-service',
+    'description' => 'Image used for the top of the menu in the self-service interface, in PNG format.',
+    'type'        => 'image',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-menu_skipblanks',
+    'section'     => 'self-service',
+    'description' => 'Skip blank (spacer) entries in the self-service menu',
+    'type'        => 'checkbox',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-menu_skipheadings',
+    'section'     => 'self-service',
+    'description' => 'Skip the unclickable heading entries in the self-service menu',
+    'type'        => 'checkbox',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-menu_bgcolor',
+    'section'     => 'self-service',
+    'description' => 'HTML color for the self-service menu, for example, #C0C0C0',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-menu_fontsize',
+    'section'     => 'self-service',
+    'description' => 'HTML font size for the self-service menu, for example, -1',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+  {
+    'key'         => 'selfservice-menu_nounderline',
+    'section'     => 'self-service',
+    'description' => 'Styles menu links in the self-service without underlining.',
+    'type'        => 'checkbox',
+    'per_agent'   => 1,
+  },
+
+
+  {
+    'key'         => 'selfservice-menu_top_image',
+    'section'     => 'self-service',
+    'description' => 'Image used for the top of the menu in the self-service interface, in PNG format.',
+    'type'        => 'image',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-menu_body_image',
+    'section'     => 'self-service',
+    'description' => 'Repeating image used for the body of the menu in the self-service interface, in PNG format.',
+    'type'        => 'image',
+    'per_agent'   => 1,
+  },
+
+  {
+    'key'         => 'selfservice-menu_bottom_image',
+    'section'     => 'self-service',
+    'description' => 'Image used for the bottom of the menu in the self-service interface, in PNG format.',
+    'type'        => 'image',
+    'per_agent'   => 1,
+  },
+
+  {
     'key'         => 'selfservice-bulk_format',
-    'section'     => '',
+    'section'     => 'deprecated',
     'description' => 'Parameter arrangement for selfservice bulk features',
     'type'        => 'select',
     'select_enum' => [ '', 'izoom-soap', 'izoom-ftp' ],
@@ -3020,7 +3179,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'selfservice-bulk_ftp_dir',
-    'section'     => '',
+    'section'     => 'deprecated',
     'description' => 'Enable bulk ftp provisioning in this folder',
     'type'        => 'text',
     'per_agent'   => 1,
@@ -3028,21 +3187,21 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'signup-no_company',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => "Don't display a field for company name on signup.",
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'signup-recommend_email',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Encourage the entry of an invoicing email address on signup.',
     'type'        => 'checkbox',
   },
 
   {
     'key'         => 'signup-recommend_daytime',
-    'section'     => '',
+    'section'     => 'self-service',
     'description' => 'Encourage the entry of a daytime phone number  invoicing email address on signup.',
     'type'        => 'checkbox',
   },
@@ -3182,7 +3341,7 @@ worry that config_items is freeside-specific and icky.
 
   {
     'key'         => 'agent-invoice_template',
-    'section'     => 'billing',
+    'section'     => 'invoicing',
     'description' => 'Enable display/edit of old-style per-agent invoice template selection',
     'type'        => 'checkbox',
   },
index 987b97e..9cdb65e 100644 (file)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Payment results') %>
 
-<FONT SIZE=4>Payment results</FONT><BR><BR>
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error processing your payment: $error</FONT>!;
 } else {
index c0977d9..7941971 100755 (executable)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Edit billing address') %>
 
-<FONT SIZE=4>Edit billing address</FONT><BR><BR>
 <%= if ( $error ) { 
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT><BR><BR>!;
 }  ''; %>
index 9b91d2c..68b6fd8 100644 (file)
@@ -1,7 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
-<FONT SIZE=4>Change password</FONT><BR><BR>
+<%= include('header', 'Change password') %>
 
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
index bbe4527..9633e89 100644 (file)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Change payment information') %>
 
-<FONT SIZE=4>Change payment information</FONT><BR><BR>
 <%= if ( $error ) { 
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT><BR><BR>!;
   }  ''; %>
index f03aeb5..59f9176 100755 (executable)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Edit service address') %>
 
-<FONT SIZE=4>Edit service address</FONT><BR><BR>
 <%= if ( $error ) { 
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT><BR><BR>!;
 }  ''; %>
index 95bdab7..37dccaa 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Change package') %>
 
 <%= include('change_pkg') %>
 
index a20e8ac..192c29f 100755 (executable)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Purchase additional package') %>
 
 <%= include('order_pkg') %>
 
index e16b01e..80a14f8 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Remove service') %>
 
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT>!;
index 630959e..692348f 100644 (file)
@@ -3,6 +3,28 @@
     <TITLE><%= $title || 'MyAccount' %></TITLE>
     <%= $head %>
   </HEAD>
+  <STYLE TYPE="text/css">
+    body {
+      color: <%= $text_color || '#000000' %>;
+      <%= $font ? "font: $font;" : '' %>
+    }
+    a { 
+      color: <%= $link_color || 'blue' %>;
+      <%= $menu_nounderline ? 'text-decoration: none' : '' %>
+    }
+    a:visited { 
+      color: <%= $vlink_color || 'purple' %>;
+      <%= $menu_nounderline ? 'text-decoration: none' : '' %>
+    }
+    a:active { 
+      color: <%= $alink_color || 'blue' %>;
+      <%= $menu_nounderline ? 'text-decoration: none' : '' %>
+    }
+    a:hover { 
+      color: <%= $hlink_color || '' %>;
+      <%= $menu_nounderline ? 'text-decoration: none' : '' %>
+    }
+  </STYLE>
   <BODY BGCOLOR="<%= $body_bgcolor || '#eeeeee' %>">
     <script language="JavaScript"><!--
       var mywindow = -1;
       }
     //--></script>
     <%= $body_header %>
-    <FONT SIZE=5><%= $title || 'MyAccount' %></FONT>
-    <BR><BR>
+
+    <TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
+      <TR STYLE="padding:0px">
+        <TD><IMG SRC="image.cgi?logo"></TD>
+        <TD WIDTH = "29%"
+            STYLE = "background: url(image.cgi?title_left_image) no-repeat left center; padding:0px">
+        </TD>
+        <TD WIDTH = "49%"
+            ALIGN="<%= $title_align || 'left' %>"
+            STYLE = "background: url(image.cgi?title_right_image) no-repeat right center; padding:0px">
+              <FONT SIZE  = "<%= $title_size || 5 %>"
+                    COLOR = "<%= $title_color %>"
+              ><%= $INCLUDE_ARGS[0] %>&nbsp;&nbsp;&nbsp;</FONT>
+          </DIV>
+        </TD>
+      </TR>
+    </TABLE>
+
     <%= include('myaccount_menu') %>
     <TD VALIGN="top">
+
diff --git a/fs_selfservice/FS-SelfService/cgi/image.cgi b/fs_selfservice/FS-SelfService/cgi/image.cgi
new file mode 100755 (executable)
index 0000000..e951dcd
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -T
+#!/usr/bin/perl -Tw
+
+use strict;
+use CGI;
+use FS::SelfService qw( skin_info );
+
+my $cgi = new CGI;
+
+my($query) = $cgi->keywords;
+$query =~ /^(\w+)$/ or '' =~ /^()$/;
+my $name = $1;
+
+my $info = skin_info();
+
+print $cgi->header( '-type'    => 'image/png', #for now
+                    #'-expires' => 'now',
+                  ).
+      $info->{$name};
+
index 8802a5d..f712c59 100644 (file)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Make a payment') %>
 
-<FONT SIZE=4>Make a payment</FONT><BR><BR>
 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true">
 <INPUT TYPE="hidden" NAME="session" VALUE="<%=$session_id%>">
 <INPUT TYPE="hidden" NAME="action" VALUE="ach_payment_results">
index 96a17ba..bd03b82 100644 (file)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Make a payment') %>
 
-<FONT SIZE=4>Make a payment</FONT><BR><BR>
 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true">
 <INPUT TYPE="hidden" NAME="session" VALUE="<%=$session_id%>">
 <INPUT TYPE="hidden" NAME="action" VALUE="payment_results">
index b2900b1..4055ed0 100755 (executable)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Pay now') %>
 
 <SCRIPT TYPE="text/javascript">
   function popcollect() {
@@ -13,8 +13,6 @@
 <SCRIPT TYPE="text/javascript" SRC="overlibmws_crossframe.js"></SCRIPT>
 <SCRIPT TYPE="text/javascript" SRC="iframecontentmws.js"></SCRIPT>
 
-<FONT SIZE=4>Pay now</FONT><BR><BR>
-
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
 }else{
index 9b54794..0de7385 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'My Account') %>
 
 Hello <%= $name %>!<BR><BR>
 <%= $small_custview %>
index 8765323..9d33036 100644 (file)
@@ -1,11 +1,15 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
 <TABLE BORDER=0><TR>
-<TD VALIGN="top" HEIGHT="100%" BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>">
+<TD VALIGN="top" BGCOLOR="<%= $menu_bgcolor || $box_bgcolor || '#c0c0c0' %>">
 
 <TABLE CELLSPACING=0 BORDER=0 HEIGHT="100%">
 
 <%= 
 
+if ( $menu_top_image ) {
+  $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?menu_top_image"></TD></TR>';
+}
+
 my @menu = (
   { title=>' ' },
   { title=>'Overview', url=>'myaccount', size=>'+1', },
@@ -85,25 +89,43 @@ push @menu,
 
 foreach my $item ( @menu ) {
 
+  next if $menu_skipblanks && $item->{'title'} =~ /^\s*$/;
+  next if $menu_skipheadings && ! $item->{'url'};
+
   $OUT .= '<TR><TD'; 
-  if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
-    $OUT .= ' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
-            ' STYLE="border-top: 1px solid black;'.
-                   ' border-left: 1px solid black;'.
-                   ' border-bottom: 1px solid black"';
+  if ( $menu_body_image ) {
+    if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
+      $OUT .= #' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
+              ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom; '.
+              '        color:#3366CC"; '. #XXX config
+              ' " ';
+    } else {
+      $OUT .= ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom" ';
+    }
   } else {
-    $OUT .= ' STYLE="border-right: 1px solid black"';
+    if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
+      $OUT .= ' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
+              ' STYLE="border-top: 1px solid black;'.
+                     ' border-left: 1px solid black;'.
+                     ' border-bottom: 1px solid black"';
+    } else {
+      $OUT .= ' STYLE="border-right: 1px solid black"';
+    }
   }
   $OUT.='>';
 
-  $OUT .= '&nbsp;' x $item->{'indent'}
-    if exists $item->{'indent'};
+  if ( $menu_skipheadings ) {
+    $OUT .= '&nbsp;&nbsp;';
+  } else {
+    $OUT .= '&nbsp;' x $item->{'indent'}
+      if exists $item->{'indent'};
+  }
 
   $OUT .= '<A HREF="'. $url. $item->{'url'}. '">'
     if exists $item->{'url'} && $action ne $item->{'url'};
 
-  $OUT .= '<FONT SIZE="'. $item->{'size'}. '">'
-    if exists $item->{'size'};
+  $OUT .= '<FONT SIZE="'. ( $menu_fontsize || $item->{'size'} ). '">'
+    if $menu_fontsize || exists($item->{'size'});
 
   $item->{'title'} =~ s/ /&nbsp;/g;
   $OUT .= $item->{'title'};
@@ -118,9 +140,13 @@ foreach my $item ( @menu ) {
 
 }
 
-%>
+if ( $menu_bottom_image ) {
+  $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?menu_bottom_image"></TD></TR>';
+} else {
+  $OUT .= '<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>';
+}
 
-<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>
+%>
 
 </TABLE>
 
index 4abfd84..79335a0 100644 (file)
@@ -7,7 +7,7 @@ function enable_order_pkg () {
   }
 }
 </SCRIPT>
-<FONT SIZE=4>Purchase additional package</FONT><BR><BR>
+
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
 } ''; %>
index 987b97e..9cdb65e 100644 (file)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Payment results') %>
 
-<FONT SIZE=4>Payment results</FONT><BR><BR>
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error processing your payment: $error</FONT>!;
 } else {
index a440284..bf7ad77 100644 (file)
@@ -1,6 +1,4 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
+<%= include('header', 'Information updated successfully') %>
 <FONT SIZE=4>Information updated successfully.</FONT>
-
 <%= include('footer') %>
index ffe0cab..4eca91f 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', "Password changed" ) %>
 
 <FONT SIZE=4>Password changed for <%= $value %> <%= $label %>.</FONT>
 
index a440284..e399aea 100644 (file)
@@ -1,6 +1,4 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
+<%= include('header', 'Information updated successfully' ) %>
 <FONT SIZE=4>Information updated successfully.</FONT>
-
 <%= include('footer') %>
index c7c69f0..bf15b6e 100644 (file)
@@ -1,6 +1,4 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
-<FONT SIZE=4>Package change successful.</FONT>
+<%= include('header', 'Package change successful') %>
 
 <%= include('footer') %>
index a440284..bf7ad77 100644 (file)
@@ -1,6 +1,4 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
+<%= include('header', 'Information updated successfully') %>
 <FONT SIZE=4>Information updated successfully.</FONT>
-
 <%= include('footer') %>
index b868937..649d920 100755 (executable)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Package order successful') %>
 
 <FONT SIZE=4>Package order successful.</FONT>
 
index 9dfc328..4a16ec5 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', "$svc recharged successfully") %>
 
 <FONT SIZE=4><%= $svc %> recharged successfully.</FONT>
 
index 39920cb..d6515e7 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', "$svc setup successfully") %>
 
 <FONT SIZE=4><%= $svc %> setup successfully.</FONT>
 
index 103eb9e..c20aae0 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', "$svc setup successfully") %>
 
 <FONT SIZE=4><%= $svc %> setup successfully.</FONT>
 
index f5b2c2b..7c0f861 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Setup my services') %>
 
 <%= include('provision_list') %>
 
index bffd22f..bae5730 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Setup account') %>
 
 <%= include('svc_acct') %>
 
index 6f0aa1f..c716e82 100644 (file)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Recharge with prepaid card') %>
 
-<FONT SIZE=4>Recharge with prepaid card</FONT><BR><BR>
 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true">
 <INPUT TYPE="hidden" NAME="session" VALUE="<%=$session_id%>">
 <INPUT TYPE="hidden" NAME="action" VALUE="recharge_results">
index af15365..147b66b 100644 (file)
@@ -1,7 +1,6 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Recharge results') %>
 
-<FONT SIZE=4>Recharge results</FONT><BR><BR>
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error processing your prepaid card: $error</FONT>!;
 } else {
index 734563b..2252852 100644 (file)
@@ -721,8 +721,12 @@ use HTML::Entities;
 use FS::SelfService qw(regionselector popselector domainselector location_form);
 
 #false laziness w/agent.cgi
+use vars qw(@INCLUDE_ARGS);
 sub include {
   my $name = shift;
+
+  @INCLUDE_ARGS = @_;
+
   my $template = new Text::Template( TYPE   => 'FILE',
                                      SOURCE => "$main::template_dir/$name.html",
                                      DELIMITERS => [ '<%=', '%>' ],
@@ -736,3 +740,4 @@ sub include {
 
 }
 
+1;
index 32bd632..6d4d847 100644 (file)
@@ -1,10 +1,10 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
-<FONT SIZE=4>Call usage for
-<%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning) %> -
-<%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending) %>
-</FONT><BR><BR>
+<%= include('header', 'Call usage for '.
+                       Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning).
+                       ' - '.
+                       Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending)
+           )
+%>
 
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
index 8a1c1c7..072a414 100644 (file)
@@ -1,5 +1,5 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
+<%= include('header', 'Invoice') %>
 
 <%= $invoice_html %>
 
index b492102..6943763 100644 (file)
@@ -3,15 +3,14 @@
     @svc_phone = grep { $_->{svcdb} eq 'svc_phone' } @svcs;
     '';
 %>
-<%= include('header') %>
+<%= include('header', 'Account usage') %>
 
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
 } ''; %>
 
 <%= if ( @svc_acct ) {
-      $OUT.= '<FONT SIZE="4">Account usage</FONT><BR><BR>
-              <TABLE BGCOLOR="#cccccc">
+      $OUT.= '<TABLE BGCOLOR="#cccccc">
                 <TR>
                   <TH ALIGN="left">Account</TH>
                   <TH ALIGN="right">Time remaining</TH>
index 9f02eba..c4cc177 100644 (file)
@@ -1,10 +1,10 @@
 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
-<FONT SIZE=4>Service usage details for
-<%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning) %> -
-<%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending) %>
-</FONT><BR><BR>
+<%= include('header', 'Service usage details for '.
+                      Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning).
+                      ' - '.
+                      Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending)
+           )
+%>
 
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
index 13286cf..08f6c10 100644 (file)
@@ -43,7 +43,10 @@ Click on a configuration value to change it.
   <TABLE BGCOLOR="#cccccc" BORDER=1 CELLSPACING=0 CELLPADDING=0 BORDERCOLOR="#999999">
   <tr>
     <th colspan="2" bgcolor="#dcdcdc">
-      <% ucfirst($section || 'unclassified') %> configuration options
+      <% ucfirst($section || 'unclassified') %>
+%     if ( $curuser->option('show_confitem_counts') ) {
+        (<% scalar( @{ $section_items{$section} } ) %> items)
+%     }
     </th>
   </tr>
 % foreach my $i (@{ $section_items{$section} }) { 
@@ -319,8 +322,9 @@ my %namecol = (
 </%once>
 <%init>
 
-die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+die "access denied" unless $curuser->access_right('Configuration');
 
 my $page_agent = '';
 my $title;
@@ -345,7 +349,7 @@ my @config_items = grep { $page_agent ? $_->per_agent : 1 }
 my @deleteable = qw( invoice_latexreturnaddress invoice_htmlreturnaddress );
 my %deleteable = map { $_ => 1 } @deleteable;
 
-my @sections = qw(required billing username password UI session shell BIND );
+my @sections = qw(required billing invoicing UI self-service username password session shell BIND );
 push @sections, '', 'deprecated';
 
 my %section_items = ();