TASK: Fix smaller glitches

This commit is contained in:
Daniel Siepmann 2018-10-08 16:53:23 +02:00
parent 2094df147a
commit 08acce4619
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
4 changed files with 30 additions and 24 deletions

View file

@ -9,10 +9,18 @@
4: 'city', 4: 'city',
5: 'country' 5: 'country'
}" as="propertyName"> }" as="propertyName">
{f:render(section: 'Field', arguments: {
propertyName: propertyName
})}
</f:for>
<br>
<f:form.submit value="Update" />
</f:form>
<f:section name="Field">
<p> <p>
<label for="{propertyName}"> <label for="{propertyName}">{f:translate(id: 'labels.{propertyName}')}</label>
{f:translate(id: 'labels.{propertyName}')}
</label>
<br> <br>
<f:form.textfield property="{propertyName}" id="{propertyName}" /> <f:form.textfield property="{propertyName}" id="{propertyName}" />
{f:render(section: 'FieldErrors', arguments: { {f:render(section: 'FieldErrors', arguments: {
@ -20,11 +28,7 @@
})} })}
<br> <br>
</p> </p>
</f:for> </f:section>
<br>
<f:form.submit value="Update" />
</f:form>
<f:section name="FieldErrors"> <f:section name="FieldErrors">
<f:form.validationResults for="{propertyPath}"> <f:form.validationResults for="{propertyPath}">

View file

@ -106,7 +106,6 @@ Before v9, the file would look like:
KEY parent (pid) KEY parent (pid)
); );
Model Model
----- -----
@ -125,7 +124,7 @@ Each model is a PHP class structure like:
.. literalinclude:: ../../CodeExamples/localPackages/example_extension/Classes/Domain/Model/Address.php .. literalinclude:: ../../CodeExamples/localPackages/example_extension/Classes/Domain/Model/Address.php
:language: php :language: php
:linenos: :linenos:
:lines: 1-4,24-32,63-66,87 :lines: 1-4,24-29,31-32,64-68,119
Repository Repository
---------- ----------
@ -178,7 +177,7 @@ to the view:
:lines: 28-29,40-43,66 :lines: 28-29,40-43,66
The ``AddressRepository`` extends the base ``Repository`` class and inherits some The ``AddressRepository`` extends the base ``Repository`` class and inherits some
methods, e.g. ``findAll``. methods, e.g. ``findAll()``.
Template Template
-------- --------

View file

@ -9,16 +9,16 @@ only need :file:`ext_tables.sql` the TCA and TypoScript for rendering.
Extbase is needed if you provide interaction to the user, e.g. updating or adding Extbase is needed if you provide interaction to the user, e.g. updating or adding
records. records.
Even that can nowadays achieved using the system extension "Form". Still we will Even that can nowadays be achieved using the system extension "Form". Still we will
cover how to update a record next. cover how to update a record next.
We need a form where we can adjust the values of the record, e.g. change the We need a form where we can adjust the values of the record, e.g. change the
companies name. company name.
Therefore we will add a new ``editAction()``. This will receive a single ``Address`` Therefore we will add a new ``editAction()``. This will receive a single ``Address``
for editing and provides the form. We also will add an ``updateAction()`` which for editing and provides the form. We also add an ``updateAction()`` which receives a
receives a single ``Address``. This action is the target of the submit form and will single ``Address``. This action is the target of the submit form and will update the
update the database record. database record.
To start editing an address, we will add an link from :file:`index.html` to To start editing an address, we will add an link from :file:`index.html` to
``editAction()``. ``editAction()``.
@ -50,7 +50,7 @@ Creating Forms
Create a form which will show the current values of a single ``Address`` to the Create a form which will show the current values of a single ``Address`` to the
user. user.
TYPO3 also provides ViewHelpers to create forms. Of course you could create form with TYPO3 also provides ViewHelpers to create forms. Of course you could create forms with
pure HTML, but TYPO3 / Fluid adds some security aspects and makes things easier. pure HTML, but TYPO3 / Fluid adds some security aspects and makes things easier.
E.g. a proper validation that forms were not manipulated are added out of the box. E.g. a proper validation that forms were not manipulated are added out of the box.
@ -229,6 +229,8 @@ Germany. One or more leading 0 are allowed, we therefore will not use the PHP ty
*/ */
protected $zip; protected $zip;
Also see: https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.3/Feature-83167-ReplaceValidateWithTYPO3CMSExtbaseAnnotationValidate.html
Display validation errors Display validation errors
------------------------- -------------------------
@ -274,9 +276,10 @@ Handling existing invalid records
--------------------------------- ---------------------------------
In some circumstances your system might have an invalid record. Right now it's not In some circumstances your system might have an invalid record. Right now it's not
possible to edit this record with `editAction` as Extbase will validate the record. possible to edit this record with ``editAction()`` as Extbase will validate the
record.
Therefore the `@ignorevalidation` annotation can be added to the action:: Therefore the ``@ignorevalidation`` annotation can be added to the action::
/** /**
* @ignorevalidation $address * @ignorevalidation $address