diff options
author | Nick Wilde <design@briarmoon.ca> | 2017-02-19 09:39:39 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-02-19 09:39:39 +0300 |
commit | 28c2e0b933f9f79c11f4e8a964689bd509390564 (patch) | |
tree | 107171e5fd74e121c6ff721e2b0a463b51418fa2 | |
parent | 8374e68efd6076faa8e6fb97ad0c06315b3dd24b (diff) |
Replace prefilled values in Name & SiteUrl with placeholders. (#11279)
4 files changed, 12 insertions, 6 deletions
diff --git a/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js b/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js index bdade4b045..bb8b86bd5d 100644 --- a/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js +++ b/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js @@ -171,7 +171,6 @@ var initNewSite = function() { $scope.site.editMode = true; - $scope.site.name = "Name"; $scope.site.timezone = $scope.globalSettings.defaultTimezone; $scope.site.currency = $scope.globalSettings.defaultCurrency; diff --git a/plugins/SitesManager/templates/sites-list/site-fields.html b/plugins/SitesManager/templates/sites-list/site-fields.html index 0b346c4d14..35fdf55766 100644 --- a/plugins/SitesManager/templates/sites-list/site-fields.html +++ b/plugins/SitesManager/templates/sites-list/site-fields.html @@ -71,7 +71,7 @@ <div class="form-group row"> <div class="col s12 m6 input-field"> - <input type="text" ng-model="site.name" maxlength="90" /> + <input type="text" ng-model="site.name" maxlength="90" placeholder="{{ 'General_Name'|translate }}" /> <label>{{ 'General_Name'|translate }}</label> </div> <div class="col s12 m6"></div> @@ -84,7 +84,7 @@ <div piwik-form-field="setting" all-settings="settingsPerPlugin.settings"></div> </div> </div> - + <div piwik-field uicontrol="select" name="currency" ng-model="site.currency" title="{{ 'SitesManager_Currency'|translate }}" diff --git a/plugins/WebsiteMeasurable/MeasurableSettings.php b/plugins/WebsiteMeasurable/MeasurableSettings.php index 0a16d92e92..3d141b5301 100644 --- a/plugins/WebsiteMeasurable/MeasurableSettings.php +++ b/plugins/WebsiteMeasurable/MeasurableSettings.php @@ -180,7 +180,11 @@ class MeasurableSettings extends \Piwik\Settings\Measurable\MeasurableSettings . '<br /><br />' . Piwik::translate('SitesManager_YourCurrentIpAddressIs', array('<i>' . $ip . '</i>')); $field->uiControl = FieldConfig::UI_CONTROL_TEXTAREA; - $field->uiControlAttributes = array('cols' => '20', 'rows' => '4'); + $field->uiControlAttributes = array( + 'cols' => '20', + 'rows' => '4', + 'placeholder' => $ip, + ); $field->validate = function ($value) { if (!empty($value)) { diff --git a/plugins/WebsiteMeasurable/Settings/Urls.php b/plugins/WebsiteMeasurable/Settings/Urls.php index 3aa023c1e0..2fdfaf8498 100644 --- a/plugins/WebsiteMeasurable/Settings/Urls.php +++ b/plugins/WebsiteMeasurable/Settings/Urls.php @@ -22,7 +22,6 @@ class Urls extends \Piwik\Settings\Measurable\MeasurableProperty { $name = 'urls'; $pluginName = 'WebsiteMeasurable'; - $defaultValue = array('http://siteUrl.com/', 'http://siteUrl2.com/'); $type = FieldConfig::TYPE_ARRAY; parent::__construct($name, $defaultValue, $type, $pluginName, $idSite); @@ -38,7 +37,11 @@ class Urls extends \Piwik\Settings\Measurable\MeasurableProperty $config->title = Piwik::translate('SitesManager_Urls'); $config->inlineHelp = Piwik::translate('SitesManager_AliasUrlHelp'); $config->uiControl = FieldConfig::UI_CONTROL_TEXTAREA; - $config->uiControlAttributes = array('cols' => '25', 'rows' => '3'); + $config->uiControlAttributes = array( + 'cols' => '25', + 'rows' => '3', + 'placeholder' => "https://siteUrl.com/ https://siteUrl2.com/", + ); $self = $this; $config->validate = function ($urls) use ($self) { |