Realm Dropdown Menu UI

Hello,
I added the realm_dropdown policy
to make it possible to select the realm at login.
Now my realm selection box is between the username & password
field.
Is that the intended behaviour?
Eithert way, how could I change that to be below the
password field and filled with a default realm (the main user realm)?
I’d appreciate some input,
cheers,
Johannes

You would have to change the login html template.

Hi @cornelinux ,
yes, I found the template and added it as a mount
to my privacyidea container.

Another related question:
Do you know how (or where) to change
the angular properties that make this template

<select class="form-control round-none"
        name="realm"
        placeholder="Realm"
        ng-show="piRealms.length > 0"
        id="realm"
        ng-model="login.realm"
        ng-options="realm for realm in piRealms">
    <!-- We add a placeholder, if we do not have an empty realm -->
    <option ng-hide="piRealms[0]===''" value="" selected translate>Choose a realm...</option>
</select>

produces this:

<option value="?" selected="selected"></option>
<option ng-hide="piRealms[0]===''" value="" translate="">Choose a realm...</option>
<option>REALM1</option>
<option>REALM2</option>

and not

<option ng-hide="piRealms[0]===''" value="" selected="selected" translate="" disabled>Choose a realm...</option>
<option>REALM1</option>
<option>REALM2</option>

which would make the Choose a Realm string show up on the dropdown box.
I’m not familiar with Angular, so I’m a bit lost where to start looking.
Cheers,

I recommend searching for this string!

yes, that I saw but I don’t quite see how I could get rid of the placeholder
so the text “Choose your Realm” is displayed and not a blank box.
Any ideas?


in the list piRealms there is an empty string, since it can be neccessary to be able to NOT select a realm.
You would have to change piRealms.