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

Merge branch 'release-5.0'

parents 0ccaf749 d4dbbf48
No related merge requests found
......@@ -55,6 +55,9 @@ VuFind.register('lightbox', function Lightbox() {
_modalBody.find('h2:first-of-type')
.after('<div class="flash-message alert alert-' + type + '">' + message + '</div>');
}
function close() {
_modal.modal('hide');
}
/**
* Update content
......@@ -80,7 +83,7 @@ VuFind.register('lightbox', function Lightbox() {
var href = alerts.find('.download').attr('href');
if (typeof href !== 'undefined') {
location.href = href;
_modal.modal('hide');
close();
} else {
showAlert(msgs, 'success');
}
......@@ -386,6 +389,7 @@ VuFind.register('lightbox', function Lightbox() {
ajax: ajax,
alert: showAlert,
bind: bind,
close: close,
flashMessage: flashMessage,
reload: reload,
render: render,
......
......@@ -5,7 +5,7 @@
<?=$this->flashmessages();?>
<div id="popupDetails" class="confirmDialog">
<form class="pull-left flip" action="<?=$this->escapeHtmlAttr($this->confirm)?>" method="post">
<form action="<?=$this->escapeHtmlAttr($this->confirm)?>" method="post">
<?php if (isset($this->extras)): ?>
<?php foreach ($this->extras as $extra => $value): ?>
<?php if (is_array($value)): ?>
......@@ -18,10 +18,7 @@
<?php endforeach; ?>
<?php endif;?>
<input class="btn btn-primary" type="submit" name="confirm" value="<?=$this->transEsc('confirm_dialog_yes') ?>" />
<input class="btn btn-default" type="button" name="cancel" value="<?=$this->transEsc('confirm_dialog_no') ?>" onClick="VuFind.lightbox.close()" />
</form>
<form action="<?=$this->escapeHtmlAttr($this->cancel) ?>" method="post">
<input class="btn btn-default" type="submit" name="cancel" value="<?=$this->transEsc('confirm_dialog_no') ?>" />
</form>
<div class="clearer"></div>
</div>
</div>
......@@ -35,7 +35,7 @@
<textarea class="form-control" id="edit_notes<?=$current['listId'] ?>" name="notes<?=$current['listId'] ?>" rows="3"><?=$this->escapeHtml($current['notes'])?></textarea>
</div>
<a href="<?=$this->url('userList', ['id' => $current['listId']]) ?>?delete=<?=urlencode($this->driver->getUniqueId())?>&amp;source=<?=urlencode($this->driver->getSourceIdentifier())?>" id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>delete<?=$current['listId'] ?>" data-lightbox>
<i class="fa fa-trash"></i> <?=$this->transEsc('delete') /* TODO: replace with better string */ ?>
<i class="fa fa-trash"></i> <?=$this->transEsc('Delete') ?>
</a>
</fieldset>
<?php endforeach; ?>
......
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