frontend error management enhancement
This commit is contained in:
46
app/templates/shop/errors/422.html
Normal file
46
app/templates/shop/errors/422.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{% extends "shop/errors/base.html" %}
|
||||
|
||||
{% block icon %}📝{% endblock %}
|
||||
|
||||
{% block title %}422 - Invalid Information{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if vendor and theme and theme.branding and theme.branding.logo %}
|
||||
<img src="{{ theme.branding.logo }}" alt="{{ vendor.name }}" class="vendor-logo">
|
||||
{% endif %}
|
||||
|
||||
<div class="error-icon">📝</div>
|
||||
<div class="status-code">422</div>
|
||||
<div class="status-name">Please Check Your Information</div>
|
||||
<div class="error-message">
|
||||
Some of the information you provided isn't valid. Please review the form and try again.
|
||||
</div>
|
||||
|
||||
{% if details and details.validation_errors %}
|
||||
<div style="margin: 2rem auto; max-width: 400px; text-align: left; background: #fef2f2; padding: 1.5rem; border-radius: 0.75rem; border-left: 4px solid var(--color-primary);">
|
||||
<h3 style="color: var(--color-text); font-size: 0.875rem; margin-bottom: 0.75rem; font-weight: 600;">Please correct:</h3>
|
||||
<ul style="list-style: none; padding: 0; margin: 0;">
|
||||
{% for error in details.validation_errors %}
|
||||
<li style="margin-bottom: 0.5rem; color: #7f1d1d; font-size: 0.875rem;">
|
||||
• {{ error.msg }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="javascript:history.back()" class="btn btn-primary">Go Back and Fix</a>
|
||||
<a href="/" class="btn btn-secondary">Go to Home</a>
|
||||
</div>
|
||||
|
||||
<div class="support-link">
|
||||
Having trouble? <a href="/contact">We're here to help</a>
|
||||
</div>
|
||||
|
||||
{% if vendor %}
|
||||
<div class="vendor-info">
|
||||
{{ vendor.name }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user