2020-05-29 13:41:58 +02:00
|
|
|
<?php
|
2021-06-12 12:04:57 +02:00
|
|
|
if (!empty($ajax)) {
|
2020-05-29 13:41:58 +02:00
|
|
|
echo sprintf(
|
|
|
|
'%s',
|
|
|
|
sprintf(
|
2021-03-10 14:54:52 +01:00
|
|
|
'<button id="submitButton" class="btn btn-primary" data-form-id="%s" type="button" autofocus>%s</button>',
|
2020-12-15 10:40:49 +01:00
|
|
|
'#form-' . h($formRandomValue),
|
2020-05-29 13:41:58 +02:00
|
|
|
__('Submit')
|
|
|
|
)
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
echo $this->Form->button(empty($text) ? __('Submit') : h($text), [
|
|
|
|
'class' => 'btn btn-' . (empty($type) ? 'primary' : h($type)),
|
2021-10-28 09:27:30 +02:00
|
|
|
'type' => 'submit',
|
|
|
|
'data-form-id' => '#form-' . h($formRandomValue)
|
2020-05-29 13:41:58 +02:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
?>
|