diff options
Diffstat (limited to 'plugins/UsersManager/templates/anonymousSettings.twig')
-rw-r--r-- | plugins/UsersManager/templates/anonymousSettings.twig | 75 |
1 files changed, 21 insertions, 54 deletions
diff --git a/plugins/UsersManager/templates/anonymousSettings.twig b/plugins/UsersManager/templates/anonymousSettings.twig index 32c606499f..1050bf52d3 100644 --- a/plugins/UsersManager/templates/anonymousSettings.twig +++ b/plugins/UsersManager/templates/anonymousSettings.twig @@ -4,9 +4,7 @@ {% block content %} {% if isSuperUser %} - - <h2 piwik-enriched-headline>{{ title }}</h2> - +<div piwik-content-block content-title="{{ title|e('html_attr') }}"> {% if anonymousSites|length == 0 %} <div class="alert alert-info"> @@ -15,64 +13,33 @@ {% else %} - {{ ajax.errorDiv('ajaxErrorAnonymousUserSettings') }} - {{ ajax.loadingDiv('ajaxLoadingAnonymousUserSettings') }} + <div piwik-form ng-controller="AnonymousSettingsController as anonymousSettings"> - <div class="form-group"> - <label> - {{ 'UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess'|translate }} - </label> - <fieldset> - <label class="radio"> - <input id="anonymousDefaultReport-login" type="radio" value="Login" - name="anonymousDefaultReport" - {% if anonymousDefaultReport==loginModule %} checked="checked"{% endif %} /> - {{ 'UsersManager_TheLoginScreen'|translate }} - </label> - <label class="radio"> - <input id="anonymousDefaultReport-multisites" - {% if anonymousSites is empty %}disabled="disabled" {% endif %} - type="radio" value="MultiSites" name="anonymousDefaultReport" - {% if anonymousDefaultReport=='MultiSites' %} checked="checked"{% endif %} /> - {{ 'General_AllWebsitesDashboard'|translate }} - </label> + <div piwik-field uicontrol="radio" name="anonymousDefaultReport" + ng-model="anonymousSettings.defaultReport" + introduction="{{ 'UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess'|translate|e('html_attr') }}" + value="{{ anonymousDefaultReport }}" + options="{{ defaultReportOptions|json_encode }}"> + </div> - <label class="radio"> - <input id="anonymousDefaultReport-specific" - {% if anonymousSites is empty %}disabled="disabled" {% endif %} - type="radio" value="1" name="anonymousDefaultReport" - {% if anonymousDefaultReport>0 %} checked="checked"{% endif %} /> - {{ 'General_DashboardForASpecificWebsite'|translate }} + <div piwik-field uicontrol="select" name="anonymousDefaultReportWebsite" + ng-model="anonymousSettings.defaultReportWebsite" + options="{{ anonymousSites|json_encode }}" + value="{{ anonymousDefaultSite }}"> + </div> - {% if anonymousSites is not empty %} - <select id="anonymousDefaultReportWebsite"> - {% for info in anonymousSites %} - <option value="{{ info.idsite }}" {% if anonymousDefaultReport==info.idsite %} selected="selected"{% endif %}> - {{ info.name|raw }} - </option> - {% endfor %} - </select> - {% endif %} - </label> + <div piwik-field uicontrol="radio" name="anonymousDefaultDate" + ng-model="anonymousSettings.defaultDate" + introduction="{{ 'UsersManager_ForAnonymousUsersReportDateToLoadByDefault'|translate|e('html_attr') }}" + value="{{ anonymousDefaultDate }}" + options="{{ availableDefaultDates|json_encode }}"> + </div> - </fieldset> - </div> + <div piwik-save-button saving="anonymousSettings.loading" onconfirm="anonymousSettings.save()"></div> - <div class="form-group"> - <label>{{ 'UsersManager_ForAnonymousUsersReportDateToLoadByDefault'|translate }}</label> - <fieldset> - {% for value,description in availableDefaultDates %} - <label class="radio"> - <input type="radio" name="anonymousDefaultDate" - {% if anonymousDefaultDate==value %}checked="checked" {% endif %}value="{{ value }}"/> - {{ description }} - </label> - {% endfor %} - </fieldset> </div> - <input type="submit" value="{{ 'General_Save'|translate }}" id="anonymousUserSettingsSubmit" class="submit"/> - {% endif %} +</div> {% endif %} {% endblock %}
\ No newline at end of file |