[%# which one is authorized? #%]
[% IF !c.check_cmd_permissions('hostgroup', c.request.parameters.hostgroup) %]
  [% WRAPPER error.tt errorMessage = "you are not authorized for this command" errorDescription = "check your configuration if you believe this is an error" %][% END %]
[% ELSE %]

[%# description used by the commands page #%]
[% WRAPPER $cmd_tt
   request     = 'You are requesting to disable active checks of all services in a particular hostgroup'
   description = 'This command is used to disable active checks of all services in the specified hostgroup. This <i>does not</i> disable checks of the hosts in the hostgroup unless you check the "Disable for hosts too" option.'
%]

[%# definition of the command send to your backend #%]
[% BLOCK action %]
    [% hostgroup_name       = c.request.parameters.hostgroup %]

    [% IF c.request.parameters.ahas %]
        DISABLE_HOSTGROUP_HOST_CHECKS;[% sprintf("%s",hostgroup_name) %]
    [% END +%]
    DISABLE_HOSTGROUP_SVC_CHECKS;[% sprintf("%s",hostgroup_name) %]
[% END %]

[%# definition of the html form data #%]
[% PROCESS _cmd_parts.tt %]
  [% PROCESS cmd_form_hostgroup %]
  [% PROCESS cmd_form_ahas name="Disable" %]

[% END %]
[% END %]
