[%# which one is authorized? #%]
[% IF !c.check_cmd_permissions('service', c.request.parameters.service, c.request.parameters.host) %]
  [% 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 enable flap detection for a particular service'
   description = 'This command is used to enable flap detection for a specific service. If flap detection is disabled on a program-wide basis, this will have no effect,'
%]

[%# definition of the command send to your backend #%]
[% BLOCK action%]
    [% service_desc         = c.request.parameters.service %]
    [% host_name            = c.request.parameters.host %]

    ENABLE_SVC_FLAP_DETECTION;[% sprintf("%s;%s",host_name,service_desc) %]
[% END %]

[%# definition of the html form data #%]
<tr><td class='optBoxRequiredItem'>Host Name:</td><td><b><input type='text' name='host' value='[% c.request.parameters.host %]'></b></td></tr>
<tr><td class='optBoxRequiredItem'>Service:</td><td><b><input type='text' name='service' value='[% c.request.parameters.service %]'></b></td></tr>

[% END %]
[% END %]
