• Stefy Lanza (nextime / spora )'s avatar
    Fix admin settings UI issues: toggle switches and button text · ef8eb092
    Stefy Lanza (nextime / spora ) authored
    PROBLEMS FIXED:
    
    1. Toggle Switches Not Synced with Current Status:
       - Template was checking for string 'true' but SystemSettings returns boolean values
       - Updated all boolean checks to handle both boolean True and string 'true'
       - Fixed registration_enabled and maintenance_mode toggle switches
       - Fixed badge status displays in both quick settings cards and table
    
    2. Action Buttons Showing as Blue Rectangles Without Text:
       - Buttons only had icons (<i class='fas fa-edit'></i>) without visible text
       - Added visible text labels: 'Edit' and 'Delete' alongside icons
       - Added title attributes for better user experience and accessibility
       - Maintained icon + text combination for better UX
    
    TECHNICAL CHANGES:
    
    Template Updates (app/templates/main/admin_settings.html):
    - Line 40: Updated registration toggle check to handle both boolean and string
    - Line 48-49: Updated registration status badge logic
    - Line 67: Updated maintenance toggle check to handle both boolean and string
    - Line 75-76: Updated maintenance status badge logic
    - Line 113: Updated table value badge logic for boolean settings
    - Line 142-143: Added 'Edit' text to edit buttons with title attribute
    - Line 147-148: Added 'Delete' text to delete buttons with title attribute
    
    COMPATIBILITY:
    - Handles both boolean (True/False) and string ('true'/'false') values
    - Maintains backward compatibility with existing SystemSettings data
    - Works regardless of how the settings are stored or retrieved
    
    USER EXPERIENCE IMPROVEMENTS:
    - Toggle switches now correctly reflect the actual setting status
    - Action buttons are clearly labeled and accessible
    - Tooltips provide additional context for button actions
    - Consistent styling with Bootstrap 5 framework
    
    Both reported issues are now resolved and the admin settings interface should work correctly.
    ef8eb092
Name
Last commit
Last update
..
api Loading commit data...
auth Loading commit data...
database Loading commit data...
main Loading commit data...
templates Loading commit data...
upload Loading commit data...
utils Loading commit data...
__init__.py Loading commit data...
models.py Loading commit data...