From 3135aaa7308e3566dad4c52c81119b4d8f7d8635 Mon Sep 17 00:00:00 2001 From: Ben Dubuisson Date: Fri, 12 Feb 2016 16:42:15 +1300 Subject: [PATCH] clarify explanations under from and to fields, set default dropdown to Vanity --- code/RedirectUrl.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/code/RedirectUrl.php b/code/RedirectUrl.php index 267908a..c511fed 100644 --- a/code/RedirectUrl.php +++ b/code/RedirectUrl.php @@ -67,12 +67,18 @@ public function getCMSFields() { $fields = new FieldList(); + $from = new TextField('From', 'From'); + $from->setRightTitle('(e.g "/my-page/")- always include the /'); + $to = new TextField('To', 'To'); + $to->setRightTitle('e.g "/my-page/" for internal pages or "http://google.com/" for external websites (and include the scheme - http:// or https://)'); + $fields->push($manual = new ToggleCompositeField( 'TextLinks', 'Enter urls', [ - new TextField('From', 'From url (e.g. "/my-page/")'), - new TextField('To', 'To url (e.g. "/my-page/", "http://google.com/")') + $from, + $to + ] )); @@ -89,8 +95,9 @@ public function getCMSFields() 'Type', 'Type', [ - 'Permanent' => 'Permanent', - 'Vanity' => 'Vanity' + 'Vanity' => 'Vanity', + 'Permanent' => 'Permanent' + ] ));