Skip to content
Extraits de code Groupes Projets
Valider 02a23fea rédigé par Thomas ZILLIOX's avatar Thomas ZILLIOX
Parcourir les fichiers

Remove styles tags from MobileMessagingSettings plugin

parent 342da9a4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -78,6 +78,7 @@ class Piwik_MobileMessaging extends Piwik_Plugin ...@@ -78,6 +78,7 @@ class Piwik_MobileMessaging extends Piwik_Plugin
return array( return array(
'AdminMenu.add' => 'addMenu', 'AdminMenu.add' => 'addMenu',
'AssetManager.getJsFiles' => 'getJsFiles', 'AssetManager.getJsFiles' => 'getJsFiles',
'AssetManager.getCssFiles' => 'getCssFiles',
'PDFReports.getReportParameters' => 'getReportParameters', 'PDFReports.getReportParameters' => 'getReportParameters',
'PDFReports.validateReportParameters' => 'validateReportParameters', 'PDFReports.validateReportParameters' => 'validateReportParameters',
'PDFReports.getReportMetadata' => 'getReportMetadata', 'PDFReports.getReportMetadata' => 'getReportMetadata',
...@@ -112,6 +113,16 @@ class Piwik_MobileMessaging extends Piwik_Plugin ...@@ -112,6 +113,16 @@ class Piwik_MobileMessaging extends Piwik_Plugin
$jsFiles[] = "plugins/MobileMessaging/javascripts/MobileMessagingSettings.js"; $jsFiles[] = "plugins/MobileMessaging/javascripts/MobileMessagingSettings.js";
} }
/**
* @param Piwik_Event_Notification $notification notification object
*/
function getCssFiles($notification)
{
$cssFiles = & $notification->getNotificationObject();
$cssFiles[] = "plugins/MobileMessaging/stylesheets/MobileMessagingSettings.css";
}
/** /**
* @param Piwik_Event_Notification $notification notification object * @param Piwik_Event_Notification $notification notification object
*/ */
......
#accountForm ul {
list-style: circle;
margin-left: 17px;
line-height: 1.5em;
}
.providerDescription {
border: 2px dashed #C5BDAD;
border-radius: 16px 16px 16px 16px;
margin-left: 24px;
padding: 11px;
width: 600px;
}
\ No newline at end of file
{% extends 'admin.twig' %} {% extends 'admin.twig' %}
{% block content %} {% block content %}
{{ loadJavascriptTranslations(['MobileMessaging'])|raw }} {{ loadJavascriptTranslations(['MobileMessaging'])|raw }}
<style>#accountForm ul {
list-style: circle;
margin-left: 17px;
line-height: 1.5em;
}
.providerDescription {
border: 2px dashed #C5BDAD;
border-radius: 16px 16px 16px 16px;
margin-left: 24px;
padding: 11px;
width: 600px;
}
</style>
{% if accountManagedByCurrentUser %}
<h2>{{ 'MobileMessaging_Settings_SMSAPIAccount'|translate }}</h2>
{% if credentialSupplied %}
{{ 'MobileMessaging_Settings_CredentialProvided'|translate(provider) }}
{{ creditLeft }}
<br/>
{{ 'MobileMessaging_Settings_UpdateOrDeleteAccount'|translate("<a id='displayAccountForm'>","</a>","<a id='deleteAccount'>","</a>") }}
{% else %}
{{ 'MobileMessaging_Settings_PleaseSignUp'|translate }}
{% endif %}
<div id='accountForm' {% if credentialSupplied %}style='display: none;'{% endif %}>
<br/>
{{ 'MobileMessaging_Settings_SMSProvider'|translate }}
<select id='smsProviders'>
{% for smsProvider, description in smsProviders %}
<option value='{{ smsProvider }}'>
{{ smsProvider }}
</option>
{% endfor %}
</select>
{{ 'MobileMessaging_Settings_APIKey'|translate }} {% if accountManagedByCurrentUser %}
<input size='25' id='apiKey'/> <h2>{{ 'MobileMessaging_Settings_SMSAPIAccount'|translate }}</h2>
{% if credentialSupplied %}
<input type='submit' value='{{ 'General_Save'|translate }}' id='apiAccountSubmit' class='submit'/> {{ 'MobileMessaging_Settings_CredentialProvided'|translate(provider) }}
{{ creditLeft }}
<br/>
{{ 'MobileMessaging_Settings_UpdateOrDeleteAccount'|translate("<a id='displayAccountForm'>","</a>","<a id='deleteAccount'>","</a>") }}
{% else %}
{{ 'MobileMessaging_Settings_PleaseSignUp'|translate }}
{% endif %}
<div id='accountForm' {% if credentialSupplied %}style='display: none;'{% endif %}>
<br/>
{{ 'MobileMessaging_Settings_SMSProvider'|translate }}
<select id='smsProviders'>
{% for smsProvider, description in smsProviders %}
<option value='{{ smsProvider }}'>
{{ smsProvider }}
</option>
{% endfor %}
</select>
{{ 'MobileMessaging_Settings_APIKey'|translate }}
<input size='25' id='apiKey'/>
<input type='submit' value='{{ 'General_Save'|translate }}' id='apiAccountSubmit' class='submit'/>
{% for smsProvider, description in smsProviders %} {% for smsProvider, description in smsProviders %}
<div class='providerDescription' id='{{ smsProvider }}'> <div class='providerDescription' id='{{ smsProvider }}'>
{{ description|raw }} {{ description|raw }}
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
{% import 'ajaxMacros.twig' as ajax %} {% import 'ajaxMacros.twig' as ajax %}
{{ ajax.errorDiv('ajaxErrorMobileMessagingSettings') }} {{ ajax.errorDiv('ajaxErrorMobileMessagingSettings') }}
<h2>{{ 'MobileMessaging_Settings_PhoneNumbers'|translate }}</h2> <h2>{{ 'MobileMessaging_Settings_PhoneNumbers'|translate }}</h2>
{% if not credentialSupplied %} {% if not credentialSupplied %}
{% if accountManagedByCurrentUser %} {% if accountManagedByCurrentUser %}
{{ 'MobileMessaging_Settings_CredentialNotProvided'|translate }} {{ 'MobileMessaging_Settings_CredentialNotProvided'|translate }}
{% else %}
{{ 'MobileMessaging_Settings_CredentialNotProvidedByAdmin'|translate }}
{% endif %}
{% else %} {% else %}
{{ 'MobileMessaging_Settings_CredentialNotProvidedByAdmin'|translate }} {{ 'MobileMessaging_Settings_PhoneNumbers_Help'|translate }}
{% endif %} <br/>
{% else %} <br/>
{{ 'MobileMessaging_Settings_PhoneNumbers_Help'|translate }} <table style="width:900px;" class="adminTable">
<br/> <tbody>
<br/> <tr>
<table style="width:900px;" class="adminTable"> <td style="width:480px">
<tbody> <strong>{{ 'MobileMessaging_Settings_PhoneNumbers_Add'|translate }}</strong>
<tr> <br/><br/>
<td style="width:480px">
<strong>{{ 'MobileMessaging_Settings_PhoneNumbers_Add'|translate }}</strong>
<br/><br/>
<span id='suspiciousPhoneNumber' style='display:none;'> <span id='suspiciousPhoneNumber' style='display:none;'>
{{ 'MobileMessaging_Settings_SuspiciousPhoneNumber'|translate('54184032') }} {{ 'MobileMessaging_Settings_SuspiciousPhoneNumber'|translate('54184032') }}
<br/><br/> <br/><br/>
</span> </span>
+ <input id='countryCallingCode' size='4' maxlength='4'/>&nbsp; + <input id='countryCallingCode' size='4' maxlength='4'/>&nbsp;
<input id='newPhoneNumber'/> <input id='newPhoneNumber'/>
<input type='submit' value='{{ 'MobileMessaging_Settings_AddPhoneNumber'|translate }}' id='addPhoneNumberSubmit' /> <input type='submit' value='{{ 'MobileMessaging_Settings_AddPhoneNumber'|translate }}'
<br/> id='addPhoneNumberSubmit'/>
<span style=' font-size: 11px;'><span class="form-description">{{ 'MobileMessaging_Settings_CountryCode'|translate }}</span>
<span class="form-description" style="margin-left:50px">{{ 'MobileMessaging_Settings_PhoneNumber'|translate }}</span></span>
<br/><br/>
{{ 'MobileMessaging_Settings_PhoneNumbers_CountryCode_Help'|translate }}
<select id='countries'>
{# this is a trick to avoid selecting the first country when no default could be found #}
<option value=''>&nbsp;</option>
{% for countryCode, country in countries %}
<option value='{{ country.countryCallingCode }}'
{% if defaultCountry==countryCode %} selected='selected' {% endif %}
>
{{ country.countryName|truncate(15) }}
</option>
{% endfor %}
</select>
</td>
<td style="width:220px">
{% import 'macros.twig' as piwik %}
{{ piwik.inlineHelp(strHelpAddPhone) }}
</td>
</tr>
<tr>
<td colspan="2">
{% if phoneNumbers|length > 0 %}
<br/>
<br/>
<strong>{{ 'MobileMessaging_Settings_ManagePhoneNumbers'|translate }}</strong>
<br/> <br/>
<br/>
{% endif %} <span style=' font-size: 11px;'><span
class="form-description">{{ 'MobileMessaging_Settings_CountryCode'|translate }}</span>
{{ ajax.errorDiv('invalidVerificationCodeAjaxError') }} <span class="form-description"
style="margin-left:50px">{{ 'MobileMessaging_Settings_PhoneNumber'|translate }}</span></span>
<div id='phoneNumberActivated' class="ajaxSuccess" style="display:none;"> <br/><br/>
{{ 'MobileMessaging_Settings_PhoneActivated'|translate }}
</div>
<div id='invalidActivationCode' style="display:none;">
{{ 'MobileMessaging_Settings_InvalidActivationCode'|translate }}
</div>
<ul> {{ 'MobileMessaging_Settings_PhoneNumbers_CountryCode_Help'|translate }}
{% for phoneNumber, validated in phoneNumbers %}
<li> <select id='countries'>
<span class='phoneNumber'>{{ phoneNumber }}</span> {# this is a trick to avoid selecting the first country when no default could be found #}
{% if not validated %} <option value=''>&nbsp;</option>
<input class='verificationCode'/> {% for countryCode, country in countries %}
<option value='{{ country.countryCallingCode }}'
{% if defaultCountry==countryCode %} selected='selected' {% endif %}
>
{{ country.countryName|truncate(15) }}
</option>
{% endfor %}
</select>
</td>
<td style="width:220px">
{% import 'macros.twig' as piwik %}
{{ piwik.inlineHelp(strHelpAddPhone) }}
</td>
</tr>
<tr>
<td colspan="2">
{% if phoneNumbers|length > 0 %}
<br/>
<br/>
<strong>{{ 'MobileMessaging_Settings_ManagePhoneNumbers'|translate }}</strong>
<br/>
<br/>
{% endif %}
{{ ajax.errorDiv('invalidVerificationCodeAjaxError') }}
<div id='phoneNumberActivated' class="ajaxSuccess" style="display:none;">
{{ 'MobileMessaging_Settings_PhoneActivated'|translate }}
</div>
<div id='invalidActivationCode' style="display:none;">
{{ 'MobileMessaging_Settings_InvalidActivationCode'|translate }}
</div>
<ul>
{% for phoneNumber, validated in phoneNumbers %}
<li>
<span class='phoneNumber'>{{ phoneNumber }}</span>
{% if not validated %}
<input class='verificationCode'/>
<input
type='submit'
value='{{ 'MobileMessaging_Settings_ValidatePhoneNumber'|translate }}'
class='validatePhoneNumberSubmit'
/>
{% endif %}
<input <input
type='submit' type='submit'
value='{{ 'MobileMessaging_Settings_ValidatePhoneNumber'|translate }}' value='{{ 'MobileMessaging_Settings_RemovePhoneNumber'|translate }}'
class='validatePhoneNumberSubmit' class='removePhoneNumberSubmit'
/> />
{% endif %} {% if not validated %}
<input <br/>
type='submit' <span class='form-description'>{{ 'MobileMessaging_Settings_VerificationCodeJustSent'|translate }}</span>
value='{{ 'MobileMessaging_Settings_RemovePhoneNumber'|translate }}' {% endif %}
class='removePhoneNumberSubmit'
/>
{% if not validated %}
<br/> <br/>
<span class='form-description'>{{ 'MobileMessaging_Settings_VerificationCodeJustSent'|translate }}</span> <br/>
{% endif %} </li>
<br/> {% endfor %}
</ul>
</td>
</tr>
</tbody>
</table>
{% endif %}
{% if isSuperUser %}
<h2>{{ 'MobileMessaging_Settings_SuperAdmin'|translate }}</h2>
<table class='adminTable' style='width:650px;'>
<tr>
<td style='width:400px'>{{ 'MobileMessaging_Settings_LetUsersManageAPICredential'|translate }}</td>
<td style='width:250px'>
<fieldset>
<label>
<input
type='radio'
value='false'
name='delegatedManagement' {% if not delegatedManagement %} checked='checked'{% endif %} />
{{ 'General_No'|translate }}
<br/> <br/>
</li>
{% endfor %}
</ul>
</td>
</tr>
</tbody>
</table>
{% endif %}
{% if isSuperUser %}
<h2>{{ 'MobileMessaging_Settings_SuperAdmin'|translate }}</h2>
<table class='adminTable' style='width:650px;'>
<tr>
<td style='width:400px'>{{ 'MobileMessaging_Settings_LetUsersManageAPICredential'|translate }}</td>
<td style='width:250px'>
<fieldset>
<label>
<input
type='radio'
value='false'
name='delegatedManagement' {% if not delegatedManagement %} checked='checked'{% endif %} />
{{ 'General_No'|translate }}
<br/>
<span class='form-description'> <span class='form-description'>
({{ 'General_Default'|translate }}) {{ 'MobileMessaging_Settings_LetUsersManageAPICredential_No_Help'|translate }} ({{ 'General_Default'|translate }}
) {{ 'MobileMessaging_Settings_LetUsersManageAPICredential_No_Help'|translate }}
</span> </span>
</label> </label>
<br/>
<br/>
<label>
<input
type='radio'
value='true'
name='delegatedManagement' {% if delegatedManagement %} checked='checked'{% endif %} />
{{ 'General_Yes'|translate }}
<br/> <br/>
<span class='form-description'>{{ 'MobileMessaging_Settings_LetUsersManageAPICredential_Yes_Help'|translate }}</span> <br/>
</label> <label>
<input
type='radio'
value='true'
name='delegatedManagement' {% if delegatedManagement %} checked='checked'{% endif %} />
{{ 'General_Yes'|translate }}
<br/>
<span class='form-description'>{{ 'MobileMessaging_Settings_LetUsersManageAPICredential_Yes_Help'|translate }}</span>
</label>
</fieldset> </fieldset>
</tr> </tr>
</table> </table>
{% endif %} {% endif %}
{{ ajax.loadingDiv('ajaxLoadingMobileMessagingSettings') }} {{ ajax.loadingDiv('ajaxLoadingMobileMessagingSettings') }}
<div class='ui-confirm' id='confirmDeleteAccount'> <div class='ui-confirm' id='confirmDeleteAccount'>
<h2>{{ 'MobileMessaging_Settings_DeleteAccountConfirm'|translate }}</h2> <h2>{{ 'MobileMessaging_Settings_DeleteAccountConfirm'|translate }}</h2>
<input role='yes' type='button' value='{{ 'General_Yes'|translate }}'/> <input role='yes' type='button' value='{{ 'General_Yes'|translate }}'/>
<input role='no' type='button' value='{{ 'General_No'|translate }}'/> <input role='no' type='button' value='{{ 'General_No'|translate }}'/>
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter