? Failure

User tests: Successful: Unsuccessful:

avatar studio42
studio42
13 Dec 2013

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.

avatar studio42 studio42 - open - 13 Dec 2013
avatar studio42 studio42 - change - 14 Dec 2013
Labels Added: ?
avatar studio42
studio42 - comment - 14 Dec 2013

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.

-'<input type="checkbox" name="myTestName" id="myTestId" value="1" required aria-required="true" />'
+'<input type="checkbox" name="myTestName" id="myTestId" value="1" required aria-required="true" />
+

make an error but i think after each lines a line break have to he added in HTML code.

avatar beat
beat - comment - 14 Dec 2013

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 ?)

avatar studio42
studio42 - comment - 15 Dec 2013

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.

avatar piotr-cz
piotr-cz - comment - 18 Dec 2013

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 :+1:

avatar Achal-Aggarwal
Achal-Aggarwal - comment - 18 Dec 2013

I guess it doesn't matter whether a \n is present or \t at either end of form field. @studio42 as @piotr-cz stated you can add/remove space chars from test to suit your output as long as it doesn't affect rendered output.

avatar piotr-cz
piotr-cz - comment - 18 Dec 2013

I'd do the $actualResult = str_replace(array("\r", "\n","\t"), '', $actualResult) because we might run into same issue again in future.

avatar studio42
studio42 - comment - 18 Dec 2013

@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

avatar Achal-Aggarwal
Achal-Aggarwal - comment - 19 Dec 2013

@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.

avatar studio42
studio42 - comment - 20 Dec 2013

@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.

avatar studio42 studio42 - change - 20 Dec 2013
Labels Added: ?
avatar brianteeman brianteeman - change - 21 Aug 2014
Status New Pending
avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar brianteeman brianteeman - change - 2 Sep 2014
Category Layout
avatar zero-24
zero-24 - comment - 6 Feb 2015

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!

avatar brianteeman
brianteeman - comment - 23 Mar 2015

Closing as per the comment of @zero-24 above


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/2678.
avatar brianteeman brianteeman - close - 23 Mar 2015
avatar brianteeman brianteeman - change - 23 Mar 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-03-23 17:56:32
Closed_By brianteeman
avatar brianteeman brianteeman - change - 23 Mar 2015
Closed_Date 2015-03-23 17:56:32 2015-03-23 17:56:33
avatar brianteeman brianteeman - close - 23 Mar 2015
avatar studio42
studio42 - comment - 1 Apr 2015

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 ?

avatar studio42
studio42 - comment - 6 Nov 2016

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/2678.

avatar brianteeman
brianteeman - comment - 6 Nov 2016

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.

avatar brianteeman
brianteeman - comment - 6 Nov 2016

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/2678.

Add a Comment

Login with GitHub to post a comment