object; /** @var Zend_View_Helper_CommandForm $cf */ $cf = $this->getHelper('CommandForm'); $data = array( 'host' => $o->host_name, 'service' => $o->service_description ); $modified_attributes = false; if ($o->service_description && $o->service_modified_service_attributes) { $modified_attributes = true; } elseif ($o->host_modified_host_attributes) { $modified_attributes = true; } $test_db_modified = ( ($o->passive_checks_enabled_changed === '0') && ($o->active_checks_enabled_changed === '0') && ($o->obsessing_changed === '0') && ($o->notifications_enabled_changed === '0') && ($o->event_handler_enabled_changed === '0') && ($o->flap_detection_enabled_changed === '0') ) ? false : true; if ($modified_attributes && !$test_db_modified) { $modified_attributes = false; } ?>
Configuration

toggleSubmitForm( 'Passive Checks enabled', $o->passive_checks_enabled, 'startacceptingpassivechecks', 'stopacceptingpassivechecks', (($o->passive_checks_enabled_changed === '1') ? true : false), $data ); ?>
toggleSubmitForm( 'Active Checks enabled', $o->active_checks_enabled, 'enableactivechecks', 'disableactivechecks', (($o->active_checks_enabled_changed === '1') ? true : false), $data ); ?>
toggleSubmitForm( 'Obsessing enabled', $o->obsessing, 'startobsessing', 'stopobsessing', (($o->obsessing_changed === '1') ? true : false), $data ); ?>
toggleSubmitForm( 'Notifications enabled', $o->notifications_enabled, 'enablenotifications', 'disablenotifications', (($o->notifications_enabled_changed === '1') ? true : false), $data ); ?>
toggleSubmitForm( 'Eventhandler enabled', $o->event_handler_enabled, 'enableeventhandler', 'disableeventhandler', (($o->event_handler_enabled_changed === '1') ? true : false), $data ); ?>
toggleSubmitForm( 'Flap Detection enabled', $o->flap_detection_enabled, 'enableflapdetection', 'disableflapdetection', (($o->flap_detection_enabled_changed === '1') ? true : false), $data ); ?>
labelSubmitForm( 'Reset modified attributes', 'Reset configuration to initial values after a system restart', 'btn-cta', 'resetattributes', $data ); ?>