From bda14295c400a8e829c223b80e55826977992ecc Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 26 Sep 2016 13:46:03 -0500 Subject: 72456: Directions - override company_address --- FS/FS/Conf.pm | 8 ++++++++ httemplate/elements/coord-links.html | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 6bfbf983c..a7e5d947a 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2075,6 +2075,14 @@ and customer address. Include units.', 'type' => 'text', }, + { + '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', diff --git a/httemplate/elements/coord-links.html b/httemplate/elements/coord-links.html index f27ffd39f..586a7109d 100644 --- a/httemplate/elements/coord-links.html +++ b/httemplate/elements/coord-links.html @@ -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)); -- cgit v1.2.1 From 704bb43d5343eeb523a13be55506b804d8c67bd0 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 26 Sep 2016 15:56:23 -0700 Subject: fix "-" character in one-time charge descriptions, #72101, from #72175 --- httemplate/edit/quick-charge.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 6da5f1231..dde891767 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -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; -- cgit v1.2.1 From 31104e36b65911d1a8b93644853af0838600f771 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 27 Sep 2016 09:45:54 -0700 Subject: restore missing files from rt 4.2.13, #13852 --- rt/t/data/configs/apache2.4+fastcgi.conf.in | 48 ++++++++++++++++++++ rt/t/data/configs/apache2.4+mod_perl.conf.in | 66 ++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 rt/t/data/configs/apache2.4+fastcgi.conf.in create mode 100644 rt/t/data/configs/apache2.4+mod_perl.conf.in 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 index 000000000..665ddc479 --- /dev/null +++ b/rt/t/data/configs/apache2.4+fastcgi.conf.in @@ -0,0 +1,48 @@ +ServerRoot %%SERVER_ROOT%% +PidFile %%PID_FILE%% +ServerAdmin root@localhost + +%%LOAD_MODULES%% + + + +User @WEB_USER@ +Group @WEB_GROUP@ + + + +ServerName localhost +Listen %%LISTEN%% + +ErrorLog "%%LOG_FILE%%" +LogLevel debug + + + Options FollowSymLinks + AllowOverride None + Require all denied + + +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%%" + + + + Require all granted +%%BASIC_AUTH%% + + + Options +ExecCGI + AddHandler fastcgi-script fcgi + + 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 index 000000000..eb144cb87 --- /dev/null +++ b/rt/t/data/configs/apache2.4+mod_perl.conf.in @@ -0,0 +1,66 @@ + + StartServers 1 + MinSpareServers 1 + MaxSpareServers 1 + MaxClients 1 + MaxRequestsPerChild 0 + + + + StartServers 1 + MinSpareThreads 1 + MaxSpareThreads 1 + ThreadLimit 1 + ThreadsPerChild 1 + MaxClients 1 + MaxRequestsPerChild 0 + + +ServerRoot %%SERVER_ROOT%% +PidFile %%PID_FILE%% +ServerAdmin root@localhost + +%%LOAD_MODULES%% + + + +User @WEB_USER@ +Group @WEB_GROUP@ + + + +ServerName localhost +Listen %%LISTEN%% + +ErrorLog "%%LOG_FILE%%" +LogLevel debug + + + Options FollowSymLinks + AllowOverride None + Require all denied + + +AddDefaultCharset UTF-8 +PerlSetEnv RT_SITE_CONFIG %%RT_SITE_CONFIG%% + +DocumentRoot "%%DOCUMENT_ROOT%%" + + + + Require all granted +%%BASIC_AUTH%% + + + SetHandler modperl + + PerlResponseHandler Plack::Handler::Apache2 + PerlSetVar psgi_app %%RT_SBIN_PATH%%/rt-server + + + + $ENV{RT_TESTING}=1; + use Plack::Handler::Apache2; + Plack::Handler::Apache2->preload("%%RT_SBIN_PATH%%/rt-server"); + + -- cgit v1.2.1