From 27cee8aed0bbf724bda8eb67ec8e390d524e7cc1 Mon Sep 17 00:00:00 2001 From: Brandon Kelly Date: Fri, 11 Sep 2020 12:05:55 -0700 Subject: [PATCH] "Save and continue editing" for Edit Field pages Resolves #2872 --- CHANGELOG.md | 1 + src/templates/settings/fields/_edit.html | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b95d8e0cea..9b2459c8930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased ### Added +- Edit Field pages now have a “Save and continue editing” Save menu option, and the Ctrl/Command + S keyboard shortcut is now assigned to that. ([#2872](https://github.com/craftcms/cms/issues/2872)) - Added `craft\fields\data\OptionData::$valid`. - Added `craft\web\Request::$generalConfig`. - Added `craft\web\Request::$sites`. diff --git a/src/templates/settings/fields/_edit.html b/src/templates/settings/fields/_edit.html index e50e8e26428..5534c1e8155 100644 --- a/src/templates/settings/fields/_edit.html +++ b/src/templates/settings/fields/_edit.html @@ -1,5 +1,13 @@ {% extends "_layouts/cp" %} {% set fullPageForm = true %} +{% set formActions = [ + { + label: 'Save and continue editing'|t('app'), + redirect: 'settings/fields/edit/{id}'|hash, + shortcut: true, + retainScroll: true, + }, +] %} {% import "_includes/forms" as forms %}