From db4ee05a5541ecfce7f6cb736070e9b860221514 Mon Sep 17 00:00:00 2001 From: Alexander Purr <purr@ub.uni-leipzig.de> Date: Fri, 12 Mar 2021 12:43:21 +0100 Subject: [PATCH] refs #19288 [fid_bbi] digitization-on-demand form * remove address * add policy and terms * add translation * comments field to textarea --- themes/fid_bbi/languages/fid/de.ini | 1 + themes/fid_bbi/languages/fid/en.ini | 3 ++ .../record/acquisition-address-details.phtml | 12 ------ .../fid/record/acquisition-digitization.phtml | 40 ++++++++++++++----- 4 files changed, 35 insertions(+), 21 deletions(-) diff --git a/themes/fid_bbi/languages/fid/de.ini b/themes/fid_bbi/languages/fid/de.ini index 8aeb8e14a77..1fdea9d06f8 100644 --- a/themes/fid_bbi/languages/fid/de.ini +++ b/themes/fid_bbi/languages/fid/de.ini @@ -14,3 +14,4 @@ permission_full_access = "Zugriff auf lizenzbewehrte Literatur, Direktlieferung label_college = "Hochschule oder andere affiliierte Institution" acquisition_fid_name = "FID BBI" +policy_terms_text = "Für dieses Formular gelten die bereits von Ihnen bestätigte %%policy%% und %%terms%%." \ No newline at end of file diff --git a/themes/fid_bbi/languages/fid/en.ini b/themes/fid_bbi/languages/fid/en.ini index dd6370c3911..e3e2cb8965a 100644 --- a/themes/fid_bbi/languages/fid/en.ini +++ b/themes/fid_bbi/languages/fid/en.ini @@ -10,3 +10,6 @@ permission_extended_access = "Access to FID-Licences" permission_full_access = "Access to licenced literature, patron driven aquisition & digitise-on-demand" label_college = "Affiliation" + +acquisition_fid_name = "FID BBI" +policy_terms_text = "For this form, the %%policy%% and %%terms%% that you have already confirmed apply." diff --git a/themes/fid_bbi/templates/fid/record/acquisition-address-details.phtml b/themes/fid_bbi/templates/fid/record/acquisition-address-details.phtml index caee99e60cb..7147d5392df 100644 --- a/themes/fid_bbi/templates/fid/record/acquisition-address-details.phtml +++ b/themes/fid_bbi/templates/fid/record/acquisition-address-details.phtml @@ -10,18 +10,6 @@ $address = $this->user->getDeliveryAddress(); <th><?= $this->translate("fid::acquisition_order_delivery_name") ?></th> <td><?= $this->user->getFirstname() ?> <?= $this->user->getLastname() ?></td> </tr> - <tr> - <th><?= $this->translate("fid::order_delivery_address") ?></th> - <td> - <?php if($user->deliveryAddressIsBusinessAddress() && !empty($college=$user->getCollege())): ?> - <?= $college ?><br> - <?php endif ?> - <?= $address->getLine1() ?><br> - <?= !empty($address->getLine2()) ? $address->getLine2() . '<br>' : '' ?> - <?= $address->getZip() ?> <?= $address->getCity() ?><br> - <?= $address->getCountry() ?> - </td> - </tr> <tr> <th><?= $this->translate("Email Address") ?></th> <td><?= $this->user->getUsername() ?></td> diff --git a/themes/fid_bbi/templates/fid/record/acquisition-digitization.phtml b/themes/fid_bbi/templates/fid/record/acquisition-digitization.phtml index 96b18ff52d5..0028c85797f 100644 --- a/themes/fid_bbi/templates/fid/record/acquisition-digitization.phtml +++ b/themes/fid_bbi/templates/fid/record/acquisition-digitization.phtml @@ -47,33 +47,55 @@ $form->setAttribute('class','fid-acquisition-form'); $elemFormat->setAttributes(['class' => 'form-control']); ?> - <? /* comments */ ?> - <?php - /** @var Element\Text $elemComment */ - $elemComment = $form->get('comment'); - $elemComment->setLabelAttributes(['class' => 'control-label']); - $elemComment->setAttributes(['class' => 'form-control']); - ?> - <div class="form-group"> <?= $this->formElementErrors($elemFormat) ?> <?= $this->formLabel($elemFormat) ?> <?= $this->formElement($elemFormat) ?> </div> +<? /* comments */ ?> +<?php +/** @var Element\Textarea $elemComment */ +$elemComment = $form->get('comment'); +$elemComment->setLabelAttributes(['class' => 'control-label']); +$elemComment->setAttributes(['class' => 'form-control']); +?> + <div class="form-group"> <?= $this->formElementErrors($elemComment) ?> <?= $this->formLabel($elemComment) ?> <?= $this->formElement($elemComment) ?> </div> +<?php // eula privacy policy ?> +<div class="form-group eula"> + <div> + <?php + $policy_link = '<a data-lightbox href="' + . $this->url('fid/user/policy') + . '">' + . $this->transEsc("fid::policy") + . '</a>'; + $terms_link = '<a data-lightbox href="' + . $this->url('fid/user/terms') + . '">' + . $this->transEsc("fid::terms") + . '</a>'; + ?> + <?=$this->translate("fid::policy_terms_text", [ + '%%policy%%' => $policy_link, + '%%terms%%' => $terms_link + ])?> + </div> +</div> + <? /* submit button */ ?> <?php /** @var Element\Submit $elemSubmit */ $elemSubmit = $form->get('submit'); $elemSubmit->setAttributes(['class' => 'btn btn-primary']); ?> - <div class="form-group right"> + <div class="form-group"> <?= $this->formElement($elemSubmit) ?> </div> -- GitLab