From 6d38df65b4e1af746b6df14c62911b7f5748106c Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Tue, 23 Apr 2019 06:29:02 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#857 --- .../ProcessPageEditLink.module | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module b/wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module index 3d90cd87..6d6ef622 100644 --- a/wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module +++ b/wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module @@ -30,9 +30,23 @@ class ProcessPageEditLink extends Process implements ConfigurableModule { 'icon' => 'link', ); } - + + /** + * URL type: Absolute path from root (no relative paths) + * + */ const urlTypeAbsolute = 0; - const urlTypeRelativeBranch = 1; + + /** + * URL type: Relative path in same branch only + * + */ + const urlTypeRelativeBranch = 1; + + /** + * URL type: Relative path always + * + */ const urlTypeRelativeAll = 2; /** @@ -477,7 +491,7 @@ class ProcessPageEditLink extends Process implements ConfigurableModule { $f = $this->wire('modules')->get('InputfieldRadios'); $f->attr('name', 'urlType'); $f->label = $this->_('URL type for page links'); - $f->addOption(self::urlTypeAbsolute, $this->_('Absolute (default)')); + $f->addOption(self::urlTypeAbsolute, $this->_('Full/absolute path from root (default)')); $f->addOption(self::urlTypeRelativeBranch, $this->_('Relative URLs in the same branches only') . '*'); $f->addOption(self::urlTypeRelativeAll, $this->_('Relative URLs always') . '*'); $f->attr('value', isset($data['urlType']) ? $data['urlType'] : self::urlTypeAbsolute);