Welcome to mirror list, hosted at ThFree Co, Russian Federation.

userSecurity.twig « templates « UsersManager « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 58c03b571e9302dbad3b8e2c0882c024fa983922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{% extends 'admin.twig' %}

{% set title %}{{ 'General_Security'|translate }}{% endset %}

{% block content %}
{% if isUsersAdminEnabled %}
    <div piwik-content-block content-title="{{ 'General_ChangePassword'|translate|e('html_attr') }}" feature="true">
        <form id="userSettingsTable" method="post" action="{{ linkTo({'module': 'UsersManager', 'action': 'recordPasswordChange'}) }}">

            <input type="hidden" value="{{ changePasswordNonce|e('html_attr') }}" name="nonce">

            {% if isValidHost is defined and isValidHost %}

                <div piwik-field uicontrol="password" name="password" autocomplete="off"
                     ng-model="personalSettings.password"
                     ng-change="personalSettings.requirePasswordConfirmation()"
                     data-title="{{ 'Login_NewPassword'|translate|e('html_attr') }}"
                     value="" inline-help="{{ 'UsersManager_IfYouWouldLikeToChangeThePasswordTypeANewOne'|translate|e('html_attr') }}">
                </div>

                <div piwik-field uicontrol="password" name="passwordBis" autocomplete="off"
                     ng-model="personalSettings.passwordBis"
                     ng-change="personalSettings.requirePasswordConfirmation()"
                     data-title="{{ 'Login_NewPasswordRepeat'|translate|e('html_attr') }}"
                     value="" inline-help="{{ 'UsersManager_TypeYourPasswordAgain'|translate|e('html_attr') }}">
                </div>

                <div piwik-field uicontrol="password" name="passwordConfirmation" autocomplete="off"
                     ng-model="personalSettings.current_password"
                     data-title="{{ 'UsersManager_YourCurrentPassword'|translate|e('html_attr') }}"
                     value="" inline-help="{{ 'UsersManager_TypeYourCurrentPassword'|translate|e('html_attr') }}">
                </div>

                <input type="submit"
                       value="{{ 'General_Save'|translate|e('html_attr') }}"
                       class="btn"/>
            {% endif %}

            {% if isValidHost is not defined or not isValidHost %}
                <div class="alert alert-danger">
                    {{ 'UsersManager_InjectedHostCannotChangePwd'|translate(invalidHost) }}
                    {% if not isSuperUser %}{{ 'UsersManager_EmailYourAdministrator'|translate(invalidHostMailLinkStart,'</a>')|raw }}{% endif %}
                </div>
            {% endif %}

        </form>
    </div>

    {{ postEvent('Template.userSecurity.afterPassword') }}
{% endif %}

    <a name="authtokens" id="authtokens"></a>
    <div piwik-content-block content-title="{{ 'UsersManager_AuthTokens'|translate|e('html_attr') }}">
        <p>
            {{ 'UsersManager_TokenAuthIntro'|translate }}
            {% if hasTokensWithExpireDate %}{{ 'UsersManager_ExpiredTokensDeleteAutomatically'|translate }}{% endif %}
        </p>
        <table piwik-content-table class="listAuthTokens">
            <thead>
            <tr>
                <th>{{ 'General_CreationDate'|translate }}</th>
                <th>{{ 'General_Description'|translate }}</th>
                <th>{{ 'UsersManager_LastUsed'|translate }}</th>
                {% if hasTokensWithExpireDate %}<th title="{{ 'UsersManager_TokensWithExpireDateCreationBySystem'|translate|e('html_attr') }}">{{ 'UsersManager_ExpireDate'|translate }}</th>{% endif %}
                <th>{{ 'General_Actions'|translate }}</th>
            </tr>
            </thead>
            <tbody>
            {% if tokens is empty %}
            <tr>
                <td colspan="{% if hasTokensWithExpireDate %}5{% else %}4{% endif %}">
                    {{ 'UsersManager_NoTokenCreatedYetCreateNow'|translate('<a href="' ~ (linkTo({'module': 'UsersManager', 'action': 'addNewToken'})|e('html_attr'))~ '">', '</a>')|raw }}
                </td></tr>
            {% else %}
                {% for theToken in tokens %}
                    <tr>
                        <td><span class="creationDate">{{ theToken.date_created }}</span></td>
                        <td>{{ theToken.description }}</td>
                        <td>{% if theToken.last_used %}{{ theToken.last_used }}{% else %}{{ 'General_Never'|translate }}{% endif %}</td>
                        {% if hasTokensWithExpireDate %}
                            <td title="{{ 'UsersManager_TokensWithExpireDateCreationBySystem'|translate|e('html_attr') }}">
                            {% if theToken.date_expired %}{{ theToken.date_expired }}{% else %}{{ 'General_Never'|translate }}{% endif %}
                            </td>
                        {% endif %}
                        <td>
                            <form method="post" action="{{ linkTo({'module': 'UsersManager', 'action': 'deleteToken'}) }}" style="display: inline">
                                <input name="nonce" type="hidden" value="{{ deleteTokenNonce|e('html_attr')  }}">
                                <input name="idtokenauth" type="hidden" value="{{ theToken.idusertokenauth|e('html_attr') }}">
                                <button type="submit" class="table-action"
                                        title="{{ 'General_Delete'|translate|e('html_attr') }}">
                                    <span class="icon-delete"></span>
                                </button>
                            </form>
                        </td>
                    </tr>
                {% endfor %}
            {% endif %}
            </tbody>
        </table>

        <div class="tableActionBar">
            <a href="{{ linkTo({'module': 'UsersManager', 'action': 'addNewToken'})|e('html_attr') }}" class="addNewToken">
                <span class="icon-add"></span>
               {{ 'UsersManager_CreateNewToken'|translate }}
            </a>

            {% if tokens is not empty %}
            <form method="post" action="{{ linkTo({'module': 'UsersManager', 'action': 'deleteToken'}) }}" style="display: inline">
                <input name="nonce" type="hidden" value="{{ deleteTokenNonce|e('html_attr')  }}">
                <input name="idtokenauth" type="hidden" value="all">
                <button type="submit" class="table-action">
                    <span class="icon-delete"></span> {{ 'UsersManager_DeleteAllTokens'|translate }}
                </button>
            </form>
            {% endif %}
        </div>

    </div>


{% endblock %}