mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-07 10:05:06 +02:00
577 lines
No EOL
35 KiB
Twig
577 lines
No EOL
35 KiB
Twig
{% extends "layouts/app.twig" %}
|
|
|
|
{% block title %}{{ __('Update Registrar') }} {{ registrar.name }}{% 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">
|
|
<div class="mb-1">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="{{route('home')}}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><polyline points="5 12 3 12 12 3 21 12 19 12" /><path d="M5 12v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8" /><rect x="10" y="12" width="4" height="4" /></svg></a>
|
|
</li>
|
|
<li class="breadcrumb-item active">
|
|
{{ __('Update Registrar') }}
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<h2 class="page-title">
|
|
{{ __('Update Registrar') }} {{ registrar.name }}
|
|
</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/edit" method="post" autocomplete="off">
|
|
{{ csrf.field | raw }}
|
|
<!-- Registrar Details Card -->
|
|
<div class="card mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ __('Registrar Details') }}</h5>
|
|
<div class="row">
|
|
<!-- First Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label required">{{ __('Name') }}</label>
|
|
<input type="text" class="form-control" id="name" name="name" required value="{{ registrar.name }}" autocomplete="off">
|
|
<small class="text-muted">{{ __('The official name of the registrar.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ianaId" class="form-label">IANA ID</label>
|
|
<input type="number" class="form-control" id="ianaId" name="ianaId" value="{{ registrar.iana_id }}">
|
|
<small class="text-muted">{{ __('Unique identifier assigned by IANA.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="email" class="form-label required">{{ __('Email') }}</label>
|
|
<input type="text" class="form-control" id="email" name="email" required autocapitalize="none" value="{{ registrar.email }}" autocomplete="off">
|
|
<small class="text-muted">{{ __('Primary contact email of the registrar.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="url" class="form-label required">{{ __('URL') }}</label>
|
|
<input type="text" class="form-control" id="url" name="url" required autocapitalize="none" value="{{ registrar.url }}">
|
|
<small class="text-muted">{{ __('Registrar\'s official website URL.') }}</small>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Second Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="whoisServer" class="form-label required">{{ __('WHOIS Server') }}</label>
|
|
<input type="text" class="form-control" id="whoisServer" name="whoisServer" required autocapitalize="none" value="{{ registrar.whois_server }}">
|
|
<small class="text-muted">{{ __('Address of the registrar\'s WHOIS server.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="rdapServer" class="form-label required">{{ __('RDAP Server') }}</label>
|
|
<input type="text" class="form-control" id="rdapServer" name="rdapServer" required autocapitalize="none" value="{{ registrar.rdap_server }}">
|
|
<small class="text-muted">{{ __('Address of the registrar\'s RDAP server.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseMainEmail" class="form-label required">{{ __('Abuse Email') }}</label>
|
|
<input type="text" class="form-control" id="abuseMainEmail" name="abuseEmail" required autocapitalize="none" value="{{ registrar.abuse_email }}">
|
|
<small class="text-muted">{{ __('Email address for reporting abuse.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abusePhone" class="form-label required">{{ __('Abuse Phone') }}</label>
|
|
<input type="tel" class="form-control" id="abusePhone" name="abusePhone" required value="{{ registrar.abuse_phone }}">
|
|
<small class="text-muted">{{ __('Phone number for reporting abuse.') }}</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Financial Information Card -->
|
|
<div class="card mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ __('Financial Information') }}</h5>
|
|
<div class="row">
|
|
<!-- First Column -->
|
|
<div class="col-md-4">
|
|
<div class="mb-3">
|
|
<div class="form-label">{{ __('Account Balance') }}</div>
|
|
<div class="form-control-plaintext">{{ registrar.currency }} {{ registrar.accountBalance }}</div>
|
|
<small class="text-muted">{{ __('Current balance in the registrar\'s account.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<div class="form-label">{{ __('Credit Limit') }}</div>
|
|
<div class="form-control-plaintext">{{ registrar.currency }} {{ registrar.creditLimit }}</div>
|
|
<small class="text-muted">{{ __('Maximum credit limit for the registrar.') }}</small>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Second Column -->
|
|
<div class="col-md-4">
|
|
<div class="mb-3">
|
|
<div class="form-label">{{ __('Credit Threshold') }}</div>
|
|
<div class="form-control-plaintext">{{ registrar.currency }} {{ registrar.creditThreshold }}</div>
|
|
<small class="text-muted">{{ __('Credit threshold triggering alerts or actions.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<div class="form-label">{{ __('Threshold Type') }}</div>
|
|
<div class="form-control-plaintext">{{ registrar.thresholdType|slice(0, 1)|upper ~ registrar.thresholdType|slice(1) }}</div>
|
|
<small class="text-muted">{{ __('Type of threshold: fixed value or percentage.') }}</small>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Third Column -->
|
|
<div class="col-md-4">
|
|
<div class="mb-3">
|
|
<div class="form-label">{{ __('Company Number') }}</div>
|
|
<div class="form-control-plaintext">{{ registrar.companyNumber|default('N/A') }}</div>
|
|
<small class="text-muted">{{ __('Official registration number provided by the relevant authority.') }}</small>
|
|
</div>
|
|
<div class="mb-3">
|
|
<div class="form-label">{{ __('VAT Number') }}</div>
|
|
<div class="form-control-plaintext">{{ registrar.vatNumber|default('N/A') }}</div>
|
|
<small class="text-muted">{{ __('VAT number for tax purposes, if registered for VAT.') }}</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Registrar Contacts Section with Tabs -->
|
|
<div class="card mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ __('Registrar Contacts') }}</h5>
|
|
<ul class="nav nav-tabs nav-fill" id="contactTabs" role="tablist">
|
|
<!-- Tab Headers -->
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link active" id="owner-tab" data-bs-toggle="tab" data-bs-target="#owner" type="button" role="tab" aria-controls="owner" aria-selected="true">{{ __('Owner') }}</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" id="billing-tab" data-bs-toggle="tab" data-bs-target="#billing" type="button" role="tab" aria-controls="billing" aria-selected="false">{{ __('Billing') }}</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" id="abuse-tab" data-bs-toggle="tab" data-bs-target="#abuse" type="button" role="tab" aria-controls="abuse" aria-selected="false">{{ __('Abuse') }}</button>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content" id="contactTabsContent">
|
|
<!-- Owner Tab -->
|
|
<div class="tab-pane fade show active" id="owner" role="tabpanel" aria-labelledby="owner-tab">
|
|
<div class="mt-3">
|
|
<div class="form-check mb-3">
|
|
<input class="form-check-input" type="checkbox" value="" id="copyOwnerData">
|
|
<label class="form-check-label" for="copyOwnerData">
|
|
<strong>{{ __('Copy data to other contacts') }}</strong>
|
|
</label>
|
|
</div>
|
|
<div class="row">
|
|
{% for contact in contacts %}
|
|
{% if contact.type == 'owner' %}
|
|
<!-- First Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="ownerFirstName" class="form-label required">{{ __('First Name') }}</label>
|
|
<input type="text" class="form-control" id="ownerFirstName" name="owner[first_name]" value="{{ contact.first_name }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerLastName" class="form-label required">{{ __('Last Name') }}</label>
|
|
<input type="text" class="form-control" id="ownerLastName" name="owner[last_name]" value="{{ contact.last_name }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerOrg" class="form-label">{{ __('Organization') }}</label>
|
|
<input type="text" class="form-control" id="ownerOrg" name="owner[org]" value="{{ contact.org }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerStreet1" class="form-label">{{ __('Street Address') }}</label>
|
|
<input type="text" class="form-control" id="ownerStreet1" name="owner[street1]" value="{{ contact.street1 }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerCity" class="form-label required">{{ __('City') }}</label>
|
|
<input type="text" class="form-control" id="ownerCity" name="owner[city]" value="{{ contact.city }}" required>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Second Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="ownerSp" class="form-label">{{ __('State/Province') }}</label>
|
|
<input type="text" class="form-control" id="ownerSp" name="owner[sp]" value="{{ contact.sp }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerPc" class="form-label">{{ __('Postal Code') }}</label>
|
|
<input type="text" class="form-control" id="ownerPc" name="owner[pc]" value="{{ contact.pc }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerCc" class="form-label required">{{ __('Country') }}</label>
|
|
<select class="form-select" id="ownerCc" name="owner[cc]" required="required">
|
|
{% for country in countries %}
|
|
<option value="{{ country.alpha2 }}" {% if country.alpha2|lower == contact.cc %}selected{% endif %}>{{ country.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerVoice" class="form-label">{{ __('Phone') }}</label>
|
|
<input type="tel" class="form-control" id="ownerVoice" name="owner[voice]" value="{{ contact.voice }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ownerEmail" class="form-label required">{{ __('Email') }}</label>
|
|
<input type="text" class="form-control" id="ownerEmail" name="owner[email]" required autocapitalize="none" value="{{ contact.email }}">
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Billing Tab -->
|
|
<div class="tab-pane fade" id="billing" role="tabpanel" aria-labelledby="billing-tab">
|
|
<div class="mt-3">
|
|
<div class="row">
|
|
{% for contact in contacts %}
|
|
{% if contact.type == 'billing' %}
|
|
<!-- First Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="billingFirstName" class="form-label required">{{ __('First Name') }}</label>
|
|
<input type="text" class="form-control" id="billingFirstName" name="billing[first_name]" value="{{ contact.first_name }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingLastName" class="form-label required">{{ __('Last Name') }}</label>
|
|
<input type="text" class="form-control" id="billingLastName" name="billing[last_name]" value="{{ contact.last_name }}"required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingOrg" class="form-label">{{ __('Organization') }}</label>
|
|
<input type="text" class="form-control" id="billingOrg" name="billing[org]" value="{{ contact.org }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingStreet1" class="form-label">{{ __('Street Address') }}</label>
|
|
<input type="text" class="form-control" id="billingStreet1" name="billing[street1]" value="{{ contact.street1 }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingCity" class="form-label required">{{ __('City') }}</label>
|
|
<input type="text" class="form-control" id="billingCity" name="billing[city]" value="{{ contact.city }}" required>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Second Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="billingSp" class="form-label">{{ __('State/Province') }}</label>
|
|
<input type="text" class="form-control" id="billingSp" name="billing[sp]" value="{{ contact.sp }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingPc" class="form-label">{{ __('Postal Code') }}</label>
|
|
<input type="text" class="form-control" id="billingPc" name="billing[pc]" value="{{ contact.pc }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingCc" class="form-label required">{{ __('Country') }}</label>
|
|
<select class="form-select" id="billingCc" name="billing[cc]" required="required">
|
|
{% for country in countries %}
|
|
<option value="{{ country.alpha2 }}" {% if country.alpha2|lower == contact.cc %}selected{% endif %}>{{ country.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingVoice" class="form-label">{{ __('Phone') }}</label>
|
|
<input type="tel" class="form-control" id="billingVoice" name="billing[voice]" value="{{ contact.voice }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="billingEmail" class="form-label required">{{ __('Email') }}</label>
|
|
<input type="text" class="form-control" id="billingEmail" name="billing[email]" required autocapitalize="none" value="{{ contact.email }}">
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Abuse Tab -->
|
|
<div class="tab-pane fade" id="abuse" role="tabpanel" aria-labelledby="abuse-tab">
|
|
<div class="mt-3">
|
|
<div class="row">
|
|
{% for contact in contacts %}
|
|
{% if contact.type == 'abuse' %}
|
|
<!-- First Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="abuseFirstName" class="form-label required">{{ __('First Name') }}</label>
|
|
<input type="text" class="form-control" id="abuseFirstName" name="abuse[first_name]" value="{{ contact.first_name }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseLastName" class="form-label required">{{ __('Last Name') }}</label>
|
|
<input type="text" class="form-control" id="abuseLastName" name="abuse[last_name]" value="{{ contact.last_name }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseOrg" class="form-label">{{ __('Organization') }}</label>
|
|
<input type="text" class="form-control" id="abuseOrg" name="abuse[org]" value="{{ contact.org }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseStreet1" class="form-label">{{ __('Street Address') }}</label>
|
|
<input type="text" class="form-control" id="abuseStreet1" name="abuse[street1]" value="{{ contact.street1 }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseCity" class="form-label required">{{ __('City') }}</label>
|
|
<input type="text" class="form-control" id="abuseCity" name="abuse[city]" required value="{{ contact.city }}">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Second Column -->
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="abuseSp" class="form-label">{{ __('State/Province') }}</label>
|
|
<input type="text" class="form-control" id="abuseSp" name="abuse[sp]" value="{{ contact.sp }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abusePc" class="form-label">{{ __('Postal Code') }}</label>
|
|
<input type="text" class="form-control" id="abusePc" name="abuse[pc]" value="{{ contact.pc }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseCc" class="form-label required">{{ __('Country') }}</label>
|
|
<select class="form-select" id="abuseCc" name="abuse[cc]" required="required">
|
|
{% for country in countries %}
|
|
<option value="{{ country.alpha2 }}" {% if country.alpha2|lower == contact.cc %}selected{% endif %}>{{ country.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseVoice" class="form-label">{{ __('Phone') }}</label>
|
|
<input type="tel" class="form-control" id="abuseVoice" name="abuse[voice]" value="{{ contact.voice }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="abuseEmail" class="form-label required">{{ __('Email') }}</label>
|
|
<input type="text" class="form-control" id="abuseEmail" name="abuse[email]" required autocapitalize="none" value="{{ contact.email }}">
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<!-- IP Whitelisting Column -->
|
|
<div class="col-md-6 mb-3">
|
|
<div class="card h-100">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ __('IP Whitelisting') }} <span class="text-red">*</span></h5>
|
|
<p class="card-text">
|
|
{{ __('Whitelist IP addresses for secure access. Up to 5 IP addresses (IPv4 or IPv6) can be added.') }}
|
|
</p>
|
|
<div id="ipWhitelistForm">
|
|
<div id="ipAddressFields">
|
|
{% for ip in whitelist %}
|
|
<div class="mb-3 d-flex align-items-center">
|
|
<input type="text" class="form-control" name="ipAddress[]" value="{{ ip.addr }}" autocapitalize="none" required>
|
|
<button type="button" class="btn btn-danger ms-2 remove-ip">-</button>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if whitelist|length < 5 %}
|
|
<div class="mb-3 d-flex align-items-center">
|
|
<input type="text" class="form-control" name="ipAddress[]" autocapitalize="none">
|
|
<button type="button" class="btn btn-primary ms-2 add-ip">+</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Registrar User Column -->
|
|
<div class="col-md-6 mb-3">
|
|
<div class="card h-100">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ __('Registrar User') }}</h5>
|
|
<p class="card-text">
|
|
{{ __('For an existing registrar user, you can view the current EPP username (also known as CLID) and panel access email. Additionally, you have the option to reset the passwords for EPP and panel access as needed.') }}
|
|
</p>
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col required">{{ __('Username/CLID') }}</th>
|
|
<th scope="col">{{ __('Login Email') }}</th>
|
|
<th scope="col">{{ __('Panel Password') }} <span class="text-red">*</span></th>
|
|
<th scope="col">{{ __('EPP Password') }} <span class="text-red">*</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
{{ registrar.clid }}
|
|
</td>
|
|
<td>
|
|
{{ user.email ? user.email : 'N/A' }}
|
|
</td>
|
|
<td>
|
|
<div class="d-flex align-items-center">
|
|
<input type="password" class="form-control form-control-sm me-2" name="panelPassword" id="panelPassword" autocomplete="off" disabled>
|
|
<div class="form-check mb-0">
|
|
<input class="form-check-input" type="checkbox" id="updatePanelPassword" title="{{ __('Update Panel Password') }}">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="d-flex align-items-center">
|
|
<input type="password" class="form-control form-control-sm me-2" name="eppPassword" id="eppPassword" autocomplete="off" disabled>
|
|
<div class="form-check mb-0">
|
|
<input class="form-check-input" type="checkbox" id="updateEppPassword" title="{{ __('Update EPP Password') }}">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- OTE Section -->
|
|
<div class="card mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ __('Operational Test and Evaluation (OTE)') }}</h5>
|
|
<div class="row mb-3">
|
|
<div class="col-md-11">
|
|
<p class="card-text">
|
|
{{ __('Successfully passing the Operational Test and Evaluation (OTE) is a mandatory requirement for registrars. The OTE process evaluates the interaction and compliance of the registrar\'s system with registry operations through a series of EPP command tests in a controlled environment. Below you can find the results of these essential EPP command tests for your account:') }}
|
|
</p>
|
|
</div>
|
|
<div class="col-md-1 text-end">
|
|
<a href="{% if roles == 0 %}/registrar/check?reg={{ registrar.id }}{% else %}/registrar/check{% endif %}" title="Check Results" class="btn btn-icon btn-secondary">
|
|
<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="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /><path d="M9 17v-4" /><path d="M12 17v-1" /><path d="M15 17v-2" /><path d="M12 17v-1" /></svg>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<ul class="list-group">
|
|
{% for item in firstHalf %}
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
{{ item.command }}
|
|
<span class="badge {% if item.result == 0 %}bg-green{% elseif item.result == 9 %}bg-orange{% elseif item.result == 1 %}bg-red{% endif %} text-white">
|
|
{% if item.result == 0 %}{{ __('Completed') }}{% elseif item.result == 9 %}{{ __('Pending') }}{% elseif item.result == 1 %}{{ __('Failed') }}{% endif %}
|
|
</span>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<ul class="list-group">
|
|
{% for item in secondHalf %}
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
{{ item.command }}
|
|
<span class="badge {% if item.result == 0 %}bg-green{% elseif item.result == 9 %}bg-orange{% elseif item.result == 1 %}bg-red{% endif %} text-white">
|
|
{% if item.result == 0 %}{{ __('Completed') }}{% elseif item.result == 9 %}{{ __('Pending') }}{% elseif item.result == 1 %}{{ __('Failed') }}{% endif %}
|
|
</span>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">
|
|
<div class="row align-items-center">
|
|
<div class="col-auto">
|
|
<button type="submit" class="btn btn-primary">{{ __('Update Registrar') }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% include 'partials/footer.twig' %}
|
|
</div>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const updatePanelPasswordCheckbox = document.getElementById('updatePanelPassword');
|
|
const panelPasswordField = document.getElementById('panelPassword');
|
|
|
|
updatePanelPasswordCheckbox.addEventListener('change', function() {
|
|
panelPasswordField.disabled = !this.checked;
|
|
});
|
|
|
|
const updateEppPasswordCheckbox = document.getElementById('updateEppPassword');
|
|
const eppPasswordField = document.getElementById('eppPassword');
|
|
|
|
updateEppPasswordCheckbox.addEventListener('change', function() {
|
|
eppPasswordField.disabled = !this.checked;
|
|
});
|
|
|
|
const ipForm = document.getElementById('ipWhitelistForm');
|
|
const maxFields = 5;
|
|
|
|
ipForm.addEventListener('click', function(e) {
|
|
const target = e.target;
|
|
|
|
// Handle Add IP Button Click
|
|
if (target.classList.contains('add-ip')) {
|
|
const totalFields = ipForm.querySelectorAll('input[name="ipAddress[]"]').length;
|
|
if (totalFields < maxFields) {
|
|
const newField = document.createElement('div');
|
|
newField.className = 'mb-3 d-flex align-items-center';
|
|
newField.innerHTML = `
|
|
<input type="text" class="form-control" name="ipAddress[]" autocapitalize="none">
|
|
<button type="button" class="btn btn-danger ms-2 remove-ip">-</button>
|
|
`;
|
|
ipForm.querySelector('#ipAddressFields').appendChild(newField);
|
|
}
|
|
}
|
|
|
|
// Handle Remove IP Button Click
|
|
if (target.classList.contains('remove-ip')) {
|
|
target.parentElement.remove();
|
|
}
|
|
|
|
// Disable the add button if maxFields is reached
|
|
const totalFields = ipForm.querySelectorAll('input[name="ipAddress[]"]').length;
|
|
const addButton = ipForm.querySelector('.add-ip');
|
|
if (addButton) {
|
|
addButton.disabled = totalFields >= maxFields;
|
|
}
|
|
});
|
|
|
|
const copyCheckbox = document.getElementById('copyOwnerData');
|
|
|
|
// Function to copy data to another tab
|
|
function copyDataToTab(tabId) {
|
|
const ownerInputs = document.querySelectorAll('#owner input:not([type="checkbox"]), #owner select');
|
|
const targetFields = document.querySelectorAll(`${tabId} input:not([type='checkbox']), ${tabId} select`);
|
|
|
|
ownerInputs.forEach((input, index) => {
|
|
if (targetFields[index] && input.tagName === targetFields[index].tagName) {
|
|
targetFields[index].value = input.value;
|
|
}
|
|
});
|
|
}
|
|
|
|
copyCheckbox.addEventListener('change', function() {
|
|
if (this.checked) {
|
|
copyDataToTab('#billing');
|
|
copyDataToTab('#abuse');
|
|
} else {
|
|
// Clear fields when unchecked, if desired
|
|
['#billing', '#abuse'].forEach(tabId => {
|
|
const fields = document.querySelectorAll(`${tabId} input:not([type='checkbox']), ${tabId} select`);
|
|
fields.forEach(field => {
|
|
field.value = '';
|
|
});
|
|
});
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
{% endblock %} |