?
avatar germanis
germanis
22 Sep 2015

By inserting a menu item (type user login) you have params for 'login redirect url' and 'logout redirect url'. Both are simple text fields.

When inserting a module (type user login) you have the same params.
The difference is: module params are select lists with all available menu items.

This ist incosistent. - See screenshots for details (sorry - german).

I think a better way the solution would be how it is done in the module.

As alternative we could use a combination of both solutions.
First - choosing whether a cusom URL or a available menu item, second the choosen param (form field) appears.

Cheers,
Gerald

jlogin_menu_modul fw

avatar germanis germanis - open - 22 Sep 2015
avatar germanis germanis - change - 22 Sep 2015
Title
Iinconsistency in menu item 'login' and module 'login'
Inconsistency in menu item 'login' and module 'login'
avatar infograf768
infograf768 - comment - 23 Sep 2015

Indeed it looks inconsistent as anyway we should not enter an external url in the menu item field.
We may be able to change the menu item behavior to use the same field type as the module (from text to menuitem) BUT I am not sure this would be B.C.

avatar zero-24 zero-24 - change - 23 Sep 2015
Category UI/UX
avatar zero-24 zero-24 - change - 23 Sep 2015
Labels Added: ?
avatar Bakual
Bakual - comment - 23 Sep 2015

The issue with B/C will be that currently we store the full URL with that field, and the menuitem field would only store the ItemID. Thus you can't just change the fieldtype. Also when you change that, a user who opens and saves the item without changing anything would loose the redirect URL for sure.

So what we could do is add a new menuitem field with an additional option "- Use Custom URL -". If that one is selected the current field will be shown. If a menuitem is selected in the new field, the existing field can be hidden with showon.
That approach should be B/C but needs additional checks in code everywhere we check for that redirect URL.

avatar Devportobello
Devportobello - comment - 30 Sep 2015

I need a same field for a thrid module, maybe i could make a PR, just need to know the right way:

  • Did we need to create a new form field "\libraries\cms\form\field" ?
  • What could be the new name ?
  • What could be the new value for additional option "- Use Custom URL -" needed for showon ?
<field
    name="login"
    type="menuitem"
    disable="separator,alias,heading,url"
    label="MOD_LOGIN_FIELD_LOGIN_REDIRECT_URL_LABEL"
    description="MOD_LOGIN_FIELD_LOGIN_REDIRECT_URL_DESC" >
        <option
            value="">JDEFAULT</option>
        <option
            value="-1">MOD_LOGIN_FIELD_LOGIN_OPTION_CUSTOM</option>
</field>
<field
    name="login_custom_url"
    type="text"
    label="MOD_LOGIN_FIELD_LOGIN_REDIRECT_CUSTOM_URL_LABEL"
    description="MOD_LOGIN_FIELD_LOGIN_REDIRECT_CUSTOM_URL_DESC"
    class="inputbox"
    showon="login:-1" />
avatar brianteeman
brianteeman - comment - 8 May 2016

Finally this has been resolved by #10249


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

avatar brianteeman brianteeman - change - 8 May 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-05-08 16:35:07
Closed_By brianteeman
avatar brianteeman brianteeman - close - 8 May 2016

Add a Comment

Login with GitHub to post a comment