Commit 6f7514f5 authored by 11nd11's avatar 11nd11 Committed by waldhacker
Browse files

[TASK] Streamline duplicate-form-wizard

Streamline the first step of the duplicate-form-wizard
to the new layout of new-form-wizard.

Resolves: #97506
Releases: main
Change-Id: I31482b6cf8c188ece8821aa3a4b2e1cf0da4fe09
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74480


Tested-by: Björn Jacob's avatarBjörn Jacob <bjoern.jacob@tritum.de>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: waldhacker's avatarwaldhacker <hello@waldhacker.dev>
Reviewed-by: Björn Jacob's avatarBjörn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: waldhacker's avatarwaldhacker <hello@waldhacker.dev>
parent 98fe0595
...@@ -238,7 +238,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur ...@@ -238,7 +238,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur
} else { } else {
html += '<h5 class="form-section-headline">' + TYPO3.lang['formManager.predefinedForm.label'] + '</h5>' html += '<h5 class="form-section-headline">' + TYPO3.lang['formManager.predefinedForm.label'] + '</h5>'
if (prototypes.length > 1) { if (prototypes.length > 1) {
html += '<div class="form-group">' html += '<div class="mb-3">'
+ '<label for="new-form-prototype-name">' + '<strong>' + TYPO3.lang['formManager.form_prototype'] + '</strong>' + '</label>' + '<label for="new-form-prototype-name">' + '<strong>' + TYPO3.lang['formManager.form_prototype'] + '</strong>' + '</label>'
+ '<div class="formengine-field-item t3js-formengine-field-item">' + '<div class="formengine-field-item t3js-formengine-field-item">'
+ '<div class="form-control-wrap">' + $(prototypeNameSelect)[0].outerHTML + '</div>' + '<div class="form-control-wrap">' + $(prototypeNameSelect)[0].outerHTML + '</div>'
...@@ -247,7 +247,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur ...@@ -247,7 +247,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur
} }
if (templates.length > 1) { if (templates.length > 1) {
html += '<div class="form-group">' html += '<div class="mb-3">'
+ '<label for="new-form-template">' + '<strong>' + TYPO3.lang['formManager.form_template'] + '</strong>' + '</label>' + '<label for="new-form-template">' + '<strong>' + TYPO3.lang['formManager.form_template'] + '</strong>' + '</label>'
+ '<div class="formengine-field-item t3js-formengine-field-item">' + '<div class="formengine-field-item t3js-formengine-field-item">'
+ '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_template_description'] + '</span>' + '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_template_description'] + '</span>'
...@@ -257,7 +257,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur ...@@ -257,7 +257,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur
} }
} }
html += '<div class="form-group">' html += '<div class="mb-3">'
+ '<label for="new-form-name">' + '<strong>' + TYPO3.lang['formManager.form_name'] + '</strong>' + '</label>' + '<label for="new-form-name">' + '<strong>' + TYPO3.lang['formManager.form_name'] + '</strong>' + '</label>'
+ '<div class="formengine-field-item t3js-formengine-field-item">' + '<div class="formengine-field-item t3js-formengine-field-item">'
+ '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_name_description'] + '</span>' + '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_name_description'] + '</span>'
...@@ -279,7 +279,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur ...@@ -279,7 +279,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur
+ '</div>'; + '</div>';
if (savePathSelect) { if (savePathSelect) {
html += '<div class="form-group">' html += '<div class="mb-3">'
+ '<label for="new-form-save-path">' + '<strong>' + TYPO3.lang['formManager.form_save_path'] + '</strong>' + '</label>' + '<label for="new-form-save-path">' + '<strong>' + TYPO3.lang['formManager.form_save_path'] + '</strong>' + '</label>'
+ '<div class="formengine-field-item t3js-formengine-field-item">' + '<div class="formengine-field-item t3js-formengine-field-item">'
+ '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_save_path_description'] + '</span>' + '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_save_path_description'] + '</span>'
...@@ -577,7 +577,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur ...@@ -577,7 +577,7 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur
MultiStepWizard.set('formPersistenceIdentifier', that.data('formPersistenceIdentifier')); MultiStepWizard.set('formPersistenceIdentifier', that.data('formPersistenceIdentifier'));
MultiStepWizard.set('savePath', folders[0]['value']); MultiStepWizard.set('savePath', folders[0]['value']);
if (folders.length > 1) { if (folders.length > 1) {
savePathSelect = $('<select class="duplicate-form-save-path form-select" data-identifier="duplicateFormSavePath" />'); savePathSelect = $('<select id="duplicate-form-save-path" class="form-select" data-identifier="duplicateFormSavePath" />');
for (var i = 0, len = folders.length; i < len; ++i) { for (var i = 0, len = folders.length; i < len; ++i) {
var option = new Option(folders[i]['label'], folders[i]['value']); var option = new Option(folders[i]['label'], folders[i]['value']);
$(savePathSelect).append(option); $(savePathSelect).append(option);
...@@ -585,16 +585,28 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur ...@@ -585,16 +585,28 @@ function factory($, Modal, Severity, MultiStepWizard, Icons, Notification, Secur
} }
html = '<div class="duplicate-form-modal">' html = '<div class="duplicate-form-modal">'
+ '<div class="row mb-3">' + '<h5 class="form-section-headline">' + TYPO3.lang['formManager.new_form_name'] + '</h5>'
+ '<label class="col-4 col-form-label">' + TYPO3.lang['formManager.new_form_name'] + '</label>' + '<div class="mb-3">'
+ '<div class="col-8"><input class="duplicate-form-name form-control has-error" data-identifier="duplicateFormName" /></div>'; + '<label for="duplicate-form-name">' + '<strong>' + TYPO3.lang['formManager.form_name'] + '</strong>' + '</label>'
+ '<div class="formengine-field-item t3js-formengine-field-item">'
+ '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_name_description'] + '</span>'
+ '<div class="form-control-wrap">'
+ '<input id="duplicate-form-name" class="form-control has-error" data-identifier="duplicateFormName" />'
+ '</div>'
+ '</div>'
+ '</div>';
if (savePathSelect) { if (savePathSelect) {
html += '<label class="col col-form-label">' + TYPO3.lang['formManager.form_save_path'] + '</label>' + $(savePathSelect)[0].outerHTML; html += '<div class="mb-3">'
+ '<label for="duplicate-form-save-path">' + '<strong>' + TYPO3.lang['formManager.form_save_path'] + '</strong>' + '</label>'
+ '<div class="formengine-field-item t3js-formengine-field-item">'
+ '<span class="formengine-field-item-description text-muted">' + TYPO3.lang['formManager.form_save_path_description'] + '</span>'
+ '<div class="form-control-wrap">' + $(savePathSelect)[0].outerHTML + '</div>'
+ '</div>'
+ '</div>';
} }
html += '</div>' html += '</div>';
+ '</div>';
slide.html(html); slide.html(html);
$(getDomElementIdentifier('duplicateFormName'), modal).focus(); $(getDomElementIdentifier('duplicateFormName'), modal).focus();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment