Proje: Okul Platform · Hub: Okul Platform — Conventions

Mobile login modals: two parallel implementations

Mobile (resources/views/mobile/) has two independent login popups — editing one does not affect the other. Always check both when changing login UX.

1. components/login-popup.blade.php (214 lines)

  • Fully self-contained Framework7 popup (.popup.popup-login-modal)
  • Has its OWN login + register forms inline (Turkish text, styles, JS)
  • Used on: mobile/schools/list.blade.php, mobile/schools/show.blade.php

2. components/login-modal.blade.php (6 lines) → includes components/login.blade.php

  • Thin wrapper (.popup.popup-login-modal) that @includes components/login.blade.php
  • login.blade.php (269 lines) is ALSO used standalone for /giris-yap page
  • Used on: mobile/reviews/comment.blade.php

JS wiring in mobile/app.js

  • Password form handler: $$(document).on('submit', '.popup-login-modal .loginForm', …) — catches both (both are .popup-login-modal)
  • Standalone /giris-yap password form does NOT match the above selector → submits as plain HTTP POST to /giris-yap (progressive enhancement)
  • closeLoginPopup() resets forms under .popup-login-modal only

Rule

When adding/changing mobile login flows:

  • Update both login-popup.blade.php AND login.blade.php
  • Verify JS selectors catch the right context (popup vs standalone page)
  • Desktop equivalent has ONE modal (frontend/includes/login-modal.blade.php) plus one standalone component (frontend/components/login.blade.php) — both must also be updated