Skip to content
Snippets Groups Projects
Commit 09e8e470 authored by Robert Lange's avatar Robert Lange
Browse files

Merge branch 'finc' into instance/fid

parents 676533fa edaa4620
Branches
Tags
No related merge requests found
...@@ -103,6 +103,21 @@ queryIls[] = 'getFacetAvail:Local' ...@@ -103,6 +103,21 @@ queryIls[] = 'getFacetAvail:Local'
;root_username = 'root' ;root_username = 'root'
;root_password = '' ;root_password = ''
; Profile fields listed here will never be allowed to be edited if the necessary
; scope is missing for a patron
; disabled profile fields for missing scope: update_patron_name
;disabledProfileFieldsForMissingUpdateNameScope[] = "firstname"
;disabledProfileFieldsForMissingUpdateNameScope[] = "lastname"
; disabled profile fields for missing scope: update_patron_email
;disabledProfileFieldsForMissingUpdateEmailScope[] = "email"
; disabled profile fields for missing scope: update_patron_address
;disabledProfileFieldsForMissingUpdateAddressScope[] = "address1"
;disabledProfileFieldsForMissingUpdateAddressScope[] = "zip"
;disabledProfileFieldsForMissingUpdateAddressScope[] = "city"
;disabledProfileFieldsForMissingUpdateAddressScope[] = "country"
; Driver configuration, usually you can leave it untouched ; Driver configuration, usually you can leave it untouched
; Without customization the PAIA driver will offer to place a recall for items with ; Without customization the PAIA driver will offer to place a recall for items with
......
...@@ -53,11 +53,12 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple ...@@ -53,11 +53,12 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple
/** /**
* Execute the request * Execute the request
* *
* @param MvcEvent $e * @param \Zend\Mvc\MvcEvent $event Event
*
* @return mixed * @return mixed
* @throws Exception\DomainException * @throws Exception\DomainException
*/ */
public function onDispatch(MvcEvent $e) public function onDispatch(MvcEvent $event)
{ {
if ($redirect = $this->getRequest()->getQuery()->get('redirect')) { if ($redirect = $this->getRequest()->getQuery()->get('redirect')) {
$redirect = urldecode($redirect); $redirect = urldecode($redirect);
...@@ -74,7 +75,7 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple ...@@ -74,7 +75,7 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple
$this->followup()->store(['finc-redirect' => $redirect]); $this->followup()->store(['finc-redirect' => $redirect]);
} }
} }
return parent::onDispatch($e); return parent::onDispatch($event);
} }
/** /**
......
...@@ -1770,4 +1770,49 @@ class FincILS extends PAIA implements LoggerAwareInterface ...@@ -1770,4 +1770,49 @@ class FincILS extends PAIA implements LoggerAwareInterface
return []; return [];
} }
/**
* Helper function to check whether the patron is allowed to edit
* patron information
*
* @return bool
*/
public function canEditAccount()
{
return $this->paiaCheckScope(self::SCOPE_UPDATE_PATRON)
&& (
$this->paiaCheckScope(self::SCOPE_UPDATE_PATRON_NAME)
|| $this->paiaCheckScope(self::SCOPE_UPDATE_PATRON_EMAIL)
|| $this->paiaCheckScope(self::SCOPE_UPDATE_PATRON_ADDRESS)
);
}
/**
* Returns Array with profile fields that are never allowed to be edited
*
* @return array
*/
public function getIgnoredProfileFields()
{
$ignoredProfileFields = [];
if (!$this->paiaCheckScope(self::SCOPE_UPDATE_PATRON_NAME)) {
$ignoredProfileFields = array_merge(
$ignoredProfileFields,
$this->config['PAIA']['disabledProfileFieldsForMissingUpdateNameScope'] ?? []
);
}
if (!$this->paiaCheckScope(self::SCOPE_UPDATE_PATRON_EMAIL)) {
$ignoredProfileFields = array_merge(
$ignoredProfileFields,
$this->config['PAIA']['disabledProfileFieldsForMissingUpdateEmailScope'] ?? []
);
}
if (!$this->paiaCheckScope(self::SCOPE_UPDATE_PATRON_ADDRESS)) {
$ignoredProfileFields = array_merge(
$ignoredProfileFields,
$this->config['PAIA']['disabledProfileFieldsForMissingUpdateAddressScope'] ?? []
);
}
return $ignoredProfileFields;
}
} }
...@@ -346,7 +346,11 @@ trait LiberoWachtlTrait ...@@ -346,7 +346,11 @@ trait LiberoWachtlTrait
*/ */
public function getIgnoredProfileFields() public function getIgnoredProfileFields()
{ {
return $this->config['LiberoWachtl']['ignoredProfileFields'] ?? []; $ignoredProfileFields = parent::getIgnoredProfileFields();
return array_merge(
$ignoredProfileFields,
$this->config['LiberoWachtl']['ignoredProfileFields'] ?? []
);
} }
/** /**
......
...@@ -158,12 +158,14 @@ input { ...@@ -158,12 +158,14 @@ input {
} }
&[type='email'], &[type='email'],
&[type='text'] { &[type='text'],
&[type='search'] {
border: $input-email-text-border; border: $input-email-text-border;
padding: $input-email-text-padding; padding: $input-email-text-padding;
} }
&[type='text'] { &[type='text'],
&[type='search'] {
&:focus, &:focus,
&:hover { &:hover {
@include outline($outline-default-style, 2px, $input-border-focus); @include outline($outline-default-style, 2px, $input-border-focus);
......
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
<?php $id = $driver->getUniqueID() ?> <?php $id = $driver->getUniqueID() ?>
<?php $title = $this->transEsc($driver->getTitle()); ?> <?php $title = $this->transEsc($driver->getTitle()); ?>
<?php if ($id) { <?php
$coverId = "cover-$id-" . time(); if ($id) {
} else { $coverId = "cover-$id-" . floor(microtime(true) * 1000);
$cover = false; } else {
} $cover = false;
}
?> ?>
<?php if ($cover): ?> <?php if ($cover): ?>
<?php /* load cover directly... */ ?> <?php /* load cover directly... */ ?>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<?php /* finc: keep "required", keep role="searchbox" */ ?> <?php /* finc: keep "required", keep role="searchbox" */ ?>
<input id="searchForm_lookfor" <input id="searchForm_lookfor"
class="searchForm_lookfor form-control search-query<?php if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : '' ?><?php endif ?>" class="searchForm_lookfor form-control search-query<?php if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : '' ?><?php endif ?>"
type="text" type="search"
name="lookfor" name="lookfor"
value="<?=$this->escapeHtmlAttr($this->lookfor)?>" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"
<?php if ($placeholder): ?> <?php if ($placeholder): ?>
......
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