[%# which one is authorized? #%]
[% IF !c.check_cmd_permissions('servicegroup', c.request.parameters.servicegroup) %]
  [% 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 servicegroup'
   description = 'This command is used to disable active checks of all services in the specified servicegroup. This <i>does not</i> disable checks of the hosts in the servicegroup unless you check the "Disable for hosts too" option.'
%]

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

    [% IF c.request.parameters.ahas %]
        DISABLE_SERVICEGROUP_HOST_CHECKS;[% sprintf("%s",servicegroup_name) %]
    [% END +%]
    DISABLE_SERVICEGROUP_SVC_CHECKS;[% sprintf("%s",servicegroup_name) %]
[% END %]

[%# definition of the html form data #%]
<tr><td class='optBoxRequiredItem'>Servicegroup Name:</td><td><b><input type='text' name='servicegroup' value='[% c.request.parameters.servicegroup %]'></b></td></tr>
<tr><td class='optBoxItem'>Disable For Hosts Too:</td><td><b><input type='checkbox' name='ahas'[% IF c.config.cmd_defaults.ahas %] checked[% END %]></b></td></tr>

[% END %]
[% END %]
