Skip to content
Open
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
2 changes: 1 addition & 1 deletion components/com_users/forms/reset_complete.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fieldset name="default" label="COM_USERS_RESET_COMPLETE_LABEL">
<fieldset name="default" legend="COM_USERS_COMPLETE" description="COM_USERS_RESET_COMPLETE_LABEL">
<field
name="password1"
type="password"
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/forms/reset_confirm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fieldset name="default" label="COM_USERS_RESET_CONFIRM_LABEL">
<fieldset name="default" legend="COM_USERS_FIELD_RESET_CONFIRM_TOKEN_LABEL" description="COM_USERS_RESET_CONFIRM_LABEL">
<field
name="username"
type="text"
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/forms/reset_request.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fieldset name="default" label="COM_USERS_RESET_REQUEST_LABEL">
<fieldset name="default" legend="COM_USERS_RESET" description="COM_USERS_RESET_REQUEST_LABEL">
<field
name="email"
type="email"
Expand Down
7 changes: 5 additions & 2 deletions components/com_users/tmpl/reset/complete.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@
<form action="<?php echo Route::_('index.php?task=reset.complete'); ?>" method="post" class="com-users-reset-complete__form form-validate form-horizontal well">
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<fieldset>
<?php if (isset($fieldset->label)) : ?>
<legend><?php echo Text::_($fieldset->label); ?></legend>
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php endif; ?>
Comment on lines +35 to +37
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php endif; ?>
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php elseif (isset($fieldset->label)) : ?>
<legend><?php echo Text::_($fieldset->label); ?></legend>
<?php endif; ?>

Question: Should we do it here and in the other tmpl/reset files like this suggestion so it is fully b/c with old XML files e.g. from overrides?

@HLeithner What do you think?

Of course this will not solve the problem mentioned by @chmst in her comment that a fieldset should always have a legend.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if there is neither a legend nor a label?
In nearly all layouts of the backend we are using a language key for legends. So I think we can take this as a standard.
example

                    <fieldset id="fieldset-publishingdata" class="options-form">
                        <legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
                        <div>
                        <?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
                        </div>
                    </fieldset>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better move it to the xml, so it's configurable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your suggestion would force to have a legend, else you can't use the label as "label" for something else on another position it would be doubled.

<?php if (isset($fieldset->description)) : ?>
<p><?php echo Text::_($fieldset->description); ?></p>
<?php endif; ?>
<?php echo $this->form->renderFieldset($fieldset->name); ?>
</fieldset>
Expand Down
7 changes: 5 additions & 2 deletions components/com_users/tmpl/reset/confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@
<form action="<?php echo Route::_('index.php?task=reset.confirm'); ?>" method="post" class="com-users-reset-confirm__form form-validate form-horizontal well">
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<fieldset>
<?php if (isset($fieldset->label)) : ?>
<legend><?php echo Text::_($fieldset->label); ?></legend>
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php endif; ?>
<?php if (isset($fieldset->description)) : ?>
<p><?php echo Text::_($fieldset->description); ?></p>
<?php endif; ?>
<?php echo $this->form->renderFieldset($fieldset->name); ?>
</fieldset>
Expand Down
7 changes: 5 additions & 2 deletions components/com_users/tmpl/reset/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@
<form action="<?php echo Route::_('index.php?task=reset.request'); ?>" method="post" id="user-registration" class="com-users-reset__form form-validate form-horizontal well">
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<fieldset>
<?php if (isset($fieldset->label)) : ?>
<legend><?php echo Text::_($fieldset->label); ?></legend>
<?php if (isset($fieldset->legend)) : ?>
<legend><?php echo Text::_($fieldset->legend); ?></legend>
<?php endif; ?>
<?php if (isset($fieldset->description)) : ?>
<p><?php echo Text::_($fieldset->description); ?></p>
<?php endif; ?>
<?php echo $this->form->renderFieldset($fieldset->name); ?>
</fieldset>
Expand Down