Skip to content
Snippets Groups Projects
Commit e67651d6 authored by Björn Jacob's avatar Björn Jacob Committed by Georg Ringer
Browse files

[TASK] Remove deprecated IMAGEBUTTON element

The IMAGEBUTTON element is removed.

Resolves: #77345
Releases: master
Change-Id: If7103884c4150ec4eaac53bb3e3ed0df1833374a
Reviewed-on: https://review.typo3.org/49320


Tested-by: default avatarBamboo TYPO3com <info@typo3.com>
Reviewed-by: default avatarFrederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: default avatarSebastian Bumann <bumann.sebastian@gmail.com>
Tested-by: default avatarSebastian Bumann <bumann.sebastian@gmail.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 6544928b
Branches
Tags
No related merge requests found
===================================================================
Breaking: #77345 - EXT:form - Remove deprecated IMAGEBUTTON element
===================================================================
Description
===========
The IMAGEBUTTON element was deprecated in TYPO3 v7 and has been removed in TYPO3 v8.
Impact
======
Using the IMAGEBUTTON element is not working anymore, i.e. no IMAGEBUTTON element will be rendered.
Affected Installations
======================
All installations using the IMAGEBUTTON element.
Migration
=========
Remove all occurences of the IMAGEBUTTON element.
......@@ -253,10 +253,6 @@ class FormBuilder
{
// @todo Check $userConfiguredElementTypoScript
if ($elementType === 'IMAGEBUTTON') {
GeneralUtility::deprecationLog('EXT:form: The element IMAGEBUTTON is deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8.');
}
$element->setElementType($elementType);
$element->setElementCounter($this->elementCounter->getElementId());
......
......@@ -33,7 +33,6 @@ class TypoScriptToJsonConverter
'FILEUPLOAD',
'HEADER',
'HIDDEN',
'IMAGEBUTTON',
'OPTGROUP',
'OPTION',
'PASSWORD',
......
plugin.tx_form {
# elementPartials
# Used by: frontend, wizard (not implemented right now)
# Overwritable by user: FALSE
#
# Defines the template selection array for the form wizard.
# Each defined item is shown as option within the wizard.
#
# If there is no partialPath property in the userdefined TypoScript
# then elementPartials.ELEMENTNAME.10.partialPath is the default.
view {
elementPartials {
IMAGEBUTTON {
10 {
displayName = Default
partialPath = FlatElements/Imagebutton
}
}
}
}
settings {
registeredElements {
# IMAGEBUTTON
# Used by: frontend, wizard (not implemented right now)
# Used ViewHelper: f:form.textfield
# Deprecated
#
# @ToDo: add more details
IMAGEBUTTON {
# htmlAttributes
# Used by: frontend, wizard (not implemented right now)
# Overwritable by user: FALSE
#
# Defines allowed HTML attributes for a specific element.
# Based on selfhtml documentation version 8.1.2 (see http://wiki.selfhtml.org/wiki/Referenz:HTML/).
# This is needed to detect and map these strings within the user configured element definition as HTML attributes.
# As soon as prefix-* is defined every attribute is registered automatically as HTML attribute.
htmlAttributes {
# generic attributes
10 = id
20 = class
30 = accesskey
40 = contenteditable
50 = contextmenu
60 = dir
70 = draggable
80 = dropzone
90 = hidden
100 = lang
110 = spellcheck
120 = style
130 = tabindex
140 = title
150 = data-*
# element specific attributes
200 = type
210 = accept
220 = autocomplete
230 = alt
240 = autofocus
250 = checked
260 = disabled
270 = height
280 = inputmode
290 = list
300 = max
310 = maxlength
320 = min
330 = minlength
340 = multiple
350 = name
360 = pattern
370 = placeholder
380 = readonly
390 = required
400 = size
410 = src
420 = step
430 = value
440 = width
}
# fixedHtmlAttributeValues
# Used by: frontend, wizard (not implemented right now)
# Overwritable by user: FALSE
#
# The following values are automatically set as attributes.
fixedHtmlAttributeValues {
type = image
}
# htmlAttributesUsedByTheViewHelperDirectly
# Used by: frontend
# Overwritable by user: FALSE
#
# Each HTML attribute defined at ".htmlAttributes" is available as array within the model.
# This array will be added to the resulting HTML tag.
# For this purpose the Fluid argument "additionalAttributes" of the ViewHelper is used.
#
# Some HTML attributes have to be assigned directly as an argument to the ViewHelper.
# The htmlAttributesUsedByTheViewHelperDirectly map is used to remove the specified
# HTML attribute from the "htmlAttributes" array and sets it for the model's "additionalArguments" array.
#
# There are two attributes which special behavior:
# * disabled
# * readonly
# These attributes can be assigned to the most ViewHelpers but whenever a "disabled" attribute appears
# the browser will disable this element no matter of the value.
# See: https://forge.typo3.org/issues/42474
# Therefore it is held in the htmlAttributes array and the code removes this attribute if its value is set to 0.
htmlAttributesUsedByTheViewHelperDirectly {
# generic attributes
10 = class
20 = dir
30 = id
40 = lang
50 = style
60 = title
70 = accesskey
80 = tabindex
90 = onclick
100 = name
110 = value
# TextfieldViewHelper
120 = autofocus
130 = maxlength
140 = size
150 = placeholder
160 = pattern
170 = required
180 = type
}
# partialPath
# Used by: frontend, wizard (not implemented right now)
# Overwritable by user: TRUE
#
# The defined partial is used to render the element.
# The partial paths to the element are build based on the following rule:
# {$plugin.tx_form.view.partialRootPath}/{$themeName}/@actionName/{$partialPath}.
partialPath =< plugin.tx_form.view.elementPartials.IMAGEBUTTON.10.partialPath
# visibleInShowAction
# Used by: frontend
# Overwritable by user: TRUE
#
# If set to 1 this element is displayed in the form.
# @ToDo: add more details
visibleInShowAction = 1
# visibleInConfirmationAction
# Used by: frontend
# Overwritable by user: TRUE
#
# If set to 1 this element is displayed in the confirmation page.
# @ToDo: add more details
visibleInConfirmationAction = 0
# visibleInProcessAction
# Used by: frontend
# Overwritable by user: TRUE
#
# If set to 1 this element is displayed in the mail.
# @ToDo: add more details
visibleInMail = 0
}
}
}
}
\ No newline at end of file
......@@ -752,32 +752,6 @@ hidden
</td>
.. _reference-layout-imagebutton:
imagebutton
^^^^^^^^^^^
:aspect:`Property:`
imagebutton
:aspect:`Data type:`
string
:aspect:`Available in views:`
- form
:aspect:`Description:`
Layout for the IMAGEBUTTON object.
:aspect:`Default:`
Default layout **form view**:
.. code-block:: html
<label />
<input />
.. _reference-layout-optgroup:
optgroup
......@@ -1307,11 +1281,6 @@ including their default layout.
<input />
)
imagebutton (
<label />
<input />
)
optgroup (
<optgroup>
<elements />
......
.. include:: ../../../Includes.txt
.. _reference-imagebutton:
===========
IMAGEBUTTON
===========
Creates a graphical submit button. The value of the src attribute specifies
the URI of the image that will decorate the button. For accessibility
reasons, authors should provide alternate text for the image via the alt
attribute.
When a pointing device is used to click on the image, the form is submitted
and the click coordinates passed to the server. The x value is measured in
pixels from the left of the image, and the y value in pixels from the top of
the image. The submitted data includes name.x=x-value and name.y=y-value
where "name" is the value of the name attribute, and x-value and y-value are
the x and y coordinate values, respectively.
If the server takes different actions depending on the location clicked,
users of non-graphical browsers will be disadvantaged. For this reason,
authors should consider alternate approaches:
- Use multiple submit buttons (each with its own image) in place of a
single graphical submit button. Authors may use style sheets to control
the positioning of these buttons.
- Use a client-side image map together with scripting.
.. _reference-imagebutton-accesskey:
accesskey
=========
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-accesskey`.
.. _reference-imagebutton-alt:
alt
===
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-alt`.
.. _reference-imagebutton-class:
class
=====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-class`.
.. _reference-imagebutton-dir:
dir
===
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-dir`.
.. _reference-imagebutton-disabled:
disabled
========
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-disabled`.
.. _reference-imagebutton-id:
id
==
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-id`.
.. _reference-imagebutton-label:
label
=====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-label`.
.. _reference-imagebutton-lang:
lang
====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-lang`.
.. _reference-imagebutton-layout:
layout
======
:aspect:`Description:`
See general information for :ref:`reference-layout` and the :ref:`reference-layout-imagebutton`
specific information.
.. _reference-imagebutton-name:
name
====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-name`.
.. _reference-imagebutton-src:
src
===
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-src`.
.. _reference-imagebutton-style:
style
=====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-style`.
.. _reference-imagebutton-tabindex:
tabindex
========
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-tabindex`.
.. _reference-imagebutton-title:
title
=====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-title`.
.. _reference-imagebutton-type:
type
====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-type`.
:aspect:`Default:`
image
.. _reference-imagebutton-value:
value
=====
:aspect:`Description:`
See general information for :ref:`reference-objects-attributes-value`.
[tsref:(cObject).FORM.FormObject.IMAGEBUTTON]
form.tempSrc = GIFBUILDER
form.tempSrc {
XY = 200,40
10 = BOX
10 {
dimensions = 0,0,200,40
color = #666666
}
}
form.attributes.imagebutton = FORM
form.attributes.imagebutton {
method = post
# Label test
10 = FIELDSET
10 {
legend = Label test
10 = IMAGEBUTTON
10 {
label = label
src.file < form.tempSrc
}
20 = IMAGEBUTTON
20 {
label.value = label.value
src.file < form.tempSrc
}
30 = IMAGEBUTTON
30 {
label = TEXT
label {
value = TEXT cObj
}
src.file < form.tempSrc
}
}
# Layout test
20 = FIELDSET
20 {
legend = Layout test
10 = IMAGEBUTTON
10 {
label = label in front of input (default)
src.file < form.tempSrc
}
20 = IMAGEBUTTON
20 {
layout (
<input />
<label />
)
label = label after input
src.file < form.tempSrc
}
30 = IMAGEBUTTON
30 {
layout = <input />
value = No label
src.file < form.tempSrc
}
}
# Accesskey
30 = FIELDSET
30 {
legend = Accesskey test
10 = IMAGEBUTTON
10 {
label = This button has an accesskey
accesskey = a
src.file < form.tempSrc
}
}
# Alt
40 = FIELDSET
40 {
legend = Alt test
10 = IMAGEBUTTON
10 {
label = This button has an alt attribute
alt = This is the alt attribute content
src.file < form.tempSrc
}
}
# Class
50 = FIELDSET
50 {
legend = Class test
10 = IMAGEBUTTON
10 {
label = This button has a class attribute
class = classAtribute
src.file < form.tempSrc
}
20 = IMAGEBUTTON
20 {
label = Multiple classes
class = class1 class2
src.file < form.tempSrc
}
}
# Dir
60 = FIELDSET
60 {
legend = Dir test
10 = IMAGEBUTTON
10 {
label = Dir ltr
dir = ltr
src.file < form.tempSrc
}
20 = IMAGEBUTTON
20 {
label = Dir rtl
dir = rtl
src.file < form.tempSrc
}
30 = IMAGEBUTTON
30 {
label = Wrong input in dir
dir = abc
src.file < form.tempSrc
}
}
# Disabled
70 = FIELDSET
70 {
legend = Disabled test
10 = IMAGEBUTTON
10 {
label = disabled=1
disabled = 1
src.file < form.tempSrc
}
20 = IMAGEBUTTON
20 {
label = disabled=0
disabled = 0
src.file < form.tempSrc
}
30 = IMAGEBUTTON
30 {
label = disabled=disabled
disabled = disabled
src.file < form.tempSrc
}
}
# Id
80 = FIELDSET
80 {
legend = Id test
10 = IMAGEBUTTON
10 {
label = This button has an id attribute and the label a for attribute
id = buttonId
src.file < form.tempSrc
}
}
# Lang
90 = FIELDSET
90 {
legend = Lang test
10 = IMAGEBUTTON
10 {
label = This button has a lang attribute
lang = en-US
src.file < form.tempSrc
}
}
# Name
100 = FIELDSET
100 {
legend = Name test
10 = IMAGEBUTTON
10 {
label = This button has a name attribute
name = buttonName
src.file < form.tempSrc
}
}
# Style
110 = FIELDSET
110 {
legend = style test
10 = IMAGEBUTTON
10 {
label = This button has a style attribute
style = border: 1px solid #000000
src.file < form.tempSrc
}
}
# Tabindex
120 = FIELDSET
120 {
legend = Tabindex test
10 = IMAGEBUTTON
10 {
label = This button has a tabindex attribute
tabindex = 1
src.file < form.tempSrc
}
}
# Title
130 = FIELDSET
130 {
legend = Title test
10 = IMAGEBUTTON
10 {
label = This button has a title attribute
title = This is the title text
src.file < form.tempSrc
}
}
# Value
140 = FIELDSET
140 {
legend = Value test
10 = IMAGEBUTTON
10 {
label = This button has a value attribute
value = Don't you dare to push this button
src.file < form.tempSrc
}
}
}
\ No newline at end of file
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