File tree Expand file tree Collapse file tree 3 files changed +36
-3
lines changed
administrator/language/en-GB
components/com_users/tmpl/login Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,12 @@ COM_USERS_FIELD_LOGOUT_REDIRECTMENU_LABEL="Menu Item Logout Redirect"
127127COM_USERS_FIELD_LOGOUT_REDIRECT_CHOICE_DESC =" 'Internal URL' lets you manually enter any internal URL in the Redirect field. 'Menu Item' lets you directly select an existing menu item.<br>For a multilingual site, it is recommended to use 'Menu Item'."
128128COM_USERS_FIELD_LOGOUT_REDIRECT_CHOICE_LABEL =" Choose Logout Redirect Type"
129129COM_USERS_FIELD_LOGOUT_REDIRECT_ERROR =" Only one of the logout redirect fields should have a value."
130+ COM_USERS_FIELD_REGISTRATION_DESC =" Set a Menu Item to utilize a custom registration page."
131+ COM_USERS_FIELD_REGISTRATION_LABEL =" Registration Page"
130132COM_USERS_FIELD_NOTEBODY_LABEL =" Note"
131133COM_USERS_FIELD_OPTIONS_LOGIN =" Login"
132134COM_USERS_FIELD_OPTIONS_LOGOUT =" Logout"
135+ COM_USERS_FIELD_OPTIONS_REGISTRATION =" Registration"
133136COM_USERS_FIELD_REVIEW_TIME_LABEL =" Review Date"
134137COM_USERS_FIELD_SUBJECT_LABEL =" Subject"
135138COM_USERS_FIELD_USER_ID_LABEL =" User"
Original file line number Diff line number Diff line change 180180 description=" COM_USERS_FIELD_IMAGE_ALT_EMPTY_DESC"
181181 />
182182 </fieldset >
183+
184+ <fieldset name =" registration" label =" COM_USERS_FIELD_OPTIONS_REGISTRATION" >
185+ <field
186+ name=" customRegLinkMenu"
187+ type=" modal_menu"
188+ label=" COM_USERS_FIELD_REGISTRATION_LABEL"
189+ description=" COM_USERS_FIELD_REGISTRATION_DESC"
190+ disable=" separator,alias,heading,url"
191+ select=" true"
192+ new=" true"
193+ edit=" true"
194+ clear=" true"
195+ >
196+ <option value =" " >JOPTION_SELECT_MENU_ITEM</option >
197+ </field >
198+ </fieldset >
183199 </fieldset >
184200 </fields >
185- </metadata >
201+ </metadata >
Original file line number Diff line number Diff line change 1111defined ('_JEXEC ' ) or die;
1212
1313use Joomla \CMS \Component \ComponentHelper ;
14+ use Joomla \CMS \Factory ;
1415use Joomla \CMS \HTML \HTMLHelper ;
1516use Joomla \CMS \Language \Text ;
1617use Joomla \CMS \Plugin \PluginHelper ;
@@ -120,8 +121,21 @@ class="btn btn-secondary w-100 <?php echo $button['class'] ?? '' ?>"
120121 <a class="com-users-login__remind list-group-item" href="<?php echo Route::_ ('index.php?option=com_users&view=remind ' ); ?> ">
121122 <?php echo Text::_ ('COM_USERS_LOGIN_REMIND ' ); ?>
122123 </a>
123- <?php if ($ usersConfig ->get ('allowUserRegistration ' )) : ?>
124- <a class="com-users-login__register list-group-item" href="<?php echo Route::_ ('index.php?option=com_users&view=registration ' ); ?> ">
124+ <?php
125+ if ($ usersConfig ->get ('allowUserRegistration ' )) :
126+ $ regLinkMenuId = $ this ->params ->get ('customRegLinkMenu ' );
127+ $ regLink = 'index.php?option=com_users&view=registration ' ;
128+
129+ if ($ regLinkMenuId ) {
130+ $ menu = Factory::getApplication ()->getMenu ();
131+ $ item = $ menu ->getItem ($ regLinkMenuId );
132+
133+ if ($ item ) {
134+ $ regLink = 'index.php?Itemid= ' . $ regLinkMenuId ;
135+ }
136+ }
137+ ?>
138+ <a class="com-users-login__register list-group-item" href="<?php echo Route::_ ($ regLink ); ?> ">
125139 <?php echo Text::_ ('COM_USERS_LOGIN_REGISTER ' ); ?>
126140 </a>
127141 <?php endif ; ?>
You can’t perform that action at this time.
0 commit comments