{$_title = "[`Create notification`]"} {if !empty($notification.id)} {$_title = "[`Edit notification`]"} {/if} {* @event backend_settings_notification_edit.%plugin_id%.top *} {if !empty($backend_settings_notification_edit)} {foreach $backend_settings_notification_edit as $_}{ifset($_.top)}{/foreach} {/if} {$_back_uri = "{$wa_app_url}settings/notifications/"}
{if !empty($notification.id)} {/if}
{* EVENT *}
[`Event`]
{if empty($notification.id)} {else} {$notification.event} {/if}
{* COMPANY *} {$_is_invoice_event = substr($notification.event|default:'', 0, 8) === 'invoice.'} {if empty($notification.id) || $_is_invoice_event}
[`Company`]
{/if} {* NAME *}
[`Notification name`]
{* STATUS *}
[`Enabled`]
{* TRANSPORT *}
[`Transport`]
{if empty($notification.id)} {else} {$_transport = $transports[$notification.transport]|default:[]} {if !empty($_transport.icon)} {/if} {$_transport.name|default:'[`Unknown`]'} {/if}
[`Recipient`]
{$_recipient_email_value = ''} {if !$_found_recipient && $notification.id > 0 && $notification.transport === 'email'} {$_recipient_email_value = $notification.recipient} {/if} {$_recipient_phone_value = ''} {if !$_found_recipient && $notification.id > 0 && $notification.transport === 'sms'} {$_recipient_phone_value = $notification.recipient} {/if}
{* BODY *} {* for email *} {if empty($notification.id) || $notification.transport == crmNotificationModel::TRANSPORT_EMAIL}
[`Email subject`]
[`Email body`]
{/if} {* for phone *} {if empty($notification.id) || $notification.transport == crmNotificationModel::TRANSPORT_SMS}
[`SMS content`]
[`Max 300 chars.`]
{/if}
{capture assign="_dialog_template"}
[`Send to`]:
{/capture} {capture assign="_success_html"}

[`Message sent successfully`]

{/capture}
{* @event backend_settings_notification_edit.%plugin_id%.bottom *} {if !empty($backend_settings_notification_edit)} {foreach $backend_settings_notification_edit as $_}{ifset($_.bottom)}{/foreach} {/if}