From 46c0a5334937c6f08550c4c9c5e6293806ddd874 Mon Sep 17 00:00:00 2001 From: Repellent Date: Sat, 8 Nov 2025 14:36:05 +0500 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B1=D0=B8=D1=80=D0=B0=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B5=D0=B4=D1=83=D0=BF=D1=80=D0=B5=D0=B6=D0=B4?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- forms/module.php | 4 ++-- forms/templates/form_edit.tpl | 12 ++++++------ forms/templates/form_fields.tpl | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) 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#}