From e002f156a8d7c06679e98f56deedee78eb5461df Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Thu, 25 Jul 2019 14:42:41 +1200 Subject: [PATCH 1/2] FIX: CSS path With the current version of Silverstripe 4, the css can be found in `/resources/vendor/jaedb/iconfield/css/IconField.css` --- code/IconField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/IconField.php b/code/IconField.php index 491d2d7..312e491 100755 --- a/code/IconField.php +++ b/code/IconField.php @@ -48,7 +48,7 @@ public function __construct($name, $title = null, $sourceFolder = null){ } $this->source = $icons; - Requirements::css('/resources/jaedb/iconfield/css/IconField.css'); + Requirements::css('/resources/vendor/jaedb/iconfield/css/IconField.css'); } From 91792f8f23cccd25d3a0c4505f6c057cf56287d7 Mon Sep 17 00:00:00 2001 From: Garry Yeatman Date: Tue, 13 Aug 2019 11:41:59 +1200 Subject: [PATCH 2/2] Adding a fix for no-icon and multiple icon fields in one cms tab --- code/IconField.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/IconField.php b/code/IconField.php index 312e491..991c6c4 100755 --- a/code/IconField.php +++ b/code/IconField.php @@ -63,8 +63,9 @@ public function Field($properties = array()) { $options = array(); // Add a clear option + $itemID = $this->ID() . '_' . preg_replace('/[^a-zA-Z0-9]/', '', 'none'); $options[] = ArrayData::create(array( - 'ID' => 'none', + 'ID' => $itemID, 'Name' => $this->name, 'Value' => '', 'Title' => '',