{$form.javascript}
{literal}
{/literal}
{if isset($form.msgacl) }
{t}You can't edit this downtime because you don't have access to all of its resources{/t}
{/if}

- {$sort1}
- {$sort2}

{if !isset($form.msgacl) }
{if $o == "a" || $o == "c" || $o == "mc"}

{if isset($form.submitC)} {$form.submitC.html} {elseif isset($form.submitMC)} {$form.submitMC.html} {else} {$form.submitA.html} {/if} {$form.reset.html}

{else if $o == "w"}

{if isset($form.change)}{$form.change.html}{/if}

{/if}
{/if}

### | {$form.header.title}

#### {$form.header.information}

{$form.downtime_name.label} | {$form.downtime_name.html}
{$form.downtime_description.label} | {$form.downtime_description.html}
{$form.downtime_activate.label} | {$form.downtime_activate.html}

#### {$form.header.periods}

{$periods}

{if isset($period_err) }
{$period_err}
{/if}
{if !isset($form.msgacl) }
{/if}
{if $o != "w"} {$add} {/if}

{if $o == "w" || isset($form.msgacl) } {foreach item=period from=$periods_tab} {assign var='nbperiod' value='1'} {if $period.month_cycle == 'none'} {assign var='type_string' value=$monthly_basis} {elseif $period.month_cycle == 'all'} {assign var='type_string' value=$weekly_basis} {else} {assign var='type_string' value=$specific_date} {/if}

{$periods} {$nbperiod}
{$downtime_type} : | {$type_string}
{$days} | {if $period.month_cycle == 'none'} {assign var="nbDay" value="0"} {foreach item=day from=$period.day_of_month}{$day} {if $nbDay % 7 == 0} {/if}{assign var="nbDay" value=$nbDay+1}{/foreach} {elseif $period.month_cycle == 'all'} {foreach item=day from=$period.day_of_week}{$week_days.$day} {/foreach} {else} {$period.month_cycle} {$period.day_of_week} {$of_month} {/if}
{$time_period} | {$period.start_time} - {$period.end_time}
{$fixed}{if $period.fixed == '1'} (x) {/if}{$flexible}{if $period.fixed == '0'} (x){/if} | {if $period.fixed == '0'}{$period.duration} {$seconds}{/if}

{assign var="i" value=$i+1} {/foreach}

{/if}

{if $o == "a" || $o == "c"}
{if isset($form.required_note)} {$form.required_note} {/if}
{/if}

### | {$form.header.title}

#### {$form.header.linkManagement}

{$form.host_relation.label} | {$form.host_relation.html}
{$form.hostgroup_relation.label} | {$form.hostgroup_relation.html}
{$form.svc_relation.label} | {if isset($form.host4svc)} {$form.host4svc.html} {/if} {$form.svc_relation.html}
{$form.svcgroup_relation.label} | {$form.svcgroup_relation.html}
{if $o == "a" || $o == "c"}
{if isset($form.required_note)} {$form.required_note} {/if}
{/if}

{if !isset($form.msgacl) }
{if $o == "a" || $o == "c" || $o == "mc"}

{if isset($form.submitC)} {$form.submitC.html} {elseif isset($form.submitMC)} {$form.submitMC.html} {else} {$form.submitA.html} {/if} {$form.reset.html}

{else if $o == "w"}

{if isset($form.change)}{$form.change.html}{/if}

{/if}
{/if} {$form.hidden} {$helptext}