diff --git a/local/config/vufind/FincILS.ini b/local/config/vufind/FincILS.ini index f7bc8fa461580f94c5b2d7657e53f79b6c07b590..407dc87bef5f2237d6dad75a20fdf8cf72a42c79 100644 --- a/local/config/vufind/FincILS.ini +++ b/local/config/vufind/FincILS.ini @@ -103,6 +103,21 @@ queryIls[] = 'getFacetAvail:Local' ;root_username = 'root' ;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 ; Without customization the PAIA driver will offer to place a recall for items with diff --git a/module/finc/src/finc/Controller/MyResearchController.php b/module/finc/src/finc/Controller/MyResearchController.php index e1499f47372eeb8c8a5fd801443932f85d3be820..6e95b173f7b17c6522da0005becaa5f861ff9e3d 100644 --- a/module/finc/src/finc/Controller/MyResearchController.php +++ b/module/finc/src/finc/Controller/MyResearchController.php @@ -53,11 +53,12 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple /** * Execute the request * - * @param MvcEvent $e + * @param \Zend\Mvc\MvcEvent $event Event + * * @return mixed * @throws Exception\DomainException */ - public function onDispatch(MvcEvent $e) + public function onDispatch(MvcEvent $event) { if ($redirect = $this->getRequest()->getQuery()->get('redirect')) { $redirect = urldecode($redirect); @@ -74,7 +75,7 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple $this->followup()->store(['finc-redirect' => $redirect]); } } - return parent::onDispatch($e); + return parent::onDispatch($event); } /** diff --git a/module/finc/src/finc/ILS/Driver/FincILS.php b/module/finc/src/finc/ILS/Driver/FincILS.php index 036bb03fe6abff5fb7899e493e8ab7cb3cd9a261..786db5ce3cc10ed1fafd0ece4d0aab260f45b9a1 100644 --- a/module/finc/src/finc/ILS/Driver/FincILS.php +++ b/module/finc/src/finc/ILS/Driver/FincILS.php @@ -1770,4 +1770,49 @@ class FincILS extends PAIA implements LoggerAwareInterface 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; + } } diff --git a/module/finc/src/finc/ILS/Driver/LiberoWachtlTrait.php b/module/finc/src/finc/ILS/Driver/LiberoWachtlTrait.php index b7488b994e4bea43e2689f0ec3792378fa607bad..d15ced6d27d2b8a7d91712b94aca09356f844ec8 100644 --- a/module/finc/src/finc/ILS/Driver/LiberoWachtlTrait.php +++ b/module/finc/src/finc/ILS/Driver/LiberoWachtlTrait.php @@ -346,7 +346,11 @@ trait LiberoWachtlTrait */ public function getIgnoredProfileFields() { - return $this->config['LiberoWachtl']['ignoredProfileFields'] ?? []; + $ignoredProfileFields = parent::getIgnoredProfileFields(); + return array_merge( + $ignoredProfileFields, + $this->config['LiberoWachtl']['ignoredProfileFields'] ?? [] + ); } /** diff --git a/themes/finc/scss/_customVariables.scss b/themes/finc/scss/_customVariables.scss index fe67f2cfa7897c51032251a46365f6961d46a752..7cbf663f4dd16f8c94d2d4c616e0ec6459157b75 100644 --- a/themes/finc/scss/_customVariables.scss +++ b/themes/finc/scss/_customVariables.scss @@ -68,6 +68,20 @@ $pagination-disabled-color: $default-disabled-color !default; // ***************************************************************** // ************ General dimensions ********************************* // ***************************************************************** + +// WCAG 2.1 for AA requires a minimum viewport size of 320px +// -- we therefore need to define the corresponding variables +// The most common viewport width for narrow devices however, seems to be 360px +// Please note, that $screen-xs-min = $screen-xs = 480px +$screen-wcag-mini-viewports-min: 320px !default; +$screen-wcag-above-mini-below-xs-viewports-min: 360px !default; +$screen-wcag-mini-viewports-max: $screen-wcag-above-mini-below-xs-viewports-min - 1px !default; +$screen-wcag-above-mini-below-xs-viewports-max: 479px !default; + + + + + // The general gutter width (padding between columns) is calculated // like so: '$grid-gutter-width / 2' // which gives you the left or right gutter width; this can be taken @@ -91,10 +105,6 @@ $content-top-padding-edit-list-xs: $grid-gutter-width / 2 !default; $mainbody-sidebar-top-padding: $content-top-padding !default; $mainbody-sidebar-top-padding-xs: 0 !default; -// Sidebar item padding -$sidebar-item-padding: .75em 1em !default; -$sidebar-item-padding-sm: .75em .5em !default; - // Table cell padding - adjust in themes to avoid content jumps when switching tabs // $table-cell-padding: 5px !default; @@ -176,7 +186,7 @@ $mainbody-link-text-decoration: $link-text-decoration; $btn-default-color: $oil !default; -$btn-text-decoration: $link-text-decoration; +$btn-text-decoration: $link-text-decoration !default; // Use darker text color when default-buttons are used on white BG (new class: bth-transparent // for updateCart in search results, date-range slider in sidebar and adv search @@ -1084,6 +1094,10 @@ $bulk-action-record-view-checkbox-input-margin-top: $input-top-margin !default; // ************ Sidebar elements *********************************** // ***************************************************************** +// Sidebar item padding +$sidebar-item-padding: .75em 1em !default; +$sidebar-item-padding-sm: .75em .5em !default; + // Menu in MyAccount, selected facets $sidebar-facet-active-background-color: $brand-warning !default; $sidebar-facet-active-color: $black !default; diff --git a/themes/finc/scss/components/_buttons.scss b/themes/finc/scss/components/_buttons.scss index eda5b676c87f69e75374fb52d45480584684467f..93df8968529bd0cacd293495d7b0431e6d030e64 100644 --- a/themes/finc/scss/components/_buttons.scss +++ b/themes/finc/scss/components/_buttons.scss @@ -4,6 +4,9 @@ // For Add-to-Bookbag buttons see bookbag.scss // For bulk-action-buttons see bulk-action-buttons.scss + + + // ***************************************************************** // ************ General buttons ************************************ // ***************************************************************** @@ -16,6 +19,13 @@ // Buttons have a DEFAULT HEIGHT of 38px, the same // as '$navigation-element-default-height' for select boxes and other elements + + + +// ***************************************************************** +// ************ Specific buttons *********************************** +// ***************************************************************** + // Default and secondary buttons .btn-default.active, .btn-secondary.active { diff --git a/themes/finc/scss/components/_forms.scss b/themes/finc/scss/components/_forms.scss index f500fc35e6c747068e25f78aff8578d3436eacbc..ecdccff6627afe19a7ed20b1a52a68c8c35af0b8 100644 --- a/themes/finc/scss/components/_forms.scss +++ b/themes/finc/scss/components/_forms.scss @@ -158,12 +158,14 @@ input { } &[type='email'], - &[type='text'] { + &[type='text'], + &[type='search'] { border: $input-email-text-border; padding: $input-email-text-padding; } - &[type='text'] { + &[type='text'], + &[type='search'] { &:focus, &:hover { @include outline($outline-default-style, 2px, $input-border-focus); diff --git a/themes/finc/templates/record/cover.phtml b/themes/finc/templates/record/cover.phtml index ff34f1c1bd441e8f3c0a9abcc6390b4ffb0dc517..02ac33162dff60461292fa05f8a912f6f76c57eb 100644 --- a/themes/finc/templates/record/cover.phtml +++ b/themes/finc/templates/record/cover.phtml @@ -7,11 +7,12 @@ <?php $id = $driver->getUniqueID() ?> <?php $title = $this->transEsc($driver->getTitle()); ?> -<?php if ($id) { - $coverId = "cover-$id-" . time(); -} else { - $cover = false; -} +<?php + if ($id) { + $coverId = "cover-$id-" . floor(microtime(true) * 1000); + } else { + $cover = false; + } ?> <?php if ($cover): ?> <?php /* load cover directly... */ ?> diff --git a/themes/finc/templates/search/searchbox.phtml b/themes/finc/templates/search/searchbox.phtml index 8264e8b9af9bf711d4e35557556efe05d22309d4..322a9c679ab9ebb564b8813f912b49eaefb0acd8 100644 --- a/themes/finc/templates/search/searchbox.phtml +++ b/themes/finc/templates/search/searchbox.phtml @@ -82,7 +82,7 @@ <?php /* finc: keep "required", keep role="searchbox" */ ?> <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 ?>" - type="text" + type="search" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>" <?php if ($placeholder): ?>