From 239db7b0d9b57d04ce56961f0e53aad3f0dc866b Mon Sep 17 00:00:00 2001 From: Hanne Moa <hanne.moa@uninett.no> Date: Fri, 28 Oct 2016 10:39:45 +0200 Subject: [PATCH] Move context-changing function out of template For #454 and #465 --- modules/consentAdmin/templates/consentadmin.php | 4 ---- modules/consentAdmin/www/consentAdmin.php | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/consentAdmin/templates/consentadmin.php b/modules/consentAdmin/templates/consentadmin.php index 015c44e28..7baec47f9 100644 --- a/modules/consentAdmin/templates/consentadmin.php +++ b/modules/consentAdmin/templates/consentadmin.php @@ -1,9 +1,5 @@ <?php $this->includeAtTemplateBase('includes/header.php'); ?> <!-- default theme --> -<?php -$this->getTranslator()->includeLanguageFile('attributes.php'); // attribute listings translated by this dictionary - -?> <script> function setConsentText(consentStatus, show_spid) { diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php index 3982853ff..cf79cbfbb 100644 --- a/modules/consentAdmin/www/consentAdmin.php +++ b/modules/consentAdmin/www/consentAdmin.php @@ -187,6 +187,7 @@ if ($action !== null && $sp_entityid !== null) { } // init template to enable translation of status messages $template = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadminajax.php', 'consentAdmin:consentadmin'); + $template->getTranslator()->includeLanguageFile('attributes.php'); // attribute listings translated by this dictionary $template->data['res'] = $res; $template->show(); exit; -- GitLab