{extends file="layout.html"} {block name=title}LMS: {$layout.pagetitle|striphtml}{/block} {block name=module_content} {$xajax} {if empty($event.ticketid)}

{$layout.pagetitle}

{else}

{t a=$event.ticketid}Add new event to request #$a{/t}

{/if}

{box_container id="event"} {box_header icon="img/calendar.gif" label="Title:"} {/box_header} {box_contents} {box_panel} {block name="eventmodify_left_panel"} {box_row icon="img/time.gif" label="Time:"} {event_time_selection field_prefix="event" begin=$event.begin end=$event.end wholedays=$event.wholedays} {/box_row} {box_row icon="img/info.gif" label="Description:"} {/box_row} {/block} {/box_panel} {box_panel} {block name="eventmodify_right_panel"} {box_row icon="img/access.gif" label="Status:"} {/box_row} {box_row icon="img/desc.gif" label="Type:"} {/box_row} {box_row icon="img/customer.gif" label="Customer:"} {if $layout.module == 'eventedit' || (empty($event.ticketid) && empty($event.customerid))} {$customer_selector='[name="event[custid]"]'} {$address_selector='[name="event[address_id]"]'} {customerlist form="event" customers=$customerlist selected=$event.customerid selectname="event[customerid]" inputname="event[custid]" customOnChange="change_customer('{$customer_selector}', '{$address_selector}');"} {else} {if !empty($event.customerid)} {$event.customername} ({$event.customerid}) {else} {trans("Request not assigned to any customer.")} {/if} {/if} {/box_row} {box_row icon="img/home.gif" label="Location:"} {if !isset($event.ticketid) || empty($event.ticket.address_id)} {include file="customer/customeraddresses.html" id="customer_addresses" name="event[address_id]" trigger="address_id"} {else} {t a=$event.ticket.location}$a (location cannot be changed as it is assigned to ticket){/t} {/if} {/box_row} {$visibility=!empty($nodes)} {box_row class="node-row" icon="img/node.gif" label="Node:" visible=$visibility} {if !isset($event.ticketid)} {else} {if !empty($event.ticket.nodeid)} {$event.ticket.node_name} ({$event.ticket.nodeid}) {else} {trans("Request not assigned to any node.")} {/if} {/if} {/box_row} {box_row icon="img/users.gif" label="Users:" field_class="multiselect"}
{foreach $usergroups as $group} {/foreach} {/box_row} {function event_ticket_item_content} {capture name="item_content_result" assign="item_content_result"} {sprintf("#%06d", $item.id)} {$item.name} {/capture} {/function} {if $layout.module == 'eventedit'} {box_row icon="img/note.gif" label="Note:"} {/box_row} {box_row icon="img/ticket.gif" label="Assign ticket"} {list id="eventedit-ticket" tipid="ticketid" tip="Test" items=$event.ticket field_name_pattern="event[ticketid]" item_content="event_ticket_item_content"} {/box_row} {/if} {if $layout.module == 'eventadd'} {box_row icon="img/ticket.gif" label="Ticket:"}   {if !isset($event.helpdesk) || $event.helpdesk != 'assign'} {$visible = false} {else} {$visible = true} {/if} {list id="eventadd-ticket" tipid="ticketid" tip="Test" items=$event.ticket field_name_pattern="event[ticketid]" item_content="event_ticket_item_content" visible=$visible} {/box_row} {/if} {/block} {/box_panel} {/box_contents} {box_buttons} {if $layout.module == 'eventadd'} {/if} {button type="submit" icon="save" accesskey="s" label="Submit"} {button icon="cancel" onclick="location.href='?m=eventlist{if isset($backid)}#{$backid}{/if}';" label="Cancel"} {/box_buttons} {/box_container}
{/block}