Add new login layouts and other login settings, resolves #1055 #1112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces two new login layouts tabs and accordion along with a new login background layout option, allowing users to switch between the default layout and a split-screen layout. Additionally, it adds settings to control various aspects of the login page, including the login container width, the login texts, and the option to disable individual login methods. Resolves #1055
Example layouts:
Added Settings:
Login container width Controls the width of the login container (default: 500px)
logincontainerwidthLogin layout Choose between vertical, tabs, or accordion layout
loginlayoutLogin background layout Choose between default or split screen layout
loginbackgroundlayoutPrimary login Specify which login method should be active by default in tabs/accordion layouts
primaryloginLocal login intro text Customize the intro text for local login
loginlocalintrotextLocal login tab text Customize the tab text for local login (tabs layout only)
loginlocallogintabtextIDP login Control if IDP login buttons are shown
loginidploginenableIDP login intro text Customize the intro text for IDP login
loginidpintrotextIDP login tab text Customize the tab text for IDP login (tabs layout only)
loginidplogintabtextSelf registration Control if self registration is shown
loginselfregistrationenableSelf registration intro Control if intro text is shown for self registration
loginselfregistrationshowintroSelf registration intro text Customize the intro text for self registration
loginselfregistrationintrotextSelf registration tab text Customize the tab text for self registration (tabs layout only)
loginselfregistrationlogintabtextGuest login Control if guest login is shown
loginguestloginenableGuest login intro Control if intro text is shown for guest login
loginguestshowintroGuest login intro text Customize the intro text for guest login
loginguestintrotextGuest login tab text Customize the tab text for guest login (tabs layout only)
loginguestlogintabtextTechnical changes:
The code in this PR prepares the
loginmethodsinside core_renderer.php and iterates over these methods inside the loginform.mustache. This ensures that the login methods are rendered in the preferred order in the HTML DOM. As a result, Bootstrapnav-tabsand accordion classes can be easily applied.Inside loginform.mustache, the flags
loginaccordion,loginbackgroundlayoutdefault, andlogintabsare used to conditionally render the appropriate elements for the different layouts.The split-screen layout is implemented via CSS by applying a new class:
login-background-layout-splitscreen.