• 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
app Loading commit data...
database Loading commit data...
distribution Loading commit data...
hooks Loading commit data...
.env.example Loading commit data...
.gitignore Loading commit data...
BUILD.md Loading commit data...
GLIBC_COMPATIBILITY.md Loading commit data...
README.md Loading commit data...
build.py Loading commit data...
config.py Loading commit data...
fixture_daemon.py Loading commit data...
install.sh Loading commit data...
prompt.txt Loading commit data...
requirements-build.txt Loading commit data...
requirements.txt Loading commit data...
test_upload.py Loading commit data...
token Loading commit data...