{extends file="layout.html"} {block name=title}LMS: {$layout.pagetitle|striphtml}{/block} {block name=module_content}

{$layout.pagetitle}

{if !empty($promotion.attachments)} {/if}
{icon name="money"} {trans("Name")}
{icon name="period"} {trans("Period")} {trans("from")} {trans("to")}
{icon name="optional-info"} {trans("Description")}
{icon name="import"} {trans("New files")} {$item_custom_contents = array()} {foreach $fileupload.attachments as $fileidx => $file} {capture assign="item_custom_content"}{strip} {/strip}{/capture} {$item_custom_contents[] = $item_custom_content} {/foreach} {capture assign="new_item_custom_content"}{strip} {/strip}{/capture} {fileupload id="attachments" fileupload=$fileupload form="promotionedit" item_custom_contents=$item_custom_contents new_item_custom_content=$new_item_custom_content}
{icon name="import"} {trans("Attached files")} {foreach $promotion.attachments as $promoattach}
{$class = ""} {if $promotion.attachments[$promoattach.id].deleted} {$class = "blend"} {/if} {documentview id="{$promotion.id}-{$promoattach.id}" type=$promoattach.contenttype name=$promoattach.filename url="?m=promotionattachmentview&promotionid={$promotion.id}&attachmentid={$promoattach.id}" external=true class=$class }
{/foreach}
{button type="submit" icon="save" label="Submit" form="promotionedit"} {button icon="cancel" label="Cancel" href="?m=promotionlist"}
{/block}