diff options
author | sgiehl <stefan@piwik.org> | 2016-01-03 14:46:12 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2016-01-12 23:10:52 +0300 |
commit | c2a8ea4ea53f7d55fe690d5f907fc2c0ed496f9e (patch) | |
tree | 1728aeddc4b289b39a302b4ed419e135e40a5948 /plugins/Installation/FormSuperUser.php | |
parent | d7a184a18d1429749f8297c9cd3f36b88840e351 (diff) |
fixes #9321 - minor changes to create super user step in installation
Diffstat (limited to 'plugins/Installation/FormSuperUser.php')
-rw-r--r-- | plugins/Installation/FormSuperUser.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/plugins/Installation/FormSuperUser.php b/plugins/Installation/FormSuperUser.php index b8c0565299..c4b1d0944d 100644 --- a/plugins/Installation/FormSuperUser.php +++ b/plugins/Installation/FormSuperUser.php @@ -11,6 +11,7 @@ namespace Piwik\Plugins\Installation; use HTML_QuickForm2_DataSource_Array; use HTML_QuickForm2_Factory; use HTML_QuickForm2_Rule; +use Piwik\Container\StaticContainer; use Piwik\Piwik; use Piwik\Plugins\UsersManager\UsersManager; use Piwik\QuickForm2; @@ -58,11 +59,22 @@ class FormSuperUser extends QuickForm2 'content' => ' ' . Piwik::translate('Installation_PiwikOrgNewsletter'), )); + $piwikProNewsletter = Piwik::translate('Installation_PiwikProNewsletter', + array("<a href='http://piwik.pro?pk_medium=App_Newsletter_link&pk_source=Piwik_App&pk_campaign=App_Installation' style='color:#444;' rel='noreferrer' target='_blank'>", "</a>") + ); + + $currentLanguage = StaticContainer::get('Piwik\Translation\Translator')->getCurrentLanguage(); + + if ($currentLanguage == 'de') { + $piwikProNewsletter = Piwik::translate('Installation_PiwikProNewsletter', + array("<a href='http://piwikpro.de?pk_medium=App_Newsletter_link&pk_source=Piwik_App&pk_campaign=App_Installation' style='color:#444;' rel='noreferrer' target='_blank'>", "</a>") + ); + $piwikProNewsletter = preg_replace('(Piwik PRO(?! GmbH))', 'Piwik PRO GmbH', $piwikProNewsletter); + } + $this->addElement('checkbox', 'subscribe_newsletter_piwikpro', null, array( - 'content' => ' ' . Piwik::translate('Installation_PiwikProNewsletter', - array("<a href='http://piwik.pro?pk_medium=App_Newsletter_link&pk_source=Piwik_App&pk_campaign=App_Installation' style='color:#444;' rel='noreferrer' target='_blank'>", "</a>") - ), + 'content' => ' ' . $piwikProNewsletter, )); $this->addElement('submit', 'submit', array('value' => Piwik::translate('General_Next') . ' ยป', 'class' => 'btn btn-lg')); @@ -70,7 +82,7 @@ class FormSuperUser extends QuickForm2 // default values $this->addDataSource(new HTML_QuickForm2_DataSource_Array(array( 'subscribe_newsletter_piwikorg' => 1, - 'subscribe_newsletter_piwikpro' => 1, + 'subscribe_newsletter_piwikpro' => $currentLanguage == 'de' ? 0 : 1, ))); } } |