From 6a6f8c80dd159156335fc716bcb514a27e0ccfbb Mon Sep 17 00:00:00 2001
From: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Date: Sun, 4 Oct 2015 17:10:51 +0200
Subject: [PATCH] [TASK] EXT:form - Add HTML4 / HTML5 attributes for RADIO to
 wizard

Add new attributes to the wizard element RADIO.

Resolves: #70342
Releases: master
Change-Id: I04e0b3601791bf7d70739472276691529da13cf0
Reviewed-on: http://review.typo3.org/43786
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
---
 .../Domain/Model/Json/RadioJsonElement.php    | 17 +++++++--
 .../JavaScript/Wizard/Elements/Basic/Radio.js | 37 ++++++++++++-------
 2 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/typo3/sysext/form/Classes/Domain/Model/Json/RadioJsonElement.php b/typo3/sysext/form/Classes/Domain/Model/Json/RadioJsonElement.php
index a77765e484e4..33f12add27f4 100644
--- a/typo3/sysext/form/Classes/Domain/Model/Json/RadioJsonElement.php
+++ b/typo3/sysext/form/Classes/Domain/Model/Json/RadioJsonElement.php
@@ -50,16 +50,27 @@ class RadioJsonElement extends \TYPO3\CMS\Form\Domain\Model\Json\AbstractJsonEle
 	 */
 	protected $allowedAttributes = array(
 		'accesskey',
-		'alt',
 		'class',
+		'contenteditable',
+		'contextmenu',
 		'dir',
-		'disabled',
+		'draggable',
+		'dropzone',
+		'hidden',
 		'id',
 		'lang',
-		'name',
+		'spellcheck',
 		'style',
 		'tabindex',
 		'title',
+		'translate',
+		/* element specific attributes */
+		'autofocus',
+		'checked',
+		'disabled',
+		'name',
+		'readonly',
+		'required',
 		'type',
 		'value'
 	);
diff --git a/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Elements/Basic/Radio.js b/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Elements/Basic/Radio.js
index 616a3ffd1575..b5cf1d6711fc 100644
--- a/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Elements/Basic/Radio.js
+++ b/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Elements/Basic/Radio.js
@@ -70,19 +70,30 @@ TYPO3.Form.Wizard.Elements.Basic.Radio = Ext.extend(TYPO3.Form.Wizard.Elements,
 		Ext.apply(this, {
 			configuration: {
 				attributes: {
-					accesskey: '',
-					alt: '',
-					"class": '',
-					dir: '',
-					disabled: '',
-					id: '',
-					lang: '',
-					name: '',
-					style: '',
-					tabindex: '',
-					title: '',
-					type: 'radio',
-					value: ''
+					'accesskey': '',
+					'class': '',
+					'contenteditable': '',
+					'contextmenu': '',
+					'dir': '',
+					'draggable': '',
+					'dropzone': '',
+					'hidden': '',
+					'id': '',
+					'lang': '',
+					'spellcheck': '',
+					'style': '',
+					'tabindex': '',
+					'title': '',
+					'translate': '',
+
+					'autofocus': '',
+					'checked': '',
+					'disabled': '',
+					'name': '',
+					'readonly': '',
+					'required': '',
+					'type': 'radio',
+					'value': ''
 				},
 				filters: {},
 				label: {
-- 
GitLab