Skip to content
Snippets Groups Projects
Commit 5682eabc authored by Josef Moravec's avatar Josef Moravec Committed by Robert Lange
Browse files

Eliminate event attributes from email forms.

parent 55c7d141
No related merge requests found
<div class="form-group">
<label class="control-label" for="email_to"><?=$this->transEsc('To')?>:</label>
<input type="<?=$this->maxRecipients != 1 ? 'text' : 'email'?>" id="email_to" class="form-control" oninvalid="$('#modal .fa-spinner').remove()" name="to" value="<?=isset($this->to) ? $this->to : ''?>"/>
<input type="<?=$this->maxRecipients != 1 ? 'text' : 'email'?>" id="email_to" class="form-control" name="to" value="<?=isset($this->to) ? $this->to : ''?>"/>
<?php if ($this->maxRecipients != 1): ?>
<br />
<?=$this->transEsc('email_multiple_recipients_note')?>
......@@ -12,13 +12,13 @@
<?php if (!$this->disableFrom): ?>
<div class="form-group">
<label class="control-label" for="email_from"><?=$this->transEsc('From')?>:</label>
<input type="email" id="email_from" oninvalid="$('#modal .fa-spinner').remove()" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="form-control"/>
<input type="email" id="email_from" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="form-control"/>
</div>
<?php endif; ?>
<?php if ($this->editableSubject): ?>
<div class="form-group">
<label class="control-label" for="email_subject"><?=$this->transEsc('email_subject')?>:</label>
<input type="text" id="email_subject" oninvalid="$('#modal .fa-spinner').remove()" name="subject" value="<?=isset($this->subject) ? $this->subject : ''?>" size="40" class="form-control"/>
<input type="text" id="email_subject" name="subject" value="<?=isset($this->subject) ? $this->subject : ''?>" size="40" class="form-control"/>
</div>
<?php endif; ?>
<div class="form-group">
......@@ -38,3 +38,10 @@
<div class="form-group">
<input type="submit" class="btn btn-primary" name="submit" value="<?=$this->transEsc('Send')?>"/>
</div>
<?php $emailFormScript = <<<'JS'
$('#email_to, #email_from, #email_subject').on('invalid', function($e) {
$('#modal .fa-spinner').remove();
});
JS;
?>
<?=$this->inlineScript(\Laminas\View\Helper\HeadScript::SCRIPT, $emailFormScript, 'SET');
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment