mirror of
https://github.com/hoshikawa2/rfp_response_automation.git
synced 2026-03-06 18:21:02 +00:00
first commit
This commit is contained in:
25
files/templates/users/form.html
Normal file
25
files/templates/users/form.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="card">
|
||||
<h2>{{ "Edit User" if user else "New User" }}</h2>
|
||||
|
||||
<form method="post">
|
||||
<input name="name" placeholder="Name" value="{{ user.name if user else '' }}" required>
|
||||
<input name="email" placeholder="Email" value="{{ user.email if user else '' }}" required>
|
||||
|
||||
<select name="role">
|
||||
<option value="user">User</option>
|
||||
<option value="admin">Admin</option>
|
||||
</select>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="active" {% if user and user.active %}checked{% endif %}>
|
||||
Active
|
||||
</label>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
33
files/templates/users/list.html
Normal file
33
files/templates/users/list.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="card">
|
||||
<h2>Users</h2>
|
||||
|
||||
<a class="btn btn-primary" href="{{ url_for('users.new_user') }}">+ New User</a>
|
||||
|
||||
<table class="table table-dark">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
<th>Active</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
{% for u in users %}
|
||||
<tr>
|
||||
<td>{{ u.name }}</td>
|
||||
<td>{{ u.email }}</td>
|
||||
<td>{{ u.role }}</td>
|
||||
<td>{{ "Yes" if u.active else "No" }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('users.edit_user', user_id=u.id) }}">Edit</a> |
|
||||
<a href="{{ url_for('users.delete_user', user_id=u.id) }}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
114
files/templates/users/login.html
Normal file
114
files/templates/users/login.html
Normal file
@@ -0,0 +1,114 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<style>
|
||||
.login-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: calc(100vh - 120px);
|
||||
}
|
||||
|
||||
.login-card {
|
||||
width: 380px;
|
||||
background: #ffffff;
|
||||
border-radius: 14px;
|
||||
padding: 32px;
|
||||
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.08);
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 24px;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.login-sub {
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #6b7280;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.login-card input {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.login-footer {
|
||||
text-align: center;
|
||||
margin-top: 18px;
|
||||
font-size: 12px;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.oracle-accent {
|
||||
height: 4px;
|
||||
width: 100%;
|
||||
background: #E30613;
|
||||
border-radius: 8px 8px 0 0;
|
||||
margin: -32px -32px 24px -32px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="login-wrapper">
|
||||
|
||||
<div class="login-card">
|
||||
|
||||
<!-- barra vermelha Oracle -->
|
||||
<div class="oracle-accent"></div>
|
||||
|
||||
<div class="login-title">
|
||||
Sign in
|
||||
</div>
|
||||
|
||||
<div class="login-sub">
|
||||
Oracle RFP AI Platform
|
||||
</div>
|
||||
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
{% for msg in messages %}
|
||||
<div class="flash flash-error">{{ msg }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<form method="POST" action="/login">
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
placeholder="Email"
|
||||
required
|
||||
/>
|
||||
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
placeholder="Password"
|
||||
required
|
||||
/>
|
||||
|
||||
<button class="btn login-btn">
|
||||
Sign In
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="login-footer">
|
||||
© Oracle RFP AI Platform
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
20
files/templates/users/set_password.html
Normal file
20
files/templates/users/set_password.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="card">
|
||||
|
||||
<h2>Set Password</h2>
|
||||
|
||||
{% if expired %}
|
||||
<p>Link expired or invalid.</p>
|
||||
{% else %}
|
||||
<form method="post">
|
||||
<input type="password" name="password" placeholder="New password" required>
|
||||
<input type="password" name="password2" placeholder="Confirm password" required>
|
||||
<button class="btn btn-primary">Save</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
51
files/templates/users/signup.html
Normal file
51
files/templates/users/signup.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="card">
|
||||
|
||||
<h2>Create Access</h2>
|
||||
|
||||
<p class="small">
|
||||
Enter your email to receive a secure link and set your password.
|
||||
</p>
|
||||
|
||||
<form method="post">
|
||||
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
placeholder="your@email.com"
|
||||
required
|
||||
/>
|
||||
|
||||
<br><br>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
placeholder="name (optional)"
|
||||
/>
|
||||
|
||||
<br><br>
|
||||
|
||||
<button type="submit">
|
||||
Send password link
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for cat, msg in messages %}
|
||||
<div class="info-box">
|
||||
{{ msg }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user