Couple of UI bugs fixed

This commit is contained in:
Pinga 2024-02-14 13:48:33 +02:00
parent 92187934c2
commit 02ead21857
6 changed files with 24 additions and 22 deletions

View file

@ -247,7 +247,6 @@ class SystemController extends Controller
$validators = [ $validators = [
'extension' => v::stringType()->notEmpty()->length(3, 64), 'extension' => v::stringType()->notEmpty()->length(3, 64),
'tldType' => v::stringType()->notEmpty(),
'script' => v::stringType()->notEmpty(), 'script' => v::stringType()->notEmpty(),
'createm0' => v::numericVal()->between(0.00, 9999999.99, true), 'createm0' => v::numericVal()->between(0.00, 9999999.99, true),
'createm12' => v::numericVal()->between(0.00, 9999999.99, true), 'createm12' => v::numericVal()->between(0.00, 9999999.99, true),
@ -879,8 +878,17 @@ class SystemController extends Controller
$scriptName = 'Unknown'; // Default or fallback script name $scriptName = 'Unknown'; // Default or fallback script name
} }
if (strpos(strtolower($tld['tld']), '.xn--') === 0) {
$tld['tld'] = ltrim($tld['tld'], '.');
$tld_u = '.'.idn_to_utf8($tld['tld'], 0, INTL_IDNA_VARIANT_UTS46);
$tld['tld'] = '.'.$tld['tld'];
} else {
$tld_u = $tld['tld'];
}
return view($response,'admin/system/manageTld.twig', [ return view($response,'admin/system/manageTld.twig', [
'tld' => $tld, 'tld' => $tld,
'tld_u' => $tld_u,
'scriptName' => $scriptName, 'scriptName' => $scriptName,
'createPrices' => $createPrices, 'createPrices' => $createPrices,
'renewPrices' => $renewPrices, 'renewPrices' => $renewPrices,

View file

@ -60,6 +60,8 @@ class Mail
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
return false; return false;
} }
} else {
return true;
} }
} }
} }

View file

@ -13,7 +13,7 @@ DB_PORT=3306
#mailer settings (Driver = smtp or utopia, Api Provder = sendgrid or mailgun) #mailer settings (Driver = smtp or utopia, Api Provder = sendgrid or mailgun)
MAIL_DRIVER=smtp MAIL_DRIVER=none
MAIL_HOST=smtp.mailtrap.io MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525 MAIL_PORT=2525
MAIL_USERNAME=username MAIL_USERNAME=username

View file

@ -44,14 +44,6 @@
</label> </label>
<small class="form-text text-muted">{{ __('DNSSEC is currently activated manually. This option is for display purposes only.') }}</small> <small class="form-text text-muted">{{ __('DNSSEC is currently activated manually. This option is for display purposes only.') }}</small>
</div> </div>
<div class="mb-3">
<label for="tldTypeSelector" class="form-label required">{{ __('TLD Type') }}</label>
<select class="form-select" id="tldTypeSelector" name="tldType" required>
<option value="ccTLD">ccTLD</option>
<option value="gTLD">gTLD</option>
</select>
<small class="form-text text-muted">{{ __('Select the type of TLD: ccTLD (Country Code Top-Level Domain) or gTLD (Generic Top-Level Domain).') }}</small>
</div>
<div class="mb-3"> <div class="mb-3">
<label for="scriptDropdown" class="form-label required">{{ __('Supported Script') }}</label> <label for="scriptDropdown" class="form-label required">{{ __('Supported Script') }}</label>
<select class="form-select" id="scriptDropdown" name="script" required> <select class="form-select" id="scriptDropdown" name="script" required>

View file

@ -14,7 +14,7 @@
{{ __('Overview') }} {{ __('Overview') }}
</div> </div>
<h2 class="page-title"> <h2 class="page-title">
{{ __('Manage TLD') }} {{ tld.tld }} {{ __('Manage TLD') }} {{ tld_u }}
</h2> </h2>
</div> </div>
</div> </div>
@ -34,7 +34,7 @@
<div class="card-body"> <div class="card-body">
<div class="mb-3"> <div class="mb-3">
<label for="tldName" class="form-label">{{ __('TLD Extension') }}</label> <label for="tldName" class="form-label">{{ __('TLD Extension') }}</label>
<div class="form-control-plaintext">{{ tld.tld }}</div> <div class="form-control-plaintext">{{ tld_u }}</div>
<input type="hidden" name="extension" value="{{ tld.tld }}"> <input type="hidden" name="extension" value="{{ tld.tld }}">
</div> </div>
<div class="mb-3"> <div class="mb-3">
@ -45,7 +45,7 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="tldTypeSelector" class="form-label">{{ __('TLD Type') }}</label> <label for="tldTypeSelector" class="form-label">{{ __('TLD Type') }}</label>
<div class="form-control-plaintext">ccTLD/gTLD</div> <div class="form-control-plaintext">{{ tld_u|length == 3 ? 'ccTLD' : (tld_u|length > 3 ? 'gTLD' : '') }}</div>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="scriptDropdown" class="form-label">{{ __('Supported Script') }}</label> <label for="scriptDropdown" class="form-label">{{ __('Supported Script') }}</label>
@ -141,7 +141,7 @@
<label for="premiumNamesFile" class="form-label">{{ __('Upload CSV File') }}</label> <label for="premiumNamesFile" class="form-label">{{ __('Upload CSV File') }}</label>
<input type="file" class="form-control" id="premiumNamesFile" name="premiumNamesFile" accept=".csv"> <input type="file" class="form-control" id="premiumNamesFile" name="premiumNamesFile" accept=".csv">
<small class="form-text text-muted"> <small class="form-text text-muted">
{{ __('Please upload a CSV file containing premium names. Each row should include a name and its corresponding pricing category, separated by a comma. Note: If one or more names in the file already exist in our system, they will be overwritten with the new information provided in the upload.') }} {{ __('Please upload a CSV file containing premium names. Each row should include a name and its corresponding pricing category, separated by a comma. Note: If one or more names in the file already exist in our system, they will be overwritten with the new information provided in the upload.') }}
</small> </small>
</div> </div>
@ -184,7 +184,7 @@
<div class="card-footer"> <div class="card-footer">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-auto"> <div class="col-auto">
<button type="submit" class="btn btn-primary">{{ __('Update TLD') }} {{ tld.tld }}</button> <button type="submit" class="btn btn-primary">{{ __('Update TLD') }} {{ tld_u }}</button>
</div> </div>
</div> </div>
</div> </div>

View file

@ -23,9 +23,9 @@
function roleLabelFormatter(cell) { function roleLabelFormatter(cell) {
var value = cell.getValue(); var value = cell.getValue();
if (value === 0) { if (value === 0) {
return '<span class="badge bg-purple-lt">Administrator</span>'; return '<span class="status status-purple">Administrator</span>';
} else if (value === 4) { } else if (value === 4) {
return '<span class="badge bg-indigo-lt">Registrar</span>'; return '<span class="status status-indigo">Registrar</span>';
} }
return value; // If the value is neither 0 nor 4, return it as is return value; // If the value is neither 0 nor 4, return it as is
} }
@ -33,11 +33,11 @@
function verifiedFormatter(cell) { function verifiedFormatter(cell) {
var value = cell.getValue(); var value = cell.getValue();
if (value === false) { if (value === false) {
return '<span class="badge bg-orange-lt">Pending</span>'; return '<span class="status status-orange">Pending</span>';
} else if (value === true) { } else if (value === true) {
return '<span class="badge bg-green-lt">ok</span>'; return '<span class="status status-green">ok</span>';
} else { } else {
return '<span class="badge bg-dark-lt">?</span>'; return '<span class="status status-dark">?</span>';
} }
return value; return value;
} }
@ -45,9 +45,9 @@
function statusBadgeFormatter(cell) { function statusBadgeFormatter(cell) {
var value = cell.getValue(); var value = cell.getValue();
if (value === 0) { if (value === 0) {
return '<span class="badge bg-green-lt">ok</span>'; return '<span class="status status-green">ok</span>';
} else { } else {
return '<span class="badge bg-red-lt">Trouble</span>'; return '<span class="status status-red">Trouble</span>';
} }
} }