-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added option to manage custom registrar pricing #129
- Loading branch information
Showing
4 changed files
with
188 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{% extends "layouts/app.twig" %} | ||
|
||
{% block title %}{{ __('Manage Custom Pricing') }}{% endblock %} | ||
|
||
{% block content %} | ||
<div class="page-wrapper"> | ||
<!-- Page header --> | ||
<div class="page-header d-print-none"> | ||
<div class="container-xl"> | ||
<div class="row g-2 align-items-center"> | ||
<div class="col"> | ||
<!-- Page pre-title --> | ||
<div class="page-pretitle"> | ||
{{ __('Overview') }} | ||
</div> | ||
<h2 class="page-title"> | ||
{{ __('Manage Custom Pricing') }} | ||
</h2> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- Page body --> | ||
<div class="page-body"> | ||
<div class="container-xl"> | ||
<div class="col-12"> | ||
{% include 'partials/flash.twig' %} | ||
<form action="/registrar/pricing/{{ clid }}" method="post"> | ||
{{ csrf.field | raw }} | ||
<div class="card mb-3"> | ||
<div class="card-header"> | ||
<h3 class="card-title">{{ __('Registrar') }} {{ name }}</h3> | ||
<div class="card-actions"> | ||
<!--<button type="submit" class="btn btn-primary"> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><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 Prices') }} | ||
</button>--> | ||
</div> | ||
</div> | ||
<div class="card-body"> | ||
<div class="alert alert-info" role="alert"> | ||
{{ __('Custom registrar pricing can currently be viewed in this panel but must be managed directly via the database.') }} | ||
</div> | ||
<div class="table-responsive"> | ||
<table class="table table-vcenter table-bordered"> | ||
<thead> | ||
<tr> | ||
<th>{{ __('TLD') }} / {{ __('Command') }}</th> | ||
<th>{{ __('Create') }}</th> | ||
<th>{{ __('Renew') }}</th> | ||
<th>{{ __('Transfer') }}</th> | ||
<th>{{ __('Restore Price') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for tld in tlds %} | ||
<tr> | ||
<td>{{ tld.tld }}</td> | ||
{% if tld.createPrices or tld.renewPrices or tld.transferPrices or tld.tld_restore %} | ||
<td> | ||
{% if tld.createPrices %} | ||
{% for year in [12, 24, 36, 48, 60, 72, 84, 96, 108, 120] %} | ||
<div class="row mb-2"> | ||
<div class="col-auto"> | ||
<label class="form-label">{{ year/12 }} Year{{ year > 12 ? 's' : '' }}</label> | ||
</div> | ||
<div class="col"> | ||
<input type="text" class="form-control" name="create_{{ tld.tld }}_{{ year }}" value="{{ attribute(tld.createPrices, 'm' ~ year) | default('N/A') }}"> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% else %} | ||
N/A | ||
{% endif %} | ||
</td> | ||
<td> | ||
{% if tld.renewPrices %} | ||
{% for year in [12, 24, 36, 48, 60, 72, 84, 96, 108, 120] %} | ||
<div class="row mb-2"> | ||
<div class="col-auto"> | ||
<label class="form-label">{{ year/12 }} Year{{ year > 12 ? 's' : '' }}</label> | ||
</div> | ||
<div class="col"> | ||
<input type="text" class="form-control" name="renew_{{ tld.tld }}_{{ year }}" value="{{ attribute(tld.renewPrices, 'm' ~ year) | default('N/A') }}"> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% else %} | ||
N/A | ||
{% endif %} | ||
</td> | ||
<td> | ||
{% if tld.transferPrices %} | ||
{% for year in [12, 24, 36, 48, 60, 72, 84, 96, 108, 120] %} | ||
<div class="row mb-2"> | ||
<div class="col-auto"> | ||
<label class="form-label">{{ year/12 }} Year{{ year > 12 ? 's' : '' }}</label> | ||
</div> | ||
<div class="col"> | ||
<input type="text" class="form-control" name="transfer_{{ tld.tld }}_{{ year }}" value="{{ attribute(tld.transferPrices, 'm' ~ year) | default('N/A') }}"> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% else %} | ||
N/A | ||
{% endif %} | ||
</td> | ||
<td> | ||
{% if tld.tld_restore %} | ||
<input type="text" class="form-control" name="restore_{{ tld.tld }}" value="{{ tld.tld_restore.price | default('N/A') }}"> | ||
{% else %} | ||
N/A | ||
{% endif %} | ||
</td> | ||
{% else %} | ||
<td colspan="4">{{ __('Registrar does not have custom prices for') }} {{ tld.tld }}</td> | ||
{% endif %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{% include 'partials/footer.twig' %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters