User tests: Successful: Unsuccessful:
This commit render chechboes,chechbos radio and range fields with jLayoutRender, this mean formfield can now be overrided in template and unwanted javascript can be removed or bad display solved(it's the case for bootstrap 3)
I do it with all formfields that can have troubles because javascript or render, that template can override it.
Thank you to review and test the code.
Labels |
Added:
?
|
Would it make sense to have a separate JLayout for the Fieldet enclosing the multiple-fields to avoid copy-pasted code ? (e.g. fieldsetbegin and fieldsetend JLayouts ?)
My only goal is, that you can do ti, not to add code to replace current views overrides.
I think adding to many jLayout only obfuscate the code.
Perhaps in the futur easy overriding for jhtml ? But this is not the biiggest problem currently. But i can say that this code solve many problem i have and all templaters that don't use bootstrap 2.3. Some want only remove Jquery or bootstrap but joomla 3 have integrate in the form fields Bootstrap and you cannot remove it in form field's without changing the core code. This is why a wrote the code and want do it for most fields.
Simply look the current "combo" field code.(bootstrap style and jquery script). I'm a JQuery coder but if another one don't want use jQuery then he must have the choice.
Using Jlayout in this case is time saver, to override it and give totally freedom.
Travis build failed, because in form fields tests expected results doesn't match actual results. If you look at the report details, the tests are written to expect a markup without tabs and newline indents. All markup in one line.
Let's see what author @Achal-Aggarwal suggests, I'd go with replacing \n
and \t
with ''
in the assertions.
BTW thanks for working on this
I'd do the $actualResult = str_replace(array("\r", "\n","\t"), '', $actualResult)
because we might run into same issue again in future.
@Achal-Aggarwal, I have 22 form fields (12 are done)to convert Piotr-cz solution save me a big time, but i don't wan't touch the main formfields test code.
@Achal-Aggarwal radio field give me an instance error(try yourself Please) and i don't know why. On trying it, it works perfect but travis crash on local test and give an error on travis-ci.org
@studio42 Take a look on https://github.com/Achal-Aggarwal/joomla-cms/compare/jlayout-formfields.
I ran phpunit on local and no failure/error. If we are passing the whole field then we can just directly get properties of that field from $field. One advantage of this is that I don't have to modify test.
That instance error was coming because in test we are not creating a mockApplication https://github.com/Achal-Aggarwal/joomla-cms/compare/jlayout-formfields#diff-e519683a32006555a9b0f41bfe1874bcR35.
@Achal-Aggarwal Thanks to help me to solve this. I think i simply move Original render code in the layout file usinq $field as you wrote in your commit. It's not the best solution for me, but i hope to merge it before or for j3.5, because this is really a pain currently using form fields in another css/js framework(jquery mobile, extjs, kendo ui ... ) or Bootstrap 3 revision not specially made for joomla.
Labels |
Added:
?
|
Status | New | ⇒ | Pending |
Labels |
Removed:
?
|
Category | ⇒ | Layout |
Hi @studio42
is this issue still valid? As the last comment here was on 20 Dec 2013? Also pull requests to the master branch of this repo are not longer accepted. Can you close this pull request and submit a new one against the staging branch, if this issue still exists?
If there is no Response in a month we will close the PR here.
Thanks for understanding!
Closing as per the comment of @zero-24 above
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-03-23 17:56:32 |
Closed_By | ⇒ | brianteeman |
Closed_Date | 2015-03-23 17:56:32 | ⇒ | 2015-03-23 17:56:33 |
Sorry for non response, but i think the jlayout for form fields does not exist anymore ?
This was a great advance to change default render of form fields but i'm not in the dev group, why spend time to answer for nothing if at end this is completly for nothing ???
Is always Joomla CMS a real developpement for the final users ?
I think really that Joomla team do more thinks wrong.
Now the admin mod_menu is rendered by class JAdminCssMenu. And core templates exlucing isis do not work anymore and you have to rewrite all for own menu renders(eg using bootstrap 4.
I know tha most user was using isis, but now Hathor cannot be used anymore.
If you think this right, then simply do this in Front too.
I know the issue is not directly related to jMayout, but i think that curently the dev team go on the wrong way and don't check why the code have to be changed. Eg. changin the user registration class and noone checked the consequence
There was a reason you were asked to answer a few basic questions when you
posted this. they were not there to make you delete them.
What change are you referring to that has stopped Hathor from working. It's
working in staging for me.
Are you referring to j4 perhaps which is in early stages?
Remember that joomla is a community project. If you have something
constructive to contribute you are always welcome.
That reply was from my email and I assumed it was a new issue and not one from 2013. The issue numbers are almost the same.
Commenting on a closed issue will not be seen by most people.
Travis CI failed, in build 7db1eb8, but in real i have no error in radio field and layout,, how to solve this ?
another detect problem is spacing in Checkboxes. But orignal have no spacing at all !
eg.
make an error but i think after each lines a line break have to he added in HTML code.