Show
Ignore:
Timestamp:
02/11/10 17:34:27 (2 years ago)
Author:
gbastien
Message:

* Merged recent changes in the trunk into this branch
* New token architecture not yet fully functional, nor tested, but ...

  • can now edit token templates for different context of tokens (from the edit netork interface at the bottom of page)
  • Users connected through a wifidog gateway can view their connection token information
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/newtoken/wifidog/admin/generic_object_admin.php

    r1424 r1446  
    7474$supportsPreview = true; 
    7575$supportsDeletion = true; 
     76$readOnly = false; 
    7677/* 
    7778 * Check for the object class to use 
     
    357358            case "ContentTypeFilter" : 
    358359            case "ProfileTemplate" : 
     360            case "Connection": 
     361            case "TokenTemplate": 
    359362                $supportsPreview = false; 
    360363                break; 
     
    367370        switch ($_REQUEST['object_class']) { 
    368371            case "User" : 
     372            case "Connection": 
    369373                $supportsDeletion = false; 
    370374                break; 
     
    379383                break; 
    380384        } 
     385         
     386        // Process deletion abilities 
     387        switch ($_REQUEST['object_class']) { 
     388            case "Connection": 
     389                $readOnly = true; 
     390                break; 
     391 
     392            default : 
     393                break; 
     394        } 
     395        
    381396 
    382397        if (!$object) { 
     
    396411        $html .= $object->getAdminUI(); 
    397412        $html .= "<div class='generic_object_admin_edit'>"; 
    398         $html .= "<input type='hidden' name='action' value='save'>"; 
    399         $html .= "<input type='submit' class='submit' name='save_submit' value='" . _("Save") . " " . get_class($object) . "'>"; 
     413        if (!$readOnly) { 
     414            $html .= "<input type='hidden' name='action' value='save'>"; 
     415            $html .= "<input type='submit' class='submit' name='save_submit' value='" . _("Save") . " " . get_class($object) . "'>"; 
     416        } 
    400417 
    401418        if ($supportsDeletion) {