Redesign the User Groups form page
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
514d5362c8
commit
835fc2715d
@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #17632 Improve tab keypress to text fields on the login form
|
||||
- issue Make database and web server info separately configurable on `$cfg['ShowServerInfo']`
|
||||
- issue Add a configuration option to (dis)allow shared bookmarks: `$cfg['AllowSharedBookmarks'] = true;`
|
||||
- issue Redesign the User Groups form page
|
||||
|
||||
5.2.2 (not yet released)
|
||||
- issue #17028 Fix total count of rows in not accurate
|
||||
|
||||
@ -589,8 +589,7 @@ div#tablestatistics table {
|
||||
}
|
||||
}
|
||||
|
||||
#fieldset_user_global_rights .pma-fieldset,
|
||||
#fieldset_user_group_rights .pma-fieldset {
|
||||
#fieldset_user_global_rights .pma-fieldset {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
@ -802,8 +802,7 @@ div#tablestatistics table {
|
||||
}
|
||||
}
|
||||
|
||||
#fieldset_user_global_rights .pma-fieldset,
|
||||
#fieldset_user_group_rights .pma-fieldset {
|
||||
#fieldset_user_global_rights .pma-fieldset {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
@ -623,8 +623,7 @@ div#tablestatistics table {
|
||||
}
|
||||
}
|
||||
|
||||
#fieldset_user_global_rights .pma-fieldset,
|
||||
#fieldset_user_group_rights .pma-fieldset {
|
||||
#fieldset_user_global_rights .pma-fieldset {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
@ -762,8 +762,7 @@ div#tablestatistics table {
|
||||
}
|
||||
}
|
||||
|
||||
#fieldset_user_global_rights .pma-fieldset,
|
||||
#fieldset_user_group_rights .pma-fieldset {
|
||||
#fieldset_user_global_rights .pma-fieldset {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
@ -1,23 +1,34 @@
|
||||
{% if user_group == null %}
|
||||
<h2>{% trans 'Add user group' %}</h2>
|
||||
{% else %}
|
||||
<div class="container">
|
||||
{% if user_group == null %}
|
||||
<h2>{{ 'Add user group'|trans }}</h2>
|
||||
{% else %}
|
||||
<h2>{{ 'Edit user group: \'%s\''|trans|format(edit_user_group_special_chars) }}</h2>
|
||||
{% endif %}
|
||||
<form name="userGroupForm" id="userGroupForm" action="{{ user_group_url|raw }}" method="post">
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ user_group_url|raw }}" method="post" class="card disableAjax">
|
||||
{{ hidden_inputs|raw }}
|
||||
<fieldset class="pma-fieldset" id="fieldset_user_group_rights">
|
||||
<legend>{% trans 'User group menu assignments' %}
|
||||
<input type="checkbox" id="addUsersForm_checkall" class="checkall_box" title="Check all">
|
||||
<label for="addUsersForm_checkall">{% trans 'Check all' %}</label>
|
||||
</legend>
|
||||
{% if user_group == null %}
|
||||
<label for="userGroup">{% trans 'Group name:' %}</label>
|
||||
<input type="text" name="userGroup" maxlength="64" autocomplete="off" required="required">
|
||||
<div class="clearfloat"></div>
|
||||
{% endif %}
|
||||
<div class="card-header">{{ 'User group menu assignments'|trans }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if user_group == null %}
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="userGroup">{{ 'Group name:'|trans }}</label>
|
||||
<input class="form-control" type="text" name="userGroup" id="userGroup" maxlength="64" autocomplete="off" required>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-check mb-3">
|
||||
<input class="form-check-input checkall_box" type="checkbox" id="addUsersForm_checkall" title="{{ 'Check all'|trans }}">
|
||||
<label class="form-check-label" for="addUsersForm_checkall">{{ 'Check all'|trans }}</label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{ tab_list|raw }}
|
||||
</fieldset>
|
||||
<fieldset id="fieldset_user_group_rights_footer" class="pma-fieldset tblFooters">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<input class="btn btn-primary" type="submit" value="{{ user_group == null ? 'Add user group'|trans : 'Edit user group'|trans }}">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend>
|
||||
{{ title }}
|
||||
</legend>
|
||||
{% for tab_detail in tab_details %}
|
||||
<div class="item">
|
||||
<input type="checkbox" class="checkall"{{ tab_detail.in_array|raw }} name="{{ level }}_{{ tab_detail.tab }}" value="Y">
|
||||
<label for="{{ level }}_{{ tab_detail.tab }}">
|
||||
<code>{{ tab_detail.tab_name }}</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<fieldset class="mb-3 col">
|
||||
<legend>{{ title }}</legend>
|
||||
{% for tab_detail in tab_details %}
|
||||
<div class="form-check">
|
||||
<input class="form-check-input checkall" type="checkbox"{{ tab_detail.in_array|raw }} name="{{ level }}_{{ tab_detail.tab }}" id="{{ level }}_{{ tab_detail.tab }}" value="Y">
|
||||
<label class="form-check-label" for="{{ level }}_{{ tab_detail.tab }}">{{ tab_detail.tab_name }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
||||
@ -59,8 +59,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<fieldset class="pma-fieldset" id="fieldset_add_user_group">
|
||||
<a href="{{ add_user_url|raw }}">{{ add_user_icon|raw }}{% trans 'Add user group' %}</a>
|
||||
</fieldset>
|
||||
<div>
|
||||
<a class="btn btn-primary" href="{{ add_user_url|raw }}">{{ add_user_icon|raw }}{% trans 'Add user group' %}</a>
|
||||
</div>
|
||||
|
||||
@ -65,7 +65,7 @@ class UserGroupsTest extends AbstractTestCase
|
||||
|
||||
$html = UserGroups::getHtmlForUserGroupsTable($this->configurableMenusFeature);
|
||||
$this->assertStringNotContainsString('<table id="userGroupsTable">', $html);
|
||||
$urlTag = '<a href="' . Url::getFromRoute('/server/user-groups', ['addUserGroup' => 1]);
|
||||
$urlTag = '<a class="btn btn-primary" href="' . Url::getFromRoute('/server/user-groups', ['addUserGroup' => 1]);
|
||||
$this->assertStringContainsString($urlTag, $html);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ class UserGroupsTest extends AbstractTestCase
|
||||
// adding a user group
|
||||
$html = UserGroups::getHtmlToEditUserGroup($this->configurableMenusFeature);
|
||||
$this->assertStringContainsString('<input type="hidden" name="addUserGroupSubmit" value="1"', $html);
|
||||
$this->assertStringContainsString('<input type="text" name="userGroup"', $html);
|
||||
$this->assertStringContainsString('<input class="form-control" type="text" name="userGroup"', $html);
|
||||
|
||||
$resultStub = $this->createMock(DummyResult::class);
|
||||
|
||||
@ -145,11 +145,13 @@ class UserGroupsTest extends AbstractTestCase
|
||||
$this->assertStringContainsString('<input type="hidden" name="editUserGroupSubmit" value="1"', $html);
|
||||
$this->assertStringContainsString('<input type="hidden" name="editUserGroupSubmit" value="1"', $html);
|
||||
$this->assertStringContainsString(
|
||||
'<input type="checkbox" class="checkall" checked="checked" name="server_sql" value="Y">',
|
||||
'<input class="form-check-input checkall" type="checkbox"'
|
||||
. ' checked="checked" name="server_sql" id="server_sql" value="Y">',
|
||||
$html,
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'<input type="checkbox" class="checkall" name="server_databases" value="Y">',
|
||||
'<input class="form-check-input checkall" type="checkbox"'
|
||||
. ' name="server_databases" id="server_databases" value="Y">',
|
||||
$html,
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user