? Success

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
16 Aug 2015

Move form field moduleposition to layouts and use Bootstrap modal

Moduleposition is yet another form field that uses mootools modal. Now it uses JLayout.

B/C

None as the default behavior remains the mootools modal, but overriding with Bootstrap modal (or any other modal) is now possible and easy.

Testing

Apply patch.
Select Hathor as the admin template.
Try to edit any module in the module manager and select another position.
You should see a Bootstrap modal and the functionality should be the same.
Now delete /hathor/html/layouts/joomla/form/field/moduleposition.php
Repeat the testing procedure, but now you should see a mootools modal.

avatar dgt41 dgt41 - open - 16 Aug 2015
avatar dgt41 dgt41 - change - 16 Aug 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Aug 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 17 Aug 2015
Easy No Yes
avatar zero-24 zero-24 - change - 17 Aug 2015
Category Layout
avatar rmittl rmittl - test_item - 24 Oct 2015 - Tested successfully
avatar rmittl
rmittl - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on 1575f4a


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

avatar svom svom - test_item - 24 Oct 2015 - Tested successfully
avatar svom
svom - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on 1575f4a

Tested successfully!
Joomla 3.4.5


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

avatar zero-24 zero-24 - change - 24 Oct 2015
Milestone Added:
avatar zero-24 zero-24 - change - 24 Oct 2015
Milestone Added:
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 24 Oct 2015

RTC. Thanks


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

avatar joomla-cms-bot joomla-cms-bot - change - 24 Oct 2015
Labels Added: ?
avatar Fedik
Fedik - comment - 24 Oct 2015

sorry, but to early for RTC :wink:
here is still need to fix incorect usage of $renderLayout property, it cannot be used for getInput() because it used in JField::renderField()
so it make conflict

avatar zero-24 zero-24 - change - 24 Oct 2015
Status Ready to Commit Pending
Labels
avatar zero-24
zero-24 - comment - 24 Oct 2015

Back to pending.


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

avatar joomla-cms-bot joomla-cms-bot - change - 24 Oct 2015
Labels Removed: ?
avatar dgt41
dgt41 - comment - 24 Oct 2015

@Fedik any suggestion here?

avatar Fedik
Fedik - comment - 24 Oct 2015

@dgt41 I think can use another property, eg
@protected $layout = 'joomla.form.field.moduleposition';
and then:
return JLayoutHelper::render($this->layout, $displayData);

avatar dgt41
dgt41 - comment - 27 Oct 2015

@zero-24 does this need more tests? that change was straight forward

avatar zero-24 zero-24 - change - 28 Oct 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 28 Oct 2015

RTC than. Thanks.


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

avatar joomla-cms-bot joomla-cms-bot - change - 28 Oct 2015
Labels Added: ?
avatar phproberto
phproberto - comment - 1 Nov 2015

Great work @dgt41 :)

After checking PRs I have only 2 recommendations:

  • If you see all your PRs you end with the same getInput() function code. I think we have to move that directly to JFormField and it doesn't break B/C. It will save lines of code.
  • Addittionally the getLayoutData() can be pre-filled directly from JFormField so that fields only take care of returning their required custom data. Things like id, name, etc. are in all the fields. So if child fields need additional data they will call $layoutData = parent::getLayoutData() and then add anything they need.
  • Also for reusability and to allow that extension devs can use different layouts for the same field we need to enable support to change the active layout from field XML attributes. Adding support for something like layout="mylib.form.field.myfield". It only requires to add 1 line of code.
  • Creating a getRenderer() function that would allow that any extension can use their own renderer without having to override the getInput() method.

I think I have already commented this so maybe is that it's not going to happen in v3.5 but I think is the best moment to add all this features. If this is done somewhere else please tell me so I can review it.

I've seen this method has been included recently:

https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/field.php#L931

In my opinion the layout data that the label and the input need are the same. I actually faced some situations where I had to render the label inside the input itself.

Do you think is better that I send a PR to try to change things in JFormField and we use it as base for the rest?

avatar dgt41
dgt41 - comment - 1 Nov 2015

@phproberto If I do the getInput and the render suggestions I get a nasty error in the menu item edit page:
screenshot 2015-11-01 10 56 44
Probably I need more coffee...

avatar zero-24 zero-24 - change - 2 Nov 2015
Status Ready to Commit Pending
Labels
avatar zero-24 zero-24 - change - 2 Nov 2015
Labels Removed: ?
avatar joomla-cms-bot
joomla-cms-bot - comment - 2 Nov 2015

This PR has received new commits.

CC: @rmittl, @svom


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

avatar zero-24
zero-24 - comment - 3 Nov 2015

@dgt41 On testing i get: Fatal error: Call to undefined method JFormFieldModulePosition::getRenderer() in JRoot/libraries/cms/form/field/moduleposition.php on line 146

avatar dgt41
dgt41 - comment - 3 Nov 2015

@zero-24 all these PRs require also #8248

avatar zero-24 zero-24 - test_item - 3 Nov 2015 - Tested successfully
avatar zero-24
zero-24 - comment - 3 Nov 2015

I have tested this item :white_check_mark: successfully on 22f835a

Ok than. :+1: I don't look great in hathor but it works. Thanks :+1:


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

avatar joomla-cms-bot
joomla-cms-bot - comment - 5 Nov 2015

This PR has received new commits.

CC: @rmittl, @svom, @zero-24


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

avatar designbengel designbengel - test_item - 5 Nov 2015 - Tested unsuccessfully
avatar designbengel
designbengel - comment - 5 Nov 2015

I have tested this item :red_circle: unsuccessfully on fc41841

Module Edit page is broken in Hathor - sorry x


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

avatar phproberto
phproberto - comment - 5 Nov 2015

Can we get rid of this whitespace?
hathor-whitespace

avatar joomla-cms-bot
joomla-cms-bot - comment - 5 Nov 2015

This PR has received new commits.

CC: @designbengel, @rmittl, @svom, @zero-24


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

avatar dgt41
dgt41 - comment - 5 Nov 2015

Fixed that:
screenshot 2015-11-05 17 22 21

avatar dgt41
dgt41 - comment - 5 Nov 2015

I am gonna close this one for now as it only affects hathor, lets not spend too much energy on this

avatar dgt41 dgt41 - change - 5 Nov 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-11-05 16:14:55
Closed_By dgt41
avatar dgt41 dgt41 - close - 5 Nov 2015
avatar dgt41 dgt41 - close - 5 Nov 2015
avatar phproberto
phproberto - comment - 5 Nov 2015

:+1: I was going to say that

avatar zero-24 zero-24 - change - 5 Nov 2015
Milestone Removed:

Add a Comment

Login with GitHub to post a comment