Merge branch 'master' of git.freeside.biz:/home/git/freeside
authorIvan Kohler <ivan@freeside.biz>
Wed, 28 Sep 2016 19:06:48 +0000 (12:06 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 28 Sep 2016 19:06:48 +0000 (12:06 -0700)
FS/FS/Conf.pm
httemplate/edit/quick-charge.html
httemplate/elements/coord-links.html
rt/t/data/configs/apache2.4+fastcgi.conf.in [new file with mode: 0644]
rt/t/data/configs/apache2.4+mod_perl.conf.in [new file with mode: 0644]

index e0fb80b..ef2a938 100644 (file)
@@ -2076,6 +2076,14 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'company_physical_address',
+    'section'     => 'addresses',
+    'description' => 'Your physical company address, for use in supplying google map directions, defaults to company_address',
+    'type'        => 'textarea',
+    'per_agent'   => 1,
+  },
+
+  {
     'key'         => 'show_ship_company',
     'section'     => 'addresses',
     'description' => 'Turns on display/collection of a "service company name" field for customers.',
index 6da5f12..dde8917 100644 (file)
@@ -40,7 +40,7 @@ function enable_quick_charge (e) {
 
 function validate_quick_charge () {
   var pkg = document.QuickChargeForm.pkg.value;
-  var pkg_regex = XRegExp('^([\\p{L}\\p{N} \_\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\\[\\]]*)$');
+  var pkg_regex = XRegExp('^([\\p{L}\\p{N} \_\!\@\#\$\%\&\(\)\+\;\:\'\"\,\.\?\/\=\\-\\[\\]]*)$');
   var amount = document.QuickChargeForm.amount.value;
   var amount_regex = /^\s*\$?\s*(\d*(\.?\d{1,2}))\s*$/ ;
   var rval = true;
index f27ffd3..586a710 100644 (file)
@@ -51,7 +51,8 @@ my $apikey = $conf->config('google_maps_api_key');
 #for directions link
 my @origin = $opt{company_address}
                ? @{ $opt{company_address} }
-               : $conf->config('company_address', $agentnum);
+               : ( $conf->config('company_physical_address', $agentnum) ||
+                   $conf->config('company_address', $agentnum) );
 my $origin = uri_escape(join(',', @origin));
 
 </%init>
diff --git a/rt/t/data/configs/apache2.4+fastcgi.conf.in b/rt/t/data/configs/apache2.4+fastcgi.conf.in
new file mode 100644 (file)
index 0000000..665ddc4
--- /dev/null
@@ -0,0 +1,48 @@
+ServerRoot %%SERVER_ROOT%%
+PidFile %%PID_FILE%%
+ServerAdmin root@localhost
+
+%%LOAD_MODULES%%
+
+<IfModule !mpm_netware_module>
+<IfModule !mpm_winnt_module>
+User @WEB_USER@
+Group @WEB_GROUP@
+</IfModule>
+</IfModule>
+
+ServerName localhost
+Listen %%LISTEN%%
+
+ErrorLog "%%LOG_FILE%%"
+LogLevel debug
+
+<Directory />
+    Options FollowSymLinks
+    AllowOverride None
+    Require all denied
+</Directory>
+
+AddDefaultCharset UTF-8
+
+FastCgiServer %%RT_SBIN_PATH%%/rt-server.fcgi \
+    -socket %%TMP_DIR%%/socket \
+    -processes 1 \
+    -idle-timeout 180 \
+    -initial-env RT_SITE_CONFIG=%%RT_SITE_CONFIG%% \
+    -initial-env RT_TESTING=1
+
+ScriptAlias / %%RT_SBIN_PATH%%/rt-server.fcgi/
+
+DocumentRoot "%%DOCUMENT_ROOT%%"
+<Location />
+
+    <RequireAll>
+        Require all granted
+%%BASIC_AUTH%%
+    </RequireAll>
+
+    Options +ExecCGI
+    AddHandler fastcgi-script fcgi
+</Location>
+
diff --git a/rt/t/data/configs/apache2.4+mod_perl.conf.in b/rt/t/data/configs/apache2.4+mod_perl.conf.in
new file mode 100644 (file)
index 0000000..eb144cb
--- /dev/null
@@ -0,0 +1,66 @@
+<IfModule mpm_prefork_module>
+    StartServers          1
+    MinSpareServers       1
+    MaxSpareServers       1
+    MaxClients            1
+    MaxRequestsPerChild   0
+</IfModule>
+
+<IfModule mpm_worker_module>
+    StartServers          1
+    MinSpareThreads       1
+    MaxSpareThreads       1
+    ThreadLimit           1
+    ThreadsPerChild       1
+    MaxClients            1
+    MaxRequestsPerChild   0
+</IfModule>
+
+ServerRoot %%SERVER_ROOT%%
+PidFile %%PID_FILE%%
+ServerAdmin root@localhost
+
+%%LOAD_MODULES%%
+
+<IfModule !mpm_netware_module>
+<IfModule !mpm_winnt_module>
+User @WEB_USER@
+Group @WEB_GROUP@
+</IfModule>
+</IfModule>
+
+ServerName localhost
+Listen %%LISTEN%%
+
+ErrorLog "%%LOG_FILE%%"
+LogLevel debug
+
+<Directory />
+    Options FollowSymLinks
+    AllowOverride None
+    Require all denied
+</Directory>
+
+AddDefaultCharset UTF-8
+PerlSetEnv RT_SITE_CONFIG %%RT_SITE_CONFIG%%
+
+DocumentRoot "%%DOCUMENT_ROOT%%"
+<Location />
+
+    <RequireAll>
+        Require all granted
+%%BASIC_AUTH%%
+    </RequireAll>
+
+    SetHandler modperl
+
+    PerlResponseHandler Plack::Handler::Apache2
+    PerlSetVar psgi_app %%RT_SBIN_PATH%%/rt-server
+</Location>
+
+<Perl>
+    $ENV{RT_TESTING}=1;
+    use Plack::Handler::Apache2;
+    Plack::Handler::Apache2->preload("%%RT_SBIN_PATH%%/rt-server");
+</Perl>
+