Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions administrator/language/en-GB/com_users.ini
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ COM_USERS_ERROR_SECRET_CODE_WITHOUT_TFA="You have entered a Secret Code but two
COM_USERS_ERROR_VIEW_LEVEL_IN_USE="You can't delete the view access level '%d:%s' because it is being used by content."
COM_USERS_FIELD_CATEGORY_ID_LABEL="Category"
COM_USERS_FIELD_ID_LABEL="ID"
COM_USERS_FIELD_IMAGE_ALT_EMPTY_DESC="Decorative Image - no description required"
COM_USERS_FIELD_IMAGE_ALT_EMPTY_LABEL="No Description"
COM_USERS_FIELD_IMAGE_ALT_LABEL="Image Description (Alt Text)"
COM_USERS_FIELD_LOGIN_MENUITEM="Menu Item"
COM_USERS_FIELD_LOGIN_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'."
COM_USERS_FIELD_LOGIN_REDIRECT_CHOICE_LABEL="Choose Login Redirect Type"
Expand All @@ -94,6 +97,8 @@ COM_USERS_FIELD_LOGOUT_REDIRECT_CHOICE_LABEL="Choose Logout Redirect Type"
COM_USERS_FIELD_LOGOUT_REDIRECT_ERROR="Only one of the logout redirect fields should have a value."
COM_USERS_FIELD_LOGOUT_REDIRECTMENU_LABEL="Menu Item Logout Redirect"
COM_USERS_FIELD_NOTEBODY_LABEL="Note"
COM_USERS_FIELD_OPTIONS_LOGIN="Login"
COM_USERS_FIELD_OPTIONS_LOGOUT="Logout"
COM_USERS_FIELD_REVIEW_TIME_LABEL="Review Date"
COM_USERS_FIELD_SUBJECT_LABEL="Subject"
COM_USERS_FIELD_USER_ID_LABEL="User"
Expand Down
296 changes: 160 additions & 136 deletions components/com_users/tmpl/login/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,142 +14,166 @@

<!-- Basic options. -->
<fieldset name="basic" addruleprefix="Joomla\Component\Users\Site\Rule" label="COM_MENUS_BASIC_FIELDSET_LABEL">

<field
name="loginredirectchoice"
type="radio"
label="COM_USERS_FIELD_LOGIN_REDIRECT_CHOICE_LABEL"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="0">COM_USERS_FIELD_LOGIN_URL</option>
<option value="1">COM_USERS_FIELD_LOGIN_MENUITEM</option>
</field>

<field
name="login_redirect_url"
type="text"
label="JFIELD_LOGIN_REDIRECT_URL_LABEL"
description="JFIELD_LOGIN_REDIRECT_URL_DESC"
validate="LoginUniqueField"
field="login_redirect_menuitem"
hint="COM_USERS_FIELD_LOGIN_REDIRECT_PLACEHOLDER"
message="COM_USERS_FIELD_LOGIN_REDIRECT_ERROR"
showon="loginredirectchoice:0"
/>

<field
name="login_redirect_menuitem"
type="modal_menu"
label="COM_USERS_FIELD_LOGIN_REDIRECTMENU_LABEL"
disable="separator,alias,heading,url"
showon="loginredirectchoice:1"
select="true"
new="true"
edit="true"
clear="true"
>
<option value="">JDEFAULT</option>
</field>

<field
name="logindescription_show"
type="list"
label="JFIELD_BASIC_LOGIN_DESCRIPTION_SHOW_LABEL"
default="1"
class="custom-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="login_description"
type="textarea"
label="JFIELD_BASIC_LOGIN_DESCRIPTION_LABEL"
rows="3"
cols="40"
filter="safehtml"
showon="logindescription_show:1"
/>

<field
name="login_image"
type="media"
label="JFIELD_LOGIN_IMAGE_LABEL"
/>

<field
name="spacer1"
type="spacer"
hr="true"
/>

<field
name="logoutredirectchoice"
type="radio"
label="COM_USERS_FIELD_LOGOUT_REDIRECT_CHOICE_LABEL"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="0">COM_USERS_FIELD_LOGIN_URL</option>
<option value="1">COM_USERS_FIELD_LOGIN_MENUITEM</option>
</field>

<field
name="logout_redirect_url"
type="text"
label="JFIELD_LOGOUT_REDIRECT_URL_LABEL"
field="logout_redirect_menuitem"
validate="LogoutUniqueField"
hint="COM_USERS_FIELD_LOGIN_REDIRECT_PLACEHOLDER"
message="COM_USERS_FIELD_LOGOUT_REDIRECT_ERROR"
showon="logoutredirectchoice:0"
/>

<field
name="logout_redirect_menuitem"
type="modal_menu"
label="COM_USERS_FIELD_LOGOUT_REDIRECTMENU_LABEL"
disable="separator,alias,heading,url"
showon="logoutredirectchoice:1"
select="true"
new="true"
edit="true"
clear="true"
>
<option value="">JDEFAULT</option>
</field>

<field
name="logoutdescription_show"
type="list"
label="JFIELD_BASIC_LOGOUT_DESCRIPTION_SHOW_LABEL"
default="1"
class="custom-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="logout_description"
type="textarea"
label="JFIELD_BASIC_LOGOUT_DESCRIPTION_LABEL"
rows="3"
cols="40"
filter="safehtml"
showon="logoutdescription_show:1"
/>

<field
name="logout_image"
type="media"
label="JFIELD_LOGOUT_IMAGE_LABEL"
/>

<fieldset name="login" label="COM_USERS_FIELD_OPTIONS_LOGIN">
<field
name="loginredirectchoice"
type="radio"
label="COM_USERS_FIELD_LOGIN_REDIRECT_CHOICE_LABEL"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="0">COM_USERS_FIELD_LOGIN_URL</option>
<option value="1">COM_USERS_FIELD_LOGIN_MENUITEM</option>
</field>

<field
name="login_redirect_url"
type="text"
label="JFIELD_LOGIN_REDIRECT_URL_LABEL"
description="JFIELD_LOGIN_REDIRECT_URL_DESC"
validate="LoginUniqueField"
field="login_redirect_menuitem"
hint="COM_USERS_FIELD_LOGIN_REDIRECT_PLACEHOLDER"
message="COM_USERS_FIELD_LOGIN_REDIRECT_ERROR"
showon="loginredirectchoice:0"
/>

<field
name="login_redirect_menuitem"
type="modal_menu"
label="COM_USERS_FIELD_LOGIN_REDIRECTMENU_LABEL"
disable="separator,alias,heading,url"
showon="loginredirectchoice:1"
select="true"
new="true"
edit="true"
clear="true"
>
<option value="">JDEFAULT</option>
</field>

<field
name="logindescription_show"
type="list"
label="JFIELD_BASIC_LOGIN_DESCRIPTION_SHOW_LABEL"
default="1"
class="custom-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="login_description"
type="textarea"
label="JFIELD_BASIC_LOGIN_DESCRIPTION_LABEL"
rows="3"
cols="40"
filter="safehtml"
showon="logindescription_show:1"
/>

<field
name="login_image"
type="media"
label="JFIELD_LOGIN_IMAGE_LABEL"
/>

<field
name="login_image_alt"
type="text"
label="COM_USERS_FIELD_IMAGE_ALT_LABEL"
size="20"
/>

<field
name="login_image_alt_empty"
type="checkbox"
label="COM_USERS_FIELD_IMAGE_ALT_EMPTY_LABEL"
description="COM_USERS_FIELD_IMAGE_ALT_EMPTY_DESC"
/>
</fieldset>

<fieldset name="logout" label="COM_USERS_FIELD_OPTIONS_LOGOUT">
<field
name="logoutredirectchoice"
type="radio"
label="COM_USERS_FIELD_LOGOUT_REDIRECT_CHOICE_LABEL"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="0">COM_USERS_FIELD_LOGIN_URL</option>
<option value="1">COM_USERS_FIELD_LOGIN_MENUITEM</option>
</field>

<field
name="logout_redirect_url"
type="text"
label="JFIELD_LOGOUT_REDIRECT_URL_LABEL"
field="logout_redirect_menuitem"
validate="LogoutUniqueField"
hint="COM_USERS_FIELD_LOGIN_REDIRECT_PLACEHOLDER"
message="COM_USERS_FIELD_LOGOUT_REDIRECT_ERROR"
showon="logoutredirectchoice:0"
/>

<field
name="logout_redirect_menuitem"
type="modal_menu"
label="COM_USERS_FIELD_LOGOUT_REDIRECTMENU_LABEL"
disable="separator,alias,heading,url"
showon="logoutredirectchoice:1"
select="true"
new="true"
edit="true"
clear="true"
>
<option value="">JDEFAULT</option>
</field>

<field
name="logoutdescription_show"
type="list"
label="JFIELD_BASIC_LOGOUT_DESCRIPTION_SHOW_LABEL"
default="1"
class="custom-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="logout_description"
type="textarea"
label="JFIELD_BASIC_LOGOUT_DESCRIPTION_LABEL"
rows="3"
cols="40"
filter="safehtml"
showon="logoutdescription_show:1"
/>

<field
name="logout_image"
type="media"
label="JFIELD_LOGOUT_IMAGE_LABEL"
/>

<field
name="logout_image_alt"
type="text"
label="COM_USERS_FIELD_IMAGE_ALT_LABEL"
size="20"
/>

<field
name="logout_image_alt_empty"
type="checkbox"
label="COM_USERS_FIELD_IMAGE_ALT_EMPTY_LABEL"
description="COM_USERS_FIELD_IMAGE_ALT_EMPTY_DESC"
/>
</fieldset>
</fieldset>
</fields>
</metadata>
5 changes: 4 additions & 1 deletion components/com_users/tmpl/login/default_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
<?php endif; ?>

<?php if ($this->params->get('login_image') != '') : ?>
<img src="<?php echo $this->escape($this->params->get('login_image')); ?>" class="com-users-login__image login-image" alt="<?php echo Text::_('COM_USERS_LOGIN_IMAGE_ALT'); ?>">
<?php $alt = empty($this->params->get('login_image_alt')) && empty($this->params->get('login_image_alt_empty'))
? ''
: 'alt="' . htmlspecialchars($this->params->get('login_image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?>
<img src="<?php echo $this->escape($this->params->get('login_image')); ?>" class="com-users-login__image login-image" <?php echo $alt; ?>>
<?php endif; ?>

<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
Expand Down
5 changes: 4 additions & 1 deletion components/com_users/tmpl/login/default_logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
<?php endif; ?>

<?php if ($this->params->get('logout_image') != '') : ?>
<img src="<?php echo $this->escape($this->params->get('logout_image')); ?>" class="com-users-logout__image thumbnail float-right logout-image" alt="<?php echo Text::_('COM_USERS_LOGOUT_IMAGE_ALT'); ?>">
<?php $alt = empty($this->params->get('logout_image_alt')) && empty($this->params->get('logout_image_alt_empty'))
? ''
: 'alt="' . htmlspecialchars($this->params->get('logout_image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?>
<img src="<?php echo $this->escape($this->params->get('logout_image')); ?>" class="com-users-logout__image thumbnail float-right logout-image" <?php echo $alt; ?>>
<?php endif; ?>

<?php if (($this->params->get('logoutdescription_show') == 1 && str_replace(' ', '', $this->params->get('logout_description')) != '')|| $this->params->get('logout_image') != '') : ?>
Expand Down
1 change: 0 additions & 1 deletion language/en-GB/com_users.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ COM_USERS_FIELD_RESET_PASSWORD1_MESSAGE="The passwords you entered do not match.
COM_USERS_FIELD_RESET_PASSWORD2_LABEL="Confirm Password"
COM_USERS_INVALID_EMAIL="Invalid email address"
COM_USERS_LOGIN_DEFAULT_LABEL="User Login"
COM_USERS_LOGIN_IMAGE_ALT="Login image"
COM_USERS_LOGIN_REGISTER="Don't have an account?"
COM_USERS_LOGIN_REMEMBER_ME="Remember me"
COM_USERS_LOGIN_REMIND="Forgot your username?"
Expand Down