Files
jobs/web/templates/user/settings.html
zwitschi 2185a07ff0
Some checks failed
CI/CD Pipeline / test (push) Failing after 4m9s
feat: Implement email sending utilities and templates for job notifications
- Added email_service.py for sending emails with SMTP configuration.
- Introduced email_templates.py to render job alert email subjects and bodies.
- Enhanced scraper.py to extract contact information from job listings.
- Updated settings.js to handle negative keyword input validation.
- Created email.html and email_templates.html for managing email subscriptions and templates in the admin interface.
- Modified base.html to include links for email alerts and templates.
- Expanded user settings.html to allow management of negative keywords.
- Updated utils.py to include functions for retrieving negative keywords and email settings.
- Enhanced job filtering logic to exclude jobs containing negative keywords.
2025-11-28 18:15:08 +01:00

108 lines
2.7 KiB
HTML

{% extends 'base.html' %} {% block title %}Your Preferences{% endblock %} {%
block content %}
<h2>Your Preferences</h2>
<form
id="user-settings-form"
method="post"
action="{{ url_for('user_settings') }}"
>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<fieldset>
<legend>Regions</legend>
<p>
<small>Add new Region:</small>
<input
type="text"
name="new-region"
id="new-region"
value=""
placeholder="Type a region and save to add & select"
size="30"
/>
</p>
{% if all_regions %} {% for r in all_regions %}
<label style="display: block; background-color: {{ r.color }}">
<input
type="checkbox"
name="region"
id="region-{{ r.name }}"
value="{{ r.name }}"
{%
if
r
in
user_regions
%}checked{%
endif
%}
/>
{{ r.name }}
</label>
{% endfor %} {% else %}
<p>No regions available. Ask an admin to add some.</p>
{% endif %}
</fieldset>
<fieldset>
<legend>Keywords</legend>
<p>
<small>Add new Keyword:</small>
<input
type="text"
name="new-keyword"
id="new-keyword"
value=""
placeholder="Type a keyword and save to add & select"
size="30"
/>
</p>
{% if all_keywords %} {% for k in all_keywords %}
<label style="display: block; background-color: {{ k.color }}">
<input
type="checkbox"
name="keyword"
id="keyword-{{ k.name }}"
value="{{ k.name }}"
{%
if
k
in
user_keywords
%}checked{%
endif
%}
/>
{{ k.name }}
</label>
{% endfor %} {% else %}
<p>No keywords available. Ask an admin to add some.</p>
{% endif %}
</fieldset>
<fieldset>
<legend>Negative Keywords</legend>
<p>
<small>Add new Negative Keyword:</small>
<input
type="text"
name="new-negative-keyword"
id="new-negative-keyword"
value=""
placeholder="Type a keyword and save to add"
size="30"
/>
</p>
{% if user_negative_keywords %} {% for nk in user_negative_keywords %}
<label style="display: block">
<input type="checkbox" name="negative_keyword" value="{{ nk }}" checked />
{{ nk }}
</label>
{% endfor %} {% else %}
<p>No negative keywords set.</p>
{% endif %}
<p><small>Uncheck to remove.</small></p>
</fieldset>
<button type="submit">Save</button>
</form>
{% endblock %} {% block footer_scripts %}
<script src="{{ url_for('static', filename='settings.js') }}"></script>
{% endblock %}