diff --git a/forms/module.php b/forms/module.php index f2ba08d..0a3b723 100644 --- a/forms/module.php +++ b/forms/module.php @@ -152,7 +152,7 @@ break; } - if ($_REQUEST['ajax']) - exit((string)$response); + if ($_REQUEST['ajax'] ?? false) + exit((string)$response); } ?> \ No newline at end of file diff --git a/forms/templates/form_edit.tpl b/forms/templates/form_edit.tpl index 1668815..3708712 100644 --- a/forms/templates/form_edit.tpl +++ b/forms/templates/form_edit.tpl @@ -90,8 +90,8 @@ $fid = parseInt('{$fid}'); $sess = '{$sess}'; $smarty = new Array; -$smarty['start_alert'] = '{$alert.text}'; -$smarty['start_alert_theme'] = '{$alert.theme}'; +$smarty['start_alert'] = '{$alert.text|default:''}'; +$smarty['start_alert_theme'] = '{$alert.theme|default:''}'; $smarty['_email_accept'] = '{#email_accept#}'; $smarty['_email_error'] = '{#email_error#}'; $smarty['tpl_dir'] = '{$tpl_dir}'; @@ -134,7 +134,7 @@ $smarty['form_title_error_title'] = '{#form_title_error_title#}'; {#title#}: - + @@ -146,9 +146,9 @@ $smarty['form_title_error_title'] = '{#form_title_error_title#}';
- + - +
@@ -161,7 +161,7 @@ $smarty['form_title_error_title'] = '{#form_title_error_title#}'; - + {if !$fid} diff --git a/forms/templates/form_fields.tpl b/forms/templates/form_fields.tpl index a0dca12..a371a61 100644 --- a/forms/templates/form_fields.tpl +++ b/forms/templates/form_fields.tpl @@ -56,8 +56,8 @@ {if $field.main && $field.title=='receivers'} {foreach from=$field.setting item=receiver name=receivers}
- - + + {if $smarty.foreach.receivers.index == 0} {else} @@ -185,11 +185,11 @@ {/if} {elseif ($field.type=='select' || $field.type=='multiselect')} - {if !$field.setting_empty} + {if !$field.setting_empty|default:0} + {if !$field.main} @@ -213,7 +213,7 @@ {/if} - +
{#attributes#} {#info_attr_name#}