Skip to content
Snippets Groups Projects
Commit 9427ded8 authored by Alex Arnaud's avatar Alex Arnaud
Browse files

hotline#18411 Fix script that redirect to vodeclic

parent 764552e5
5 merge requests!715Master,!628Master,!612Master,!611Hotline 6.59,!597Hotline#18411 fix redirect script for vodeclic
- ticket 18411: Corrige le script de redirection vers la plateforme vodeclic
\ No newline at end of file
......@@ -23,6 +23,7 @@ class ZendAfi_View_Helper_TagFormationVodeclic extends ZendAfi_View_Helper_TagRe
use Trait_Translator;
public function tagFormationVodeclic($album) {
xdebug_break();
$current_user = Class_Users::getIdentity();
if (!$this->canAccessRessourceNumerique())
return '<p>'.$this->_('Vous devez être connecté sous un compte avec abonnement valide pour pouvoir accéder à la formation').'</p>';
......@@ -33,7 +34,8 @@ class ZendAfi_View_Helper_TagFormationVodeclic extends ZendAfi_View_Helper_TagRe
$vodeclic = Class_VodeclicLink::forUser($current_user);
Class_ScriptLoader::getInstance()
->addInlineScript("$('.vodeclic_link').click(function(){".
->addInlineScript("$( document ).ready(function() {".
"$('.vodeclic_link').click(function(){".
"var vodeclic_window = window.open('');".
"vodeclic_window.document.write(".
"\"Veuillez patienter. Connexion en cours...".
......@@ -45,7 +47,7 @@ class ZendAfi_View_Helper_TagFormationVodeclic extends ZendAfi_View_Helper_TagRe
"vodeclic_window.location = \"$url_album\";".
"img_patience.hide();".
"},5000);".
"})");
"})})");
return '<button class="vodeclic_link">Accéder à la formation</button>'.
'<img style="display:none" src="'.URL_ADMIN_IMG.'patience.gif">';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment