Changeset 1446 for branches/newtoken/wifidog/admin/generic_object_admin.php
- Timestamp:
- 02/11/10 17:34:27 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/newtoken/wifidog/admin/generic_object_admin.php
r1424 r1446 74 74 $supportsPreview = true; 75 75 $supportsDeletion = true; 76 $readOnly = false; 76 77 /* 77 78 * Check for the object class to use … … 357 358 case "ContentTypeFilter" : 358 359 case "ProfileTemplate" : 360 case "Connection": 361 case "TokenTemplate": 359 362 $supportsPreview = false; 360 363 break; … … 367 370 switch ($_REQUEST['object_class']) { 368 371 case "User" : 372 case "Connection": 369 373 $supportsDeletion = false; 370 374 break; … … 379 383 break; 380 384 } 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 381 396 382 397 if (!$object) { … … 396 411 $html .= $object->getAdminUI(); 397 412 $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 } 400 417 401 418 if ($supportsDeletion) {
