Skip to content
Snippets Groups Projects
Commit b838eea1 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Blueprint email normalization, ajax handler for blueprint.

parent bbeeeda7
Branches
Tags
No related merge requests found
...@@ -1086,10 +1086,19 @@ class AjaxController extends AbstractBase ...@@ -1086,10 +1086,19 @@ class AjaxController extends AbstractBase
// Attempt to send the email: // Attempt to send the email:
try { try {
$view = $this->createEmailViewModel(); $view = $this->createEmailViewModel();
$this->getServiceLocator()->get('VuFind\Mailer')->sendLink( $mailer = $this->getServiceLocator()->get('VuFind\Mailer');
$mailer->sendLink(
$view->to, $view->from, $view->message, $url, $view->to, $view->from, $view->message, $url,
$this->getViewRenderer(), $this->params()->fromPost('subject') $this->getViewRenderer(), $this->params()->fromPost('subject')
); );
if ($this->params()->fromPost('ccself')
&& $view->from != $view->to
) {
$mailer->sendLink(
$view->from, $view->from, $view->message, $url,
$this->getViewRenderer(), $this->params()->fromPost('subject')
);
}
return $this->output( return $this->output(
$this->translate('email_success'), self::STATUS_OK $this->translate('email_success'), self::STATUS_OK
); );
......
...@@ -23,4 +23,7 @@ ...@@ -23,4 +23,7 @@
<textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea> <textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea>
<br/> <br/>
<input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/>
<? if ($this->disableFrom && $this->userEmailInFrom): ?>
<input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label>
<? endif; ?>
</form> </form>
...@@ -19,4 +19,7 @@ ...@@ -19,4 +19,7 @@
<textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea> <textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea>
<br/> <br/>
<input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/>
<? if ($this->disableFrom && $this->userEmailInFrom): ?>
<input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label>
<? endif; ?>
</form> </form>
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