getnamingo-registry/cp/resources/views/admin/contacts/validateContact.twig
2024-02-19 12:52:25 +02:00

100 lines
No EOL
5.6 KiB
Twig

{% extends "layouts/app.twig" %}
{% block title %}{{ __('Contact Validation') }}{% 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">
{{ __('Contact Validation') }}
</h2>
</div>
</div>
</div>
</div>
<!-- Page body -->
<div class="page-body">
<div class="container-xl">
<div class="col-12">
<div class="card mb-3">
<div class="card-header">
<h3 class="card-title">{{ __('Contact') }} {{ contact.identifier }}&nbsp;<span class="status status-green">{{ contactStatus.status }}</span>{% if contactLinked is not null %}&nbsp;<span class="status status-info">{{ __('linked') }}</span>{% endif %}
{% if validation_enabled is not null %}
<span class="status {% if contact_valid == 0 %}status-warning{% elseif contact_valid == 1 %}status-success{% elseif contact_valid == 2 %}status-success{% elseif contact_valid == 3 %}status-info{% endif %}" title="{% if contact_valid == 0 %}Pending Validation{% elseif contact_valid == 1 %}Validated by Phone{% elseif contact_valid == 2 %}Validated by Email{% elseif contact_valid == 3 %}Validated by Postal Mail{% endif %}">
{% if contact_valid == 0 %}
Pending Validation
{% elseif contact_valid == 1 %}
Validated by Phone
{% elseif contact_valid == 2 %}
Validated by Email
{% elseif contact_valid == 3 %}
Validated by Postal Mail
{% endif %}
</span>
{% endif %}</h3>
<div class="card-actions">
<form action="/contact/approve" method="post">
{{ csrf.field | raw }}<input type="hidden" name="identifier" value="{{ contact.identifier }}">
<a href="/contact/update/{{ contact.identifier }}" class="btn btn-outline-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 11l-4 4l4 4m-4 -4h11a4 4 0 0 0 0 -8h-1" /></svg>
{{ __('Back to Contact Update') }}
</a>
<button type="submit" class="btn btn-outline-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="M9.615 20h-2.615a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8" /><path d="M14 19l2 2l4 -4" /><path d="M9 8h4" /><path d="M9 12h2" /></svg>
{{ __('Validate Contact') }}
</button>
</div>
</div>
<div class="card-body">
{% if verifyPhone == 'on' %}
{# The content you want to echo if verifyPhone is 'on' #}
<h4>
Phone Validation
</h4>
<div>
<pre><code>{{ phoneDetails ? 'Phone format is valid' : 'Phone format is not valid' }}</code></pre>
</div>
<input type="hidden" name="verify" value="1">
<input type="hidden" name="v_log[]" value="{{ phoneDetails ? 'Phone format is valid' : 'Phone format is not valid' }}">
{% endif %}
{% if verifyEmail == 'on' %}
{# The content you want to echo if verifyEmail is 'on' #}
<h4>
Email Validation
</h4>
<div>
<pre><code>{{ emailDetails == 1 ? 'Email format is valid' : 'Email format is not valid' }}</code></pre>
</div>
<input type="hidden" name="verify" value="2">
<input type="hidden" name="v_log[]" value="{{ emailDetails == 1 ? 'Email format is valid' : 'Email format is not valid' }}">
{% endif %}
{% if verifyPostal == 'on' %}
{# The content you want to echo if verifyPostal is 'on' #}
<h4>
Postal Mail Validation
</h4>
<div>
<pre><code>{{ postalDetails is empty ? 'Postal code format is not valid' : 'Postal code format is valid' }}</code></pre>
</div>
<input type="hidden" name="verify" value="3">
<input type="hidden" name="v_log[]" value="{{ postalDetails is empty ? 'Postal code format is not valid' : 'Postal code format is valid' }}">
{% endif %}
</form>
</div>
</div>
</div>
</div>
</div>
{% include 'partials/footer.twig' %}
</div>
{% endblock %}