You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
199 lines
6.5 KiB
199 lines
6.5 KiB
<!doctype html> |
|
<html> |
|
<head> |
|
<title>Settings</title> |
|
<style> |
|
body { font-family: Arial, sans-serif; } |
|
.form-grid { |
|
display: grid; |
|
grid-template-columns: 1fr 1fr; |
|
gap: 24px; |
|
max-width: 1100px; |
|
} |
|
.card { |
|
border: 1px solid #ccc; |
|
padding: 16px; |
|
} |
|
.card h2 { |
|
margin-top: 0; |
|
} |
|
input[type="text"], |
|
input[type="email"], |
|
input[type="password"], |
|
input[type="number"], |
|
textarea, |
|
select { |
|
width: 100%; |
|
box-sizing: border-box; |
|
margin-top: 4px; |
|
margin-bottom: 12px; |
|
padding: 8px; |
|
} |
|
textarea { min-height: 90px; } |
|
.checkbox-row { |
|
margin: 8px 0 14px 0; |
|
} |
|
.save-row { |
|
margin-top: 18px; |
|
} |
|
.logo-preview { |
|
margin: 10px 0 14px 0; |
|
} |
|
.logo-preview img { |
|
max-height: 70px; |
|
max-width: 220px; |
|
border: 1px solid #ccc; |
|
padding: 6px; |
|
background: #fff; |
|
} |
|
small { |
|
color: #444; |
|
} |
|
</style> |
|
</head> |
|
<body> |
|
|
|
<h1>Settings / Config</h1> |
|
|
|
<p><a href="/">Home</a></p> |
|
|
|
<form method="post"> |
|
<div class="form-grid"> |
|
<div class="card"> |
|
<h2>Business Identity</h2> |
|
|
|
Business Name<br> |
|
<input type="text" name="business_name" value="{{ settings.business_name }}"><br> |
|
|
|
Business Logo URL<br> |
|
<input type="text" name="business_logo_url" value="{{ settings.business_logo_url }}"><br> |
|
<small>Example: /static/favicon.png or https://site.com/logo.png</small><br> |
|
|
|
{% if settings.business_logo_url %} |
|
<div class="logo-preview"> |
|
<img src="{{ settings.business_logo_url }}" alt="Business Logo Preview"> |
|
</div> |
|
{% endif %} |
|
|
|
Slogan / Tagline<br> |
|
<input type="text" name="business_tagline" value="{{ settings.business_tagline }}"><br> |
|
|
|
Business Email<br> |
|
<input type="email" name="business_email" value="{{ settings.business_email }}"><br> |
|
|
|
Business Phone<br> |
|
<input type="text" name="business_phone" value="{{ settings.business_phone }}"><br> |
|
|
|
Business Address<br> |
|
<textarea name="business_address">{{ settings.business_address }}</textarea><br> |
|
|
|
Website<br> |
|
<input type="text" name="business_website" value="{{ settings.business_website }}"><br> |
|
|
|
Business Number / Registration Number<br> |
|
<input type="text" name="business_number" value="{{ settings.business_number }}"><br> |
|
|
|
Default Currency<br> |
|
<select name="default_currency"> |
|
<option value="CAD" {% if settings.default_currency == 'CAD' %}selected{% endif %}>CAD</option> |
|
<option value="USD" {% if settings.default_currency == 'USD' %}selected{% endif %}>USD</option> |
|
<option value="ETHO" {% if settings.default_currency == 'ETHO' %}selected{% endif %}>ETHO</option> |
|
<option value="EGAZ" {% if settings.default_currency == 'EGAZ' %}selected{% endif %}>EGAZ</option> |
|
<option value="ALT" {% if settings.default_currency == 'ALT' %}selected{% endif %}>ALT</option> |
|
</select> |
|
|
|
Report Frequency<br> |
|
<select name="report_frequency"> |
|
<option value="monthly" {% if settings.report_frequency == 'monthly' %}selected{% endif %}>monthly</option> |
|
<option value="quarterly" {% if settings.report_frequency == 'quarterly' %}selected{% endif %}>quarterly</option> |
|
<option value="yearly" {% if settings.report_frequency == 'yearly' %}selected{% endif %}>yearly</option> |
|
</select> |
|
</div> |
|
|
|
<div class="card"> |
|
<h2>Tax Settings</h2> |
|
|
|
Local Country<br> |
|
<input type="text" name="local_country" value="{{ settings.local_country }}"><br> |
|
|
|
Tax Label<br> |
|
<input type="text" name="tax_label" value="{{ settings.tax_label }}"><br> |
|
|
|
Tax Rate (%)<br> |
|
<input type="number" step="0.01" name="tax_rate" value="{{ settings.tax_rate }}"><br> |
|
|
|
Tax Number<br> |
|
<input type="text" name="tax_number" value="{{ settings.tax_number }}"><br> |
|
|
|
<div class="checkbox-row"> |
|
<label> |
|
<input type="checkbox" name="apply_local_tax_only" value="1" {% if settings.apply_local_tax_only == '1' %}checked{% endif %}> |
|
Apply tax only to local clients |
|
</label> |
|
</div> |
|
|
|
Payment Terms<br> |
|
<textarea name="payment_terms">{{ settings.payment_terms }}</textarea><br> |
|
|
|
Invoice Footer<br> |
|
<textarea name="invoice_footer">{{ settings.invoice_footer }}</textarea><br> |
|
</div> |
|
|
|
<div class="card"> |
|
<h2>Advanced / Email / SMTP</h2> |
|
|
|
SMTP Host<br> |
|
<input type="text" name="smtp_host" value="{{ settings.smtp_host }}"><br> |
|
|
|
SMTP Port<br> |
|
<input type="number" name="smtp_port" value="{{ settings.smtp_port }}"><br> |
|
|
|
SMTP Username<br> |
|
<input type="text" name="smtp_user" value="{{ settings.smtp_user }}"><br> |
|
|
|
SMTP Password<br> |
|
<input type="password" name="smtp_pass" value="{{ settings.smtp_pass }}"><br> |
|
|
|
From Email<br> |
|
<input type="email" name="smtp_from_email" value="{{ settings.smtp_from_email }}"><br> |
|
|
|
From Name<br> |
|
<input type="text" name="smtp_from_name" value="{{ settings.smtp_from_name }}"><br> |
|
|
|
<div class="checkbox-row"> |
|
<label> |
|
<input type="checkbox" name="smtp_use_tls" value="1" {% if settings.smtp_use_tls == '1' %}checked{% endif %}> |
|
Use TLS |
|
</label> |
|
</div> |
|
|
|
<div class="checkbox-row"> |
|
<label> |
|
<input type="checkbox" name="smtp_use_ssl" value="1" {% if settings.smtp_use_ssl == '1' %}checked{% endif %}> |
|
Use SSL |
|
</label> |
|
</div> |
|
</div> |
|
|
|
<div class="card"> |
|
<h2>Notes</h2> |
|
<p> |
|
Branding, tax identity, and SMTP values are stored here for this installation. |
|
</p> |
|
<p> |
|
Logo can be a local static path like <strong>/static/favicon.png</strong> or a full external/IPFS URL. |
|
</p> |
|
<p> |
|
Email sending is not wired yet, but these SMTP settings are stored now so the next step can use them. |
|
</p> |
|
</div> |
|
</div> |
|
|
|
<div class="save-row"> |
|
<button type="submit">Save Settings</button> |
|
</div> |
|
</form> |
|
|
|
{% include "footer.html" %} |
|
</body> |
|
</html>
|
|
|