commit 1eeea9f83ad9230a5c1f7a75662770eaab0df837 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 21:15:41 2025 +0200 Disable resuming of old time entries. commit 3e3ec2f01cb7943622b819a19179388078ae1315 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 20:59:19 2025 +0200 Refactor db migrations. commit 15a51a569da36c6b7c9e01ab17b6fdbdee6ad994 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 19:58:04 2025 +0200 Apply new style for Time Tracking view. commit 77e5278b303e060d2b03853b06277f8aa567ae68 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 18:06:04 2025 +0200 Allow direct registrations as a Company. commit 188a8772757cbef374243d3a5f29e4440ddecabe Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 18:04:45 2025 +0200 Add email invitation feature. commit d9ebaa02aa01b518960a20dccdd5a327d82f30c6 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 17:12:32 2025 +0200 Apply common style for Company, User, Team management pages. commit 81149caf4d8fc6317e2ab1b4f022b32fc5aa6d22 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 16:44:32 2025 +0200 Move export functions to own module. commit 1a26e19338e73f8849c671471dd15cc3c1b1fe82 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 15:51:15 2025 +0200 Split up models.py. commit 61f1ccd10f721b0ff4dc1eccf30c7a1ee13f204d Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 12:05:28 2025 +0200 Move utility function into own modules. commit 84b341ed35e2c5387819a8b9f9d41eca900ae79f Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 11:44:24 2025 +0200 Refactor auth functions use. commit 923e311e3da5b26d85845c2832b73b7b17c48adb Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 11:35:52 2025 +0200 Refactor route nameing and fix bugs along the way. commit f0a5c4419c340e62a2615c60b2a9de28204d2995 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 10:34:33 2025 +0200 Fix URL endpoints in announcement template. commit b74d74542a1c8dc350749e4788a9464d067a88b5 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 09:25:53 2025 +0200 Move announcements to own module. commit 9563a28021ac46c82c04fe4649b394dbf96f92c7 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 09:16:30 2025 +0200 Combine Company view and edit templates. commit 6687c373e681d54e4deab6b2582fed5cea9aadf6 Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 08:17:42 2025 +0200 Move Users, Company and System Administration to own modules. commit 8b7894a2e3eb84bb059f546648b6b9536fea724e Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 07:40:57 2025 +0200 Move Teams and Projects to own modules. commit d11bf059d99839ecf1f5d7020b8c8c8a2454c00b Author: Jens Luedicke <jens@luedicke.me> Date: Mon Jul 7 07:09:33 2025 +0200 Move Tasks and Sprints to own modules.
378 lines
10 KiB
HTML
378 lines
10 KiB
HTML
{% extends "layout.html" %}
|
|
|
|
{% block content %}
|
|
<div class="invitation-send-container">
|
|
<!-- Header Section -->
|
|
<div class="page-header">
|
|
<div class="header-content">
|
|
<div class="header-left">
|
|
<h1 class="page-title">
|
|
<span class="page-icon">✉️</span>
|
|
Send Invitation
|
|
</h1>
|
|
<p class="page-subtitle">Invite team members to join {{ g.user.company.name }}</p>
|
|
</div>
|
|
<div class="header-actions">
|
|
<a href="{{ url_for('invitations.list_invitations') }}" class="btn btn-secondary">
|
|
<span class="icon">←</span>
|
|
Back to Invitations
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Main Content -->
|
|
<div class="content-wrapper">
|
|
<div class="card invitation-form-card">
|
|
<div class="card-header">
|
|
<h2 class="card-title">
|
|
<span class="icon">👥</span>
|
|
Invitation Details
|
|
</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="POST" action="{{ url_for('invitations.send_invitation') }}" class="modern-form">
|
|
<div class="form-group">
|
|
<label for="email" class="form-label">Email Address</label>
|
|
<input type="email" id="email" name="email" class="form-control"
|
|
placeholder="colleague@example.com" required autofocus>
|
|
<span class="form-hint">The email address where the invitation will be sent</span>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="role" class="form-label">Role</label>
|
|
<select id="role" name="role" class="form-control">
|
|
{% for role in roles %}
|
|
<option value="{{ role }}" {% if role == 'Team Member' %}selected{% endif %}>
|
|
{{ role }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
<span class="form-hint">The role this user will have when they join</span>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="custom_message" class="form-label">Personal Message (Optional)</label>
|
|
<textarea id="custom_message" name="custom_message" class="form-control"
|
|
rows="4" placeholder="Add a personal message to the invitation..."></textarea>
|
|
<span class="form-hint">This message will be included in the invitation email</span>
|
|
</div>
|
|
|
|
<div class="info-panel">
|
|
<div class="info-item">
|
|
<span class="info-icon">📧</span>
|
|
<div class="info-content">
|
|
<h4>What happens next?</h4>
|
|
<ul>
|
|
<li>An email invitation will be sent immediately</li>
|
|
<li>The recipient will have 7 days to accept</li>
|
|
<li>They'll create their account using the invitation link</li>
|
|
<li>They'll automatically join {{ g.user.company.name }}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">
|
|
<span class="icon">📤</span>
|
|
Send Invitation
|
|
</button>
|
|
<a href="{{ url_for('invitations.list_invitations') }}" class="btn btn-ghost">
|
|
Cancel
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Preview Section -->
|
|
<div class="card preview-card">
|
|
<div class="card-header">
|
|
<h2 class="card-title">
|
|
<span class="icon">👁️</span>
|
|
Email Preview
|
|
</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="email-preview">
|
|
<div class="preview-from">
|
|
<strong>From:</strong> {{ g.branding.app_name }} <{{ g.branding.email_from or 'noreply@timetrack.com' }}>
|
|
</div>
|
|
<div class="preview-to">
|
|
<strong>To:</strong> <span id="preview-email">colleague@example.com</span>
|
|
</div>
|
|
<div class="preview-subject">
|
|
<strong>Subject:</strong> Invitation to join {{ g.user.company.name }} on {{ g.branding.app_name }}
|
|
</div>
|
|
<div class="preview-body">
|
|
<p>Hello,</p>
|
|
<p>{{ g.user.username }} has invited you to join {{ g.user.company.name }} on {{ g.branding.app_name }}.</p>
|
|
<p id="preview-message" style="display: none;"></p>
|
|
<p>Click the link below to accept the invitation and create your account:</p>
|
|
<p><a href="#" class="preview-link">[Invitation Link]</a></p>
|
|
<p>This invitation will expire in 7 days.</p>
|
|
<p>Best regards,<br>The {{ g.branding.app_name }} Team</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.invitation-send-container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.content-wrapper {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 2rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
@media (max-width: 1024px) {
|
|
.content-wrapper {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.invitation-form-card,
|
|
.preview-card {
|
|
background: white;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
border: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.email-preview {
|
|
background: #f8f9fa;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
font-family: system-ui, -apple-system, sans-serif;
|
|
}
|
|
|
|
.email-preview > div {
|
|
margin-bottom: 0.75rem;
|
|
padding-bottom: 0.75rem;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.preview-body {
|
|
border-bottom: none !important;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.preview-link {
|
|
color: #667eea;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Reuse existing styles */
|
|
.page-header {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-radius: 16px;
|
|
padding: 2rem;
|
|
color: white;
|
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 2rem;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.page-icon {
|
|
font-size: 2.5rem;
|
|
display: inline-block;
|
|
animation: float 3s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes float {
|
|
0%, 100% { transform: translateY(0); }
|
|
50% { transform: translateY(-10px); }
|
|
}
|
|
|
|
.page-subtitle {
|
|
font-size: 1.1rem;
|
|
opacity: 0.9;
|
|
margin: 0.5rem 0 0 0;
|
|
}
|
|
|
|
.card-header {
|
|
background: #f8f9fa;
|
|
padding: 1.5rem;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.card-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
color: #1f2937;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.card-body {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.modern-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.form-label {
|
|
font-weight: 600;
|
|
color: #374151;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.form-control {
|
|
padding: 0.75rem 1rem;
|
|
border: 2px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
transition: all 0.2s ease;
|
|
background-color: #f9fafb;
|
|
}
|
|
|
|
.form-control:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
background-color: white;
|
|
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
|
}
|
|
|
|
.form-hint {
|
|
font-size: 0.875rem;
|
|
color: #6b7280;
|
|
}
|
|
|
|
.info-panel {
|
|
background: #f3f4f6;
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.info-item {
|
|
display: flex;
|
|
gap: 1rem;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.info-icon {
|
|
font-size: 1.5rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.info-content h4 {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: #1f2937;
|
|
margin: 0 0 0.5rem 0;
|
|
}
|
|
|
|
.info-content ul {
|
|
margin: 0;
|
|
padding-left: 1.25rem;
|
|
}
|
|
|
|
.info-content li {
|
|
margin-bottom: 0.25rem;
|
|
color: #4b5563;
|
|
}
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-weight: 600;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: white;
|
|
color: #4b5563;
|
|
border: 2px solid #e5e7eb;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #f3f4f6;
|
|
}
|
|
|
|
.btn-ghost {
|
|
background: transparent;
|
|
color: #6b7280;
|
|
}
|
|
|
|
.btn-ghost:hover {
|
|
color: #374151;
|
|
background: #f3f4f6;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
// Live preview updates
|
|
document.getElementById('email').addEventListener('input', function(e) {
|
|
document.getElementById('preview-email').textContent = e.target.value || 'colleague@example.com';
|
|
});
|
|
|
|
document.getElementById('custom_message').addEventListener('input', function(e) {
|
|
const previewMessage = document.getElementById('preview-message');
|
|
if (e.target.value.trim()) {
|
|
previewMessage.textContent = e.target.value;
|
|
previewMessage.style.display = 'block';
|
|
} else {
|
|
previewMessage.style.display = 'none';
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %} |