47 lines
2.1 KiB
HTML
47 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Edit Customer Data</title>
|
|
</head>
|
|
<body>
|
|
<h2>Edit Customer Data</h2>
|
|
|
|
<form method="POST" action="/update/{{ index }}">
|
|
{% for domain, info in customer.items() %}
|
|
<h3>Domain: {{ domain }}</h3>
|
|
<p>Customer Industry: <input type="text" name="{{ domain }}_industry" value="{{ info.get('customer industry', '') }}"></p>
|
|
|
|
<h4>Email Addresses</h4>
|
|
<div>
|
|
{% if info.get('email addresses') %}
|
|
{% for email in info['email addresses'] %}
|
|
<div>
|
|
<p>Owner Name: <input type="text" name="{{ domain }}_owner_name_{{ email['idx'] }}" value="{{ email.get("owner's name", '') }}"></p>
|
|
<p>Email Address: <input type="text" name="{{ domain }}_email_address_{{ email['idx'] }}" value="{{ email.get('email address', '') }}"></p>
|
|
<p>Category: <input type="text" name="{{ domain }}_category_{{ email['idx'] }}" value="{{ email.get('category', '') }}"></p>
|
|
<p>Promotion History: <input type="text" name="{{ domain }}_promotion_history_{{ email['idx'] }}" value="{{ email.get('promotion history', []) | join(', ') }}"></p>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<p>No email addresses available.</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
<button type="submit">Save Changes</button>
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
<div>
|
|
<button {% if is_first %}disabled{% endif %}>
|
|
<a href="{% if not is_first %}{{ url_for('view_customer', index=index-1) }}{% endif %}">Previous</a>
|
|
</button>
|
|
<button {% if is_last %}disabled{% endif %}>
|
|
<a href="{% if not is_last %}{{ url_for('view_customer', index=index+1) }}{% endif %}">Next</a>
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|