• Stefy Lanza (nextime / spora )'s avatar
    Fix admin template URL endpoints and registration toggle parameter mismatch · a659e602
    Stefy Lanza (nextime / spora ) authored
    PROBLEMS RESOLVED:
    
    1. Admin Settings Template URL Error:
       - Fixed breadcrumb navigation in admin_settings.html line 14
       - Changed from: url_for('main.admin')
       - Changed to: url_for('main.admin_panel')
       - Matches actual route function name in routes.py
    
    2. Registration Toggle Parameter Mismatch:
       - Fixed admin_users.html registration toggle JavaScript (lines 483-527)
       - Changed from using 'registration_disabled' parameter
       - Changed to using 'registration_enabled' parameter
       - Now matches the admin_registration_settings API endpoint format
    
    3. Registration Toggle Logic Fix:
       - Updated toggle.checked logic to use registration_enabled directly
       - Fixed status text display to show correct enabled/disabled state
       - Corrected AJAX request payload to send registration_enabled boolean
    
    TECHNICAL DETAILS:
    - Both templates now use consistent parameter naming with the backend API
    - Registration toggle in /admin/users now works correctly with database persistence
    - Admin settings breadcrumb navigation no longer throws BuildError
    - All admin interfaces now properly integrate with SystemSettings model
    
    This resolves both reported issues:
    - '/admin/settings give error' - Fixed URL endpoint mismatch
    - 'registration settings in /admin/users keep to show as enabled' - Fixed parameter format
    a659e602
Name
Last commit
Last update
..
auth Loading commit data...
main Loading commit data...
setup Loading commit data...
upload Loading commit data...
base.html Loading commit data...