diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-04-10 01:07:20 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-04-10 01:07:20 -0700 |
commit | 85ae8035888f10fd8075be3234f8e981f5004557 (patch) | |
tree | 667a3ba7c00bf9e3cd4d7ad40ad11587da21c57f /FS/FS | |
parent | 23b0288f93882b3de9e6531b33c76517e47353c5 (diff) |
add ability to configure the myaccount.ca.inter.net login banner ad and URL from configuration settings, RT#16301
Diffstat (limited to 'FS/FS')
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 13 | ||||
-rw-r--r-- | FS/FS/ClientAPI_XMLRPC.pm | 19 | ||||
-rw-r--r-- | FS/FS/Conf.pm | 14 |
3 files changed, 39 insertions, 7 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index acd0c6e85..7bc3011d2 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -151,12 +151,25 @@ sub login_info { %{ skin_info($p) }, 'phone_login' => $conf->exists('selfservice_server-phone_login'), 'single_domain'=> scalar($conf->config('selfservice_server-single_domain')), + 'banner_url' => scalar($conf->config('selfservice-login_banner_url')), + 'banner_image_md5' => + md5_hex($conf->config_binary('selfservice-login_banner_image')), ); return \%info; } +sub login_banner_image { + my $p = shift; + my $conf = new FS::Conf; + my $image = $conf->config_binary('selfservice-login_banner_image'); + return { + 'md5' => md5_hex($image), + 'image' => $image, + }; +} + #false laziness w/FS::ClientAPI::passwd::passwd sub login { my $p = shift; diff --git a/FS/FS/ClientAPI_XMLRPC.pm b/FS/FS/ClientAPI_XMLRPC.pm index 1e068f428..98e1910c3 100644 --- a/FS/FS/ClientAPI_XMLRPC.pm +++ b/FS/FS/ClientAPI_XMLRPC.pm @@ -37,17 +37,21 @@ $DEBUG = 0; $FS::ClientAPI::DEBUG = $DEBUG; #false laziness w/FS::SelfService/XMLRPC.pm, same problem as below but worse +our %typefix_skin_info = ( + 'logo' => 'base64', + 'title_left_image' => 'base64', + 'title_right_image' => 'base64', + 'menu_top_image' => 'base64', + 'menu_body_image' => 'base64', + 'menu_bottom_image' => 'base64', +); our %typefix = ( 'invoice_pdf' => { 'invoice_pdf' => 'base64', }, 'legacy_invoice_pdf' => { 'invoice_pdf' => 'base64', }, - 'skin_info' => { 'logo' => 'base64', - 'title_left_image' => 'base64', - 'title_right_image' => 'base64', - 'menu_top_image' => 'base64', - 'menu_body_image' => 'base64', - 'menu_bottom_image' => 'base64', - }, + 'skin_info' => \%typefix_skin_info, + 'login_info' => \%typefix_skin_info, 'invoice_logo' => { 'logo' => 'base64', }, + 'login_banner_image' => { 'image' => 'base64', }, ); sub AUTOLOAD { @@ -94,6 +98,7 @@ sub ss2clientapi { 'chfn' => 'passwd/passwd', 'chsh' => 'passwd/passwd', 'login_info' => 'MyAccount/login_info', + 'login_banner_image' => 'MyAccount/login_banner_image', 'login' => 'MyAccount/login', 'logout' => 'MyAccount/logout', 'switch_acct' => 'MyAccount/switch_acct', diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index b0f85cf06..2a76a1535 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -4147,6 +4147,20 @@ and customer address. Include units.', }, { + 'key' => 'selfservice-login_banner_image', + 'section' => 'self-service', + 'description' => 'Banner image shown on the login page, in PNG format.', + 'type' => 'image', + }, + + { + 'key' => 'selfservice-login_banner_url', + 'section' => 'self-service', + 'description' => 'Link for the login banner.', + 'type' => 'text', + }, + + { 'key' => 'selfservice-bulk_format', 'section' => 'deprecated', 'description' => 'Parameter arrangement for selfservice bulk features', |