Fix modal: wider, remove name fields, fix labels, description 100% width
This commit is contained in:
+3
-2
@@ -80,11 +80,12 @@ a:hover { text-decoration: underline; }
|
|||||||
.user-btn { padding: 8px 16px; font-size: .85rem; }
|
.user-btn { padding: 8px 16px; font-size: .85rem; }
|
||||||
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 999; display: flex; align-items: center; justify-content: center; }
|
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 999; display: flex; align-items: center; justify-content: center; }
|
||||||
.modal.hidden { display: none; }
|
.modal.hidden { display: none; }
|
||||||
.modal-content { background: var(--white); padding: 32px; border-radius: 16px; width: 90%; max-width: 500px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
|
.modal-content { background: var(--white); padding: 32px; border-radius: 16px; width: 90%; max-width: 800px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
|
||||||
.modal-content h3 { margin-bottom: 24px; }
|
.modal-content h3 { margin-bottom: 24px; }
|
||||||
.close-btn { position: absolute; top: 16px; right: 20px; font-size: 24px; cursor: pointer; color: #6b7280; }
|
.close-btn { position: absolute; top: 16px; right: 20px; font-size: 24px; cursor: pointer; color: #6b7280; }
|
||||||
.username-display { padding: 12px 0; font-size: 1.1rem; font-weight: 600; color: var(--black); }
|
.username-display { padding: 12px 0; font-size: 1.1rem; font-weight: 700; color: var(--black); }
|
||||||
.profile-form .hidden { display: none; }
|
.profile-form .hidden { display: none; }
|
||||||
|
.form-group label { font-weight: 400; }
|
||||||
.login-panel h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--gray2); }
|
.login-panel h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--gray2); }
|
||||||
.form-group { margin-bottom: 16px; }
|
.form-group { margin-bottom: 16px; }
|
||||||
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
|
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
|
||||||
|
|||||||
+1
-8
@@ -177,8 +177,6 @@
|
|||||||
<h3 class="hide-en">Edit Profile</h3>
|
<h3 class="hide-en">Edit Profile</h3>
|
||||||
<div class="profile-form">
|
<div class="profile-form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="hide-de">Telegram Nutzername</label>
|
|
||||||
<label class="hide-en">Telegram Username</label>
|
|
||||||
<div class="username-display" id="profile-username-display">odoo4projects</div>
|
<div class="username-display" id="profile-username-display">odoo4projects</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -191,11 +189,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="profile-edit-fields" class="hidden">
|
<div id="profile-edit-fields" class="hidden">
|
||||||
<div class="form-group">
|
|
||||||
<label for="profile-name" class="hide-de">Vollständiger Name</label>
|
|
||||||
<label for="profile-name" class="hide-en">Full name</label>
|
|
||||||
<input type="text" id="profile-name" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="profile-company" class="hide-de">Name der LLC / SRL</label>
|
<label for="profile-company" class="hide-de">Name der LLC / SRL</label>
|
||||||
<label for="profile-company" class="hide-en">LLC / SRL name</label>
|
<label for="profile-company" class="hide-en">LLC / SRL name</label>
|
||||||
@@ -224,7 +217,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="profile-description" class="hide-de">Beschreibung</label>
|
<label for="profile-description" class="hide-de">Beschreibung</label>
|
||||||
<label for="profile-description" class="hide-en">Description</label>
|
<label for="profile-description" class="hide-en">Description</label>
|
||||||
<textarea id="profile-description" rows="4"></textarea>
|
<textarea id="profile-description" rows="4" style="width: 100%; min-height: 120px;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn-primary hide-de" onclick="saveProfile()">Speichern</button>
|
<button type="button" class="btn-primary hide-de" onclick="saveProfile()">Speichern</button>
|
||||||
|
|||||||
+1
-4
@@ -270,7 +270,6 @@ async function openProfileModal() {
|
|||||||
const user = await response.json();
|
const user = await response.json();
|
||||||
console.log('openProfileModal user:', user);
|
console.log('openProfileModal user:', user);
|
||||||
document.getElementById('profile-username-display').textContent = user.username || '';
|
document.getElementById('profile-username-display').textContent = user.username || '';
|
||||||
document.getElementById('profile-name').value = user.name || '';
|
|
||||||
document.getElementById('profile-company').value = user.company || '';
|
document.getElementById('profile-company').value = user.company || '';
|
||||||
document.getElementById('profile-email').value = user.email || '';
|
document.getElementById('profile-email').value = user.email || '';
|
||||||
document.getElementById('profile-homepage').value = user.homepage || '';
|
document.getElementById('profile-homepage').value = user.homepage || '';
|
||||||
@@ -298,9 +297,8 @@ function logout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function saveProfile() {
|
async function saveProfile() {
|
||||||
const name = document.getElementById('profile-name').value.trim();
|
|
||||||
const company = document.getElementById('profile-company').value.trim();
|
const company = document.getElementById('profile-company').value.trim();
|
||||||
if (!name || !company) { alert('Bitte geben Sie Name und LLC-Namen ein.'); return; }
|
if (!company) { alert('Bitte geben Sie LLC/SRL-Namen ein.'); return; }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(PROFILE_URL, {
|
const response = await fetch(PROFILE_URL, {
|
||||||
@@ -308,7 +306,6 @@ async function saveProfile() {
|
|||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username: document.getElementById('profile-username-display').textContent,
|
username: document.getElementById('profile-username-display').textContent,
|
||||||
name: name,
|
|
||||||
company: company,
|
company: company,
|
||||||
email: document.getElementById('profile-email').value,
|
email: document.getElementById('profile-email').value,
|
||||||
homepage: document.getElementById('profile-homepage').value,
|
homepage: document.getElementById('profile-homepage').value,
|
||||||
|
|||||||
Reference in New Issue
Block a user