diff --git a/modules/negotiate/templates/disable.php b/modules/negotiate/templates/disable.php
index cffa20c76097bc95e26c026e43a003d1d27fc4e4..f9e2d55082eebd2a5e4efe9c84eecaebb1833a09 100644
--- a/modules/negotiate/templates/disable.php
+++ b/modules/negotiate/templates/disable.php
@@ -10,10 +10,7 @@
 $this->includeAtTemplateBase('includes/header.php');
 ?>
 <h1><?php echo $this->t('{negotiate:negotiate:disable_title}'); ?></h1>
-<?php
-$url = SimpleSAML\Module::getModuleURL('negotiate/enable.php');
-?>
-<?php echo $this->t('{negotiate:negotiate:disable_info_pre}', array('URL' => htmlspecialchars($url))); ?>
+<?php echo $this->t('{negotiate:negotiate:disable_info_pre}', array('URL' => htmlspecialchars($this->data['url']))); ?>
 
 <?php echo $this->t('{negotiate:negotiate:info_post}'); ?>
 
diff --git a/modules/negotiate/templates/enable.php b/modules/negotiate/templates/enable.php
index 225597b1604b670858376d8775dc00e0caf58631..939af6fb6d828aedd6d178970fa803e064cc099a 100644
--- a/modules/negotiate/templates/enable.php
+++ b/modules/negotiate/templates/enable.php
@@ -11,10 +11,7 @@ $this->includeAtTemplateBase('includes/header.php');
 ?>
 <h1><?php echo $this->t('{negotiate:negotiate:enable_title}'); ?></h1>
 
-<?php
-$url = SimpleSAML\Module::getModuleURL('negotiate/disable.php');
-?>
-<?php echo $this->t('{negotiate:negotiate:enable_info_pre}', array('URL' => htmlspecialchars($url))); ?>
+<?php echo $this->t('{negotiate:negotiate:enable_info_pre}', array('URL' => htmlspecialchars($this->data['url']))); ?>
 
 <?php echo $this->t('{negotiate:negotiate:info_post}'); ?>
 
diff --git a/modules/negotiate/www/disable.php b/modules/negotiate/www/disable.php
index e392cac0572cddd2afe720717d7592b6eed47e7e..9cf8c592bfade86c515c6cec924a925ffe5f3a74 100644
--- a/modules/negotiate/www/disable.php
+++ b/modules/negotiate/www/disable.php
@@ -19,4 +19,5 @@ $globalConfig = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 $session->setData('negotiate:disable', 'session', FALSE, 24*60*60);
 $t = new SimpleSAML_XHTML_Template($globalConfig, 'negotiate:disable.php');
+$t->data['url'] = SimpleSAML\Module::getModuleURL('negotiate/enable.php');
 $t->show();
diff --git a/modules/negotiate/www/enable.php b/modules/negotiate/www/enable.php
index c58159cfe469d59336c838308f02089180e61dfa..04c5e16ffc17c2a40fa5a3849e836b3d3efa8a73 100644
--- a/modules/negotiate/www/enable.php
+++ b/modules/negotiate/www/enable.php
@@ -9,8 +9,8 @@
  */
 
 $params = array(
-	'secure' => FALSE,
-	'httponly' => TRUE,
+    'secure' => FALSE,
+    'httponly' => TRUE,
 );
 \SimpleSAML\Utils\HTTP::setCookie('NEGOTIATE_AUTOLOGIN_DISABLE_PERMANENT', NULL, $params, FALSE);
 
@@ -18,4 +18,5 @@ $globalConfig = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 $session->setData('negotiate:disable', 'session', FALSE, 24*60*60);
 $t = new SimpleSAML_XHTML_Template($globalConfig, 'negotiate:enable.php');
+$t->data['url'] = SimpleSAML\Module::getModuleURL('negotiate/disable.php');
 $t->show();