Small UA fixes in domain view in CP

This commit is contained in:
Pinga 2024-12-06 20:37:00 +02:00
parent d431f5f582
commit 33f3b3420a
4 changed files with 17 additions and 6 deletions

View file

@ -674,6 +674,13 @@ class ApplicationsController extends Controller
WHERE dcm.domain_id = ?'; WHERE dcm.domain_id = ?';
$domainContacts = $db->select($domainContactsQuery, [$domain['id']]); $domainContacts = $db->select($domainContactsQuery, [$domain['id']]);
if (strpos($domain['name'], 'xn--') === 0) {
$domain['name_o'] = $domain['name'];
$domain['name'] = idn_to_utf8($domain['name'], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
} else {
$domain['name_o'] = $domain['name'];
}
return view($response,'admin/domains/viewApplication.twig', [ return view($response,'admin/domains/viewApplication.twig', [
'domain' => $domain, 'domain' => $domain,
'domainStatus' => $domainStatus, 'domainStatus' => $domainStatus,

View file

@ -1006,8 +1006,12 @@ class DomainsController extends Controller
$domainContacts = $db->select($domainContactsQuery, [$domain['id']]); $domainContacts = $db->select($domainContactsQuery, [$domain['id']]);
if (strpos($domain['name'], 'xn--') === 0) { if (strpos($domain['name'], 'xn--') === 0) {
$domain['name_o'] = $domain['name'];
$domain['name'] = idn_to_utf8($domain['name'], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46); $domain['name'] = idn_to_utf8($domain['name'], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
} else {
$domain['name_o'] = $domain['name'];
} }
return view($response,'admin/domains/viewDomain.twig', [ return view($response,'admin/domains/viewDomain.twig', [
'domain' => $domain, 'domain' => $domain,
'domainStatus' => $domainStatus, 'domainStatus' => $domainStatus,

View file

@ -20,11 +20,11 @@
<!-- Page title actions --> <!-- Page title actions -->
<div class="col-auto ms-auto d-print-none"> <div class="col-auto ms-auto d-print-none">
<div class="btn-list"> <div class="btn-list">
<a href="/application/update/{{ domain.name }}" class="btn btn-outline-info d-none d-sm-inline-block"> <a href="/application/update/{{ domain.name_o }}" class="btn btn-outline-info d-none d-sm-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg>
{{ __('Update Application') }} {{ __('Update Application') }}
</a> </a>
<a href="/application/update/{{ domain.name }}" class="btn btn-outline-info d-sm-none btn-icon" aria-label="{{ __('Update Application') }}"> <a href="/application/update/{{ domain.name_o }}" class="btn btn-outline-info d-sm-none btn-icon" aria-label="{{ __('Update Application') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg>
</a> </a>
</div> </div>

View file

@ -20,18 +20,18 @@
<!-- Page title actions --> <!-- Page title actions -->
<div class="col-auto ms-auto d-print-none"> <div class="col-auto ms-auto d-print-none">
<div class="btn-list"> <div class="btn-list">
<a href="/domain/renew/{{ domain.name }}" class="btn btn-outline-success d-none d-sm-inline-block"> <a href="/domain/renew/{{ domain.name_o }}" class="btn btn-outline-success d-none d-sm-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" /></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" /></svg>
{{ __('Renew Domain') }} {{ __('Renew Domain') }}
</a> </a>
<a href="/domain/renew/{{ domain.name }}" class="btn btn-outline-success d-sm-none btn-icon" aria-label="{{ __('Renew Domain') }}"> <a href="/domain/renew/{{ domain.name_o }}" class="btn btn-outline-success d-sm-none btn-icon" aria-label="{{ __('Renew Domain') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" /></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" /></svg>
</a> </a>
<a href="/domain/update/{{ domain.name }}" class="btn btn-outline-info d-none d-sm-inline-block"> <a href="/domain/update/{{ domain.name_o }}" class="btn btn-outline-info d-none d-sm-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg>
{{ __('Update Domain') }} {{ __('Update Domain') }}
</a> </a>
<a href="/domain/update/{{ domain.name }}" class="btn btn-outline-info d-sm-none btn-icon" aria-label="{{ __('Update Domain') }}"> <a href="/domain/update/{{ domain.name_o }}" class="btn btn-outline-info d-sm-none btn-icon" aria-label="{{ __('Update Domain') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg>
</a> </a>
</div> </div>