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

macros.twig « templates « MobileMessaging « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9cb4c93e6d77e0e3ee9fc6abe161de6c249a08ab (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
{% macro manageSmsApi(credentialSupplied, creditLeft, smsProviderOptions, smsProviders, provider) %}
<div ng-controller="ManageSmsProviderController as manageProvider">

    <div piwik-activity-indicator loading="manageProvider.isDeletingAccount"></div>
    <div id="ajaxErrorManageSmsProviderSettings"></div>

    {% if credentialSupplied %}
        <p>
            {{ 'MobileMessaging_Settings_CredentialProvided'|translate(provider) }}
            {{ creditLeft }}
            <br/>
            {{ 'MobileMessaging_Settings_UpdateOrDeleteAccount'|translate('<a ng-click="manageProvider.showUpdateAccount()" id="displayAccountForm">',"</a>",'<a ng-click="manageProvider.deleteAccount()" id="deleteAccount">',"</a>")|raw }}
        </p>
    {% else %}
        <p>{{ 'MobileMessaging_Settings_PleaseSignUp'|translate }}</p>
    {% endif %}

    <div piwik-form id='accountForm' {% if credentialSupplied %}ng-show="manageProvider.showAccountForm"{% endif %}>

        <div piwik-field uicontrol="select" name="smsProviders"
             options="{{ smsProviderOptions|json_encode }}"
             ng-model="manageProvider.smsProvider"
             ng-change="manageProvider.isUpdateAccountPossible()"
             title="{{ 'MobileMessaging_Settings_SMSProvider'|translate|e('html_attr') }}"
             value="{{ provider }}">
        </div>

        <div piwik-field uicontrol="text" name="apiKey"
             ng-model="manageProvider.apiKey"
             required="true"
             ng-change="manageProvider.isUpdateAccountPossible()"
             title="{{ 'MobileMessaging_Settings_APIKey'|translate|e('html_attr') }}"
             value="">
        </div>

        <div piwik-save-button id='apiAccountSubmit'
             disabled="!manageProvider.canBeUpdated"
             saving="manageProvider.isUpdatingAccount"
             onconfirm="manageProvider.updateAccount()"></div>

        {% for smsProvider, description in smsProviders %}
            <div class='providerDescription'
                 ng-show="manageProvider.smsProvider == '{{ smsProvider|e('js') }}'"
                 id='{{ smsProvider }}'>
                {{ description|raw }}
            </div>
        {% endfor %}

    </div>
</div>
{% endmacro %}

{% macro selectPhoneNumbers(phoneNumbers, angularContext, value, withIntroduction) %}
    <div id="mobilePhoneNumbersHelp" class="inline-help-node">
        <span class="icon-info"></span>

        {% if phoneNumbers|length == 0 %}
            {{ 'MobileMessaging_MobileReport_NoPhoneNumbers'|translate }}
        {% else %}
            {{ 'MobileMessaging_MobileReport_AdditionalPhoneNumbers'|translate|e('html_attr') }}
        {% endif %}
        <a href="{{ linkTo({'module':"MobileMessaging", 'action': 'index', 'updated':null}) }}">{{ 'MobileMessaging_MobileReport_MobileMessagingSettingsLink'|translate }}</a>
    </div>

    <div class='mobile'
         piwik-field uicontrol="checkbox"
         var-type="array"
         name="phoneNumbers"
         ng-model="{{ angularContext }}.report.phoneNumbers"
         {% if withIntroduction %}
             introduction="{{ 'ScheduledReports_SendReportTo'|translate|e('html_attr') }}"
         {% endif %}
         title="{{ 'MobileMessaging_PhoneNumbers'|translate|e('html_attr') }}"
         {% if phoneNumbers|length == 0 %}disabled="true"{% endif %}
         options="{{ phoneNumbers|json_encode }}"
         inline-help="#mobilePhoneNumbersHelp"
         {% if value %}value="{{ value|json_encode }}"{% endif %}>
    </div>
{% endmacro %}