Система управления «Сайт PRO»
Версия 20240107

input.submit.php

Кнопка отправки формы

Вызывается из:

Смотрите описание Cms\Root\Form\Field\Submit

Исходный код
<?php

$attributes = $Field->getFieldInputAttributes(array(
    'grid-margin' => $Field->getInputMargin(),
    'grid-width' => $Field->getInputWidth(),
    'class' => 'field-input field-input--' . $Field->type,
));
print '<span';
foreach ($attributes as $attributeName => $attributeValue) if ($attributeValue !== null) print ' ' . $attributeName . '="' . $attributeValue . '"';
print '>';

$attributes = $Field->getInputAttributes(array(
    'type' => 'submit',
    'disabled' => $Field->disabled ? '' : null,
    'class' => 'button button--submit',
    'id' => $Field->id('-button'),
));
print '<button';
foreach ($attributes as $attributeName => $attributeValue) if ($attributeValue !== null) print ' ' . $attributeName . '="' . $attributeValue . '"';
print '><span>' . (strval($Field->label) !== '' ? $Field->label : $Main->translate('Сохранить')) . '</span></button>';

if ($attributeValue = $Field->getAttribute('text')) {
    print '<span class="label-text">' . $a['text'] . '</span>';
}

print '</span>';

?>