mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
UI improvements for virtual form labels and search spacing (#1052)
small UI and translation fixes for virtual/admin forms. Changes: - Adds PALANG entry for the domain search placeholder. - Replaces the hardcoded domain search placeholder in edit forms. - Shows the Domain label when creating aliases and mailboxes. - Uses Bootstrap 5 form-select for generated select controls. - Adds minor spacing for the virtual search field. Thanks @trapoSAMA
This commit is contained in:
1 parent
42fd9870d4
commit
43fbf7e56b
7 files changed
+10
-6
No files matched your search
@@ -110,6 +110,7 @@ $PALANG['no_domains_for_this_admin'] = 'You don\'t have permissions for any doma
|
||||
$PALANG['no_domains_exist'] = 'You have to create at least one domain before you can use virtual list.'; # "virtual list" should match $PALANG['pAdminMenu_list_virtual']
|
||||
|
||||
$PALANG['domain'] = 'Domain';
|
||||
$PALANG['search_domains'] = 'Search for domains...';
|
||||
$PALANG['pOverview_get_alias_domains'] = 'Domain Aliases';
|
||||
$PALANG['mailboxes'] = 'Mailboxes';
|
||||
$PALANG['pOverview_get_quota'] = 'Mailbox Quota (MB)';
|
||||
|
||||
@@ -102,6 +102,7 @@ $PALANG['no_domains_for_this_admin'] = 'No tienes permisos sobre ningún dominio
|
||||
$PALANG['no_domains_exist'] = 'Debes crear al menos un dominio antes de usar la lista virtual.';
|
||||
|
||||
$PALANG['domain'] = 'Dominio';
|
||||
$PALANG['search_domains'] = 'Buscar dominios...';
|
||||
$PALANG['pOverview_get_alias_domains'] = 'Alias de Dominios';
|
||||
$PALANG['mailboxes'] = 'Buzones';
|
||||
$PALANG['pOverview_get_quota'] = 'Cuota de buzón (MB)';
|
||||
|
||||
@@ -32,7 +32,7 @@ class AliasHandler extends PFAHandler
|
||||
'localpart' => self::pacol($this->new, 0, 0, 'text', 'alias' , 'pCreate_alias_catchall_text' , '',
|
||||
/*options*/ array(),
|
||||
/*not_in_db*/ 1),
|
||||
'domain' => self::pacol($this->new, 0, 1, 'enum', '' , '' , '',
|
||||
'domain' => self::pacol($this->new, 0, 1, 'enum', 'domain' , '' , '',
|
||||
/*options*/ $this->allowed_domains),
|
||||
'description' => self::pacol(1, 1, 1, 'text', 'description' , ''),
|
||||
'goto' => self::pacol(1, 1, 1, 'txtl', 'to' , 'pEdit_alias_help' , array()),
|
||||
|
||||
@@ -34,7 +34,7 @@ class MailboxHandler extends PFAHandler
|
||||
'local_part' => self::pacol($this->new, 0, 0, 'text', 'pEdit_mailbox_username', '', '',
|
||||
/*options*/ array('legal_chars' => Config::read('username_legal_chars'), 'legal_char_warning' => Config::lang('pLegal_char_warning'))
|
||||
),
|
||||
'domain' => self::pacol($this->new, 0, 1, 'enum', '', '', '',
|
||||
'domain' => self::pacol($this->new, 0, 1, 'enum', 'domain', '', '',
|
||||
/*options*/ $this->allowed_domains),
|
||||
# TODO: maildir: display in list is needed to include maildir in SQL result (for post_edit hook)
|
||||
# TODO: (not a perfect solution, but works for now - maybe we need a separate "include in SELECT query" field?)
|
||||
|
||||
Vendored
+2
@@ -156,3 +156,5 @@ div#login{ max-width: 35em; }
|
||||
.mailbox-list-scroll > #mailbox_table { min-width: 820px; margin-bottom: 0; }
|
||||
.virtual-list-scroll { display: block; width: 100%; overflow-x: auto; }
|
||||
.virtual-list-scroll > #admin_table { min-width: 720px; margin-bottom: 0; }
|
||||
.virtual-search form { margin-bottom: .25rem; }
|
||||
.virtual-search .form-control { margin-left: auto; max-width: 18rem; }
|
||||
@@ -31,17 +31,17 @@
|
||||
name="value[{$key}]"{if {$value_{$key}} == 1} checked="checked"{/if}/>
|
||||
</label></div>
|
||||
{elseif $field.type == 'enum'}
|
||||
<select class="form-control" name="value[{$key}]" id="{$key}">
|
||||
<select class="form-select" name="value[{$key}]" id="{$key}">
|
||||
{html_options output=$struct.{$key}.options values=$struct.{$key}.options selected=$value_{$key}}
|
||||
</select>
|
||||
{elseif $field.type == 'enma'}
|
||||
<select class="form-control" name="value[{$key}]" id="{$key}">
|
||||
<select class="form-select" name="value[{$key}]" id="{$key}">
|
||||
{html_options options=$struct.{$key}.options selected=$value_{$key}}
|
||||
</select>
|
||||
{elseif $field.type == 'list'}
|
||||
<input type="text" class="form-control" style="margin-bottom : 25px;"
|
||||
id="id_searchDomains" onkeyup="searchDomains()"
|
||||
placeholder="Search for domains..." title="search domains">
|
||||
placeholder="{$PALANG.search_domains}" title="{$PALANG.search_domains}">
|
||||
<ul id="domainsList" name="value[{$key}][]"
|
||||
style="max-height : 250px; overflow: auto;">
|
||||
{foreach from=$struct.{$key}.options item=domain}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<noscript><input class="button" type="submit" name="go" value="{$PALANG.go}"/></noscript>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-5 offset-md-2 text-right">{#form_search#}</div>
|
||||
<div class="col-md-5 offset-md-2 text-right virtual-search">{#form_search#}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
Reference in new issue
Block a user