ButtonSubmitForm.php 832 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons;
  3. use \ThurData\Servers\KerioEmail\Core\UI\Builder\BaseContainer;
  4. /**
  5. * base button for submiting standalone forms
  6. *
  7. * @autor ThurData <info@thurdata.ch>
  8. */
  9. class ButtonSubmitForm extends BaseContainer
  10. {
  11. use \ThurData\Servers\KerioEmail\Core\UI\Traits\SubmitButton;
  12. protected $id = 'baseSubmitButton';
  13. protected $class = ['lu-btn lu-btn--success mg-submit-form'];
  14. protected $title = 'submit';
  15. protected $htmlAttributes = [
  16. 'href' => 'javascript:;'
  17. ];
  18. public function initContent()
  19. {
  20. $this->htmlAttributes['@click'] = 'submitForm(\'' . $this->getFormId() . '\', $event)';
  21. $this->htmlAttributes['@keyup'] = 'submitForm(\'' . $this->getFormId() . '\', $event)';
  22. }
  23. }