From cca3c704a34e0a063fbf2e1f1b08fae4dee466a7 Mon Sep 17 00:00:00 2001 From: Romaldy Minaya Date: Fri, 23 Nov 2018 02:33:01 -0400 Subject: [PATCH] Fixes #3119 (#3163) Added readOnly support to RecordFinder, Switch widget and relation widget including dropdown Fixes #3119. Credit to @romaldyminaya --- .../formwidgets/recordfinder/partials/_container.htm | 4 ++-- .../recordfinder/partials/_recordfinder.htm | 10 ++++++++-- .../widgets/form/partials/_field_dropdown.htm | 12 ++++++++++-- .../backend/widgets/form/partials/_field_switch.htm | 12 +++++++++--- modules/system/assets/ui/less/form.base.less | 2 +- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/modules/backend/formwidgets/recordfinder/partials/_container.htm b/modules/backend/formwidgets/recordfinder/partials/_container.htm index 98f8ff394..d01915cdc 100644 --- a/modules/backend/formwidgets/recordfinder/partials/_container.htm +++ b/modules/backend/formwidgets/recordfinder/partials/_container.htm @@ -1,6 +1,6 @@ previewMode && !$value): ?> - + @@ -8,4 +8,4 @@ makePartial('recordfinder') ?> - \ No newline at end of file + diff --git a/modules/backend/formwidgets/recordfinder/partials/_recordfinder.htm b/modules/backend/formwidgets/recordfinder/partials/_recordfinder.htm index f70823bed..8ebb2dd70 100644 --- a/modules/backend/formwidgets/recordfinder/partials/_recordfinder.htm +++ b/modules/backend/formwidgets/recordfinder/partials/_recordfinder.htm @@ -1,10 +1,16 @@ +previewMode || $field->readOnly) { + $previewMode = true; + } +?>
- + > @@ -15,7 +21,7 @@ - previewMode): ?> +