Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formfields: Add ability to set attributes to <input> Tag #807

Merged
merged 9 commits into from
Sep 27, 2019

Conversation

PhilippGrashoff
Copy link
Collaborator

Until now, only attributes could be set to the surrounding

using $formfield->setAttr(). This PR makes it possible to add attributes directly to the tag:

New property added: $this->inputAttr in which additional attributes are stored
New function added: setInputAttr() which is a clone of View->setAttr() which fills the $this->inputAttr array

Can also be used to overwrite existing attributes as $this->inputAttr is passed as second param to array_merge (at $this->app->getTag())

New property added: $this->inputAttr in which additional attributes are stored
New function added: setInputAttr() which is a clone of View->setAttr() which fills the $this->inputAttr array

Can also be used to overwrite existing attributes as $this->inputAttr is passed as second param to array_merge (at $this->app->getTag())
@codecov
Copy link

codecov bot commented Sep 27, 2019

Codecov Report

Merging #807 into develop will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #807      +/-   ##
=============================================
+ Coverage      76.23%   76.28%   +0.04%     
- Complexity      2291     2293       +2     
=============================================
  Files            119      119              
  Lines           5404     5414      +10     
=============================================
+ Hits            4120     4130      +10     
  Misses          1284     1284
Impacted Files Coverage Δ Complexity Δ
src/FormField/TextArea.php 100% <100%> (ø) 3 <0> (ø) ⬇️
src/FormField/DropDown.php 92.68% <100%> (+0.09%) 39 <0> (ø) ⬇️
src/FormField/AutoComplete.php 66.31% <100%> (+0.35%) 33 <0> (ø) ⬇️
src/FormField/Lookup.php 76.5% <100%> (+0.12%) 56 <0> (ø) ⬇️
src/FormField/Input.php 100% <100%> (ø) 32 <2> (+2) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dae88ae...4164cdf. Read the comment docs.

@PhilippGrashoff PhilippGrashoff merged commit 7cca7ba into atk4:develop Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants