Skip to content

Commit 581cf41

Browse files
authored
[6.0] Accesslevel edit - simplify (joomla#45588)
* Simplify access level edit * deprecate language string * Fix test * add tab * cs
1 parent 4d05452 commit 581cf41

File tree

3 files changed

+7
-25
lines changed

3 files changed

+7
-25
lines changed

administrator/components/com_users/tmpl/level/edit.php

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,18 @@
2020
$wa = $this->getDocument()->getWebAssetManager();
2121
$wa->useScript('keepalive')
2222
->useScript('form.validate');
23-
2423
?>
2524

2625
<form action="<?php echo Route::_('index.php?option=com_users&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="level-form" aria-label="<?php echo Text::_('COM_USERS_LEVEL_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate main-card">
27-
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>
28-
29-
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', Text::_('COM_USERS_LEVEL_DETAILS')); ?>
30-
<fieldset class="options-form">
31-
<legend><?php echo Text::_('COM_USERS_LEVEL_DETAILS'); ?></legend>
32-
<div class="control-group">
33-
<div class="control-label">
34-
<?php echo $this->form->getLabel('title'); ?>
35-
</div>
36-
<div class="controls">
37-
<?php echo $this->form->getInput('title'); ?>
38-
</div>
39-
</div>
40-
</fieldset>
41-
<?php echo HTMLHelper::_('uitab.endTab'); ?>
42-
43-
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'groups', Text::_('COM_USERS_USER_GROUPS_HAVING_ACCESS')); ?>
26+
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'groups', 'recall' => true, 'breakpoint' => 768]); ?>
27+
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'groups', Text::_('COM_USERS_USERGROUP_DETAILS')); ?>
28+
<?php echo $this->form->renderField('title'); ?>
4429
<fieldset class="options-form">
4530
<legend><?php echo Text::_('COM_USERS_USER_GROUPS_HAVING_ACCESS'); ?></legend>
46-
<div>
47-
<?php echo HTMLHelper::_('access.usergroups', 'jform[rules]', $this->item->rules, true); ?>
48-
</div>
31+
<?php echo HTMLHelper::_('access.usergroups', 'jform[rules]', $this->item->rules, true); ?>
4932
</fieldset>
5033
<?php echo HTMLHelper::_('uitab.endTab'); ?>
51-
5234
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
53-
5435
<input type="hidden" name="task" value="">
5536
<?php echo HTMLHelper::_('form.token'); ?>
56-
</form>
37+
</form>

administrator/language/en-GB/com_users.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ COM_USERS_LBL_SELECT_INSTRUCTIONS="Please select how you would like to verify yo
200200
COM_USERS_LEVELS_N_ITEMS_DELETED="%d View Permission Levels deleted."
201201
COM_USERS_LEVELS_N_ITEMS_DELETED_1="View Permission Level deleted."
202202
COM_USERS_LEVELS_TABLE_CAPTION="Viewing Access Levels"
203+
; The following string is deprecated and will be removed with 8.0
203204
COM_USERS_LEVEL_DETAILS="Level Details"
204205
COM_USERS_LEVEL_FIELD_TITLE_LABEL="Level Title"
205206
COM_USERS_LEVEL_FORM_EDIT="Edit Viewing Access Level"

tests/System/integration/administrator/components/com_users/Levels.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('Test in backend that the user access level list', () => {
1919
it('can open the access level form', () => {
2020
cy.clickToolbarButton('New');
2121

22-
cy.contains('Level Details');
22+
cy.contains('User Groups With Viewing Access');
2323
});
2424

2525
it('can delete the test level', () => {

0 commit comments

Comments
 (0)