diff --git a/index.html b/index.html
index 910957f..b68c059 100644
--- a/index.html
+++ b/index.html
@@ -88,11 +88,6 @@
✏️ Lisää julkaisu
-
-
-
-
-
diff --git a/script.js b/script.js
index 80cb9e5..509a64f 100644
--- a/script.js
+++ b/script.js
@@ -399,9 +399,7 @@ function generateSubmitCaptcha() {
function setSubmitType(type) {
submitType = type;
document.getElementById('sub-recipeFields').style.display = type === 'recipe' ? '' : 'none';
- document.getElementById('sub-postFields').style.display = type === 'post' ? '' : 'none';
- document.getElementById('sub-typeRecipeBtn').classList.toggle('active', type === 'recipe');
- document.getElementById('sub-typePostBtn').classList.toggle('active', type === 'post');
+ document.getElementById('sub-postFields').style.display = type === 'post' ? '' : 'none';
}
function updateSubcategoryPicker() {
@@ -418,14 +416,15 @@ function updateSubcategoryPicker() {
subs.map(s => ``).join('');
group.style.display = '';
}
+ // Näytä reseptikentät jos kategoria on Reseptit, muuten julkaisukentät
+ setSubmitType(catId === 'recipes' ? 'recipe' : 'post');
}
function openSubmitModal() {
const cats = APP.categories;
const sel = document.getElementById('sub-category');
sel.innerHTML = cats.map(c => ``).join('');
- updateSubcategoryPicker();
- setSubmitType('recipe');
+ updateSubcategoryPicker(); // asettaa myös oikean tyypin kategorian mukaan
document.getElementById('submitOverlay').classList.add('open');
document.body.style.overflow = 'hidden';
generateSubmitCaptcha();
diff --git a/style.css b/style.css
index 225a0f3..db0139e 100644
--- a/style.css
+++ b/style.css
@@ -472,32 +472,6 @@ footer {
gap: 12px;
}
-.type-toggle {
- display: flex;
- gap: 10px;
- margin-bottom: 14px;
-}
-
-.type-btn {
- flex: 1;
- padding: 10px;
- border: 2px solid var(--border);
- border-radius: 8px;
- background: #fff;
- color: var(--text-light);
- font-family: 'Arial', sans-serif;
- font-size: 0.88rem;
- font-weight: bold;
- cursor: pointer;
- transition: all 0.2s;
- text-align: center;
-}
-
-.type-btn.active {
- background: var(--accent);
- border-color: var(--accent);
- color: #fff;
-}
.submit-btn {
width: 100%;