mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-05 09:11:29 +02:00
More work on contact validation
This commit is contained in:
parent
504bb1b1eb
commit
159228e303
5 changed files with 169 additions and 6 deletions
|
@ -163,7 +163,7 @@
|
|||
|
||||
{% if validation_enabled is not null %}
|
||||
<div class="mb-3">
|
||||
<button class="btn btn-outline-{% if contact_valid == 0 %}secondary{% elseif contact_valid == 1 %}success{% elseif contact_valid == 2 %}success{% elseif contact_valid == 3 %}info{% endif %} w-100" {% if contact_valid == 1 %}disabled{% elseif contact_valid == 2 %}disabled{% elseif contact_valid == 3 %}disabled{% endif %}>
|
||||
<a href="/contact/validate/{{ contact.identifier }}" class="btn btn-outline-{% if contact_valid == 0 %}secondary{% elseif contact_valid == 1 %}success{% elseif contact_valid == 2 %}success{% elseif contact_valid == 3 %}info{% endif %} w-100" {% if contact_valid == 1 %}disabled{% elseif contact_valid == 2 %}disabled{% elseif contact_valid == 3 %}disabled{% endif %}>
|
||||
{% if contact_valid == 0 %}
|
||||
Trigger Validation
|
||||
{% elseif contact_valid == 1 %}
|
||||
|
@ -173,7 +173,7 @@
|
|||
{% elseif contact_valid == 3 %}
|
||||
Validated by Postal Mail
|
||||
{% endif %}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
87
cp/resources/views/admin/contacts/validateContact.twig
Normal file
87
cp/resources/views/admin/contacts/validateContact.twig
Normal file
|
@ -0,0 +1,87 @@
|
|||
{% 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 }} <span class="status status-green">{{ contactStatus.status }}</span>{% if contactLinked is not null %} <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">
|
||||
<a href="/contact/update/{{ contact.identifier }}" 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 11l-4 4l4 4m-4 -4h11a4 4 0 0 0 0 -8h-1" /></svg>
|
||||
{{ __('Back to Contact Update') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if verifyPhone == 'on' %}
|
||||
{# The content you want to echo if verifyPhone is 'on' #}
|
||||
<h4>
|
||||
Phone verification is enabled.
|
||||
</h4>
|
||||
<div>
|
||||
<pre><code>Validation TBD.</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if verifyEmail == 'on' %}
|
||||
{# The content you want to echo if verifyEmail is 'on' #}
|
||||
<h4>
|
||||
Email verification is enabled.
|
||||
</h4>
|
||||
<div>
|
||||
<pre><code>Validation TBD.</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if verifyPostal == 'on' %}
|
||||
{# The content you want to echo if verifyPostal is 'on' #}
|
||||
<h4>
|
||||
Postal Mail verification is enabled.
|
||||
</h4>
|
||||
<div>
|
||||
<pre><code>Validation TBD.</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'partials/footer.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -83,11 +83,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ __('Contact Verification') }}</label>
|
||||
<label class="form-label">{{ __('Contact Validation') }}</label>
|
||||
<div class="divide-y">
|
||||
<div>
|
||||
<label class="row">
|
||||
<span class="col">{{ __('Verify by Phone') }}</span>
|
||||
<span class="col">{{ __('Validate by Phone') }}</span>
|
||||
<span class="col-auto">
|
||||
<label class="form-check form-check-single form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="verifyPhone" {% if verifyPhone == 'on' %}checked{% endif %}>
|
||||
|
@ -97,7 +97,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<label class="row">
|
||||
<span class="col">{{ __('Verify by Email') }}</span>
|
||||
<span class="col">{{ __('Validate by Email') }}</span>
|
||||
<span class="col-auto">
|
||||
<label class="form-check form-check-single form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="verifyEmail" {% if verifyEmail == 'on' %}checked{% endif %}>
|
||||
|
@ -107,7 +107,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<label class="row">
|
||||
<span class="col">{{ __('Verify by Postal Mail') }}</span>
|
||||
<span class="col">{{ __('Validate by Postal Mail') }}</span>
|
||||
<span class="col-auto">
|
||||
<label class="form-check form-check-single form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="verifyPostal" {% if verifyPostal == 'on' %}checked{% endif %}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue