When Cookies are disabled then show message instead a the form to create poll
This commit is contained in:
parent
60f340f65f
commit
818151fe83
@ -294,17 +294,43 @@ echo '
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>
|
||||||
|
<noscript>
|
||||||
|
<div class="alert alert-danger">'.
|
||||||
|
_('Javascript is disabled on your browser. Its activation is required to create a poll.')
|
||||||
|
.'</div>
|
||||||
|
</noscript>
|
||||||
|
<div id="cookie-warning" class="alert alert-danger" style="display:none">'.
|
||||||
|
_('Cookies are disabled on your browser. Theirs activation is required to create a poll.')
|
||||||
|
.'</div>
|
||||||
|
';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("form-block").setAttribute("style", "");
|
// Check Javascript is enabled, if it is it will execute this script
|
||||||
|
(function() {
|
||||||
|
// Check cookies are enabled too
|
||||||
|
var cookieEnabled = function() {
|
||||||
|
var cookieEnabled = navigator.cookieEnabled;
|
||||||
|
|
||||||
|
// if not IE4+ nor NS6+
|
||||||
|
if (!cookieEnabled && typeof navigator.cookieEnabled === "undefined"){
|
||||||
|
document.cookie = "testcookie"
|
||||||
|
cookieEnabled = document.cookie.indexOf("testcookie") != -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cookieEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cookieEnabled()) {
|
||||||
|
// Show the form block
|
||||||
|
document.getElementById("form-block").setAttribute("style", "");
|
||||||
|
} else {
|
||||||
|
// Show the warning about cookies
|
||||||
|
document.getElementById("cookie-warning").setAttribute("style", "");
|
||||||
|
}
|
||||||
|
})();
|
||||||
</script>
|
</script>
|
||||||
<noscript>
|
|
||||||
<div class="alert alert-danger">'.
|
|
||||||
_('Javascript is disabled on your browser. Its activation is required to create a poll.')
|
|
||||||
.'</div>
|
|
||||||
</noscript>
|
|
||||||
';
|
';
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
@ -430,6 +430,9 @@ msgstr "Weiter zum 2. Schritt"
|
|||||||
msgid "Javascript is disabled on your browser. Its activation is required to create a poll."
|
msgid "Javascript is disabled on your browser. Its activation is required to create a poll."
|
||||||
msgstr "Javascript ist in Ihrem Browser deaktiviert. Seine Aktivierung ist erforderlich, um eine Umfrage zu erstellen."
|
msgstr "Javascript ist in Ihrem Browser deaktiviert. Seine Aktivierung ist erforderlich, um eine Umfrage zu erstellen."
|
||||||
|
|
||||||
|
msgid "Cookies are disabled on your browser. Theirs activation is required to create a poll."
|
||||||
|
msgstr "Cookies werden auf Ihrem Browser deaktiviert. Deren Aktivierung ist erforderlich, um eine Umfrage zu erstellen."
|
||||||
|
|
||||||
# Errors info_sondage.php
|
# Errors info_sondage.php
|
||||||
msgid "Enter a title"
|
msgid "Enter a title"
|
||||||
msgstr "Titel eingeben"
|
msgstr "Titel eingeben"
|
||||||
|
Binary file not shown.
@ -457,6 +457,9 @@ msgstr "Go to step 2"
|
|||||||
msgid "Javascript is disabled on your browser. Its activation is required to create a poll."
|
msgid "Javascript is disabled on your browser. Its activation is required to create a poll."
|
||||||
msgstr "Javascript is disabled on your browser. Its activation is required to create a poll."
|
msgstr "Javascript is disabled on your browser. Its activation is required to create a poll."
|
||||||
|
|
||||||
|
msgid "Cookies are disabled on your browser. Theirs activation is required to create a poll."
|
||||||
|
msgstr "Cookies are disabled on your browser. Theirs activation is required to create a poll."
|
||||||
|
|
||||||
# Errors info_sondage.php
|
# Errors info_sondage.php
|
||||||
msgid "Enter a title"
|
msgid "Enter a title"
|
||||||
msgstr "Enter a title"
|
msgstr "Enter a title"
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -455,7 +455,10 @@ msgid "Go to step 2"
|
|||||||
msgstr "Aller à l'étape 2"
|
msgstr "Aller à l'étape 2"
|
||||||
|
|
||||||
msgid "Javascript is disabled on your browser. Its activation is required to create a poll."
|
msgid "Javascript is disabled on your browser. Its activation is required to create a poll."
|
||||||
msgstr "Javascript semble désactivé sur votre navigateur. Son activation est requise pour la création d'un sondage."
|
msgstr "Javascript est désactivé sur votre navigateur. Son activation est requise pour la création d'un sondage."
|
||||||
|
|
||||||
|
msgid "Cookies are disabled on your browser. Theirs activation is required to create a poll."
|
||||||
|
msgstr "Les cookies sont désactivés sur votre navigateur. Leur activation est requise pour la création d'un sondage."
|
||||||
|
|
||||||
# Errors info_sondage.php
|
# Errors info_sondage.php
|
||||||
msgid "Enter a title"
|
msgid "Enter a title"
|
||||||
|
Loading…
Reference in New Issue
Block a user