From 5a5ec7dbc486693178ebe5c8707fdd2eee100300 Mon Sep 17 00:00:00 2001
From: Claas Kazzer <kazzer@uni-leipzig.de>
Date: Thu, 28 Sep 2023 14:59:03 +0200
Subject: [PATCH] refs #22541 [finc] removes trailing slashes in cover file

* post w3c validator fixes
* removes redundant role= form in new password and set pin forms
---
 .../finc/templates/RecordDriver/DefaultRecord/cover.phtml   | 6 +++---
 themes/finc/templates/cart/contents.phtml                   | 2 +-
 themes/finc/templates/myresearch/edit.phtml                 | 2 +-
 themes/finc/templates/myresearch/newpassword.phtml          | 2 +-
 themes/finc/templates/myresearch/setpin.phtml               | 2 +-
 themes/finc/templates/record/save.phtml                     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/cover.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/cover.phtml
index 21d893f58b0..f7714d5a5d7 100644
--- a/themes/finc/templates/RecordDriver/DefaultRecord/cover.phtml
+++ b/themes/finc/templates/RecordDriver/DefaultRecord/cover.phtml
@@ -23,7 +23,7 @@
       aria-label="<?=$this->transEscAttr('Link-to')?> <?=$this->transEscAttr('Cover Image')?> <?=$this->transEscAttr('of')?> <?=$title?>"
     >
   <?php endif; ?>
-  <img alt="<?=$alt?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr(($cover)); ?>" />
+  <img alt="<?=$alt?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr(($cover)); ?>">
   <?php if ($this->link): ?>
     </a>
     <?php
@@ -34,7 +34,7 @@ JS;
   <?=$this->inlineScript(\Laminas\View\Helper\HeadScript::SCRIPT, $coverDetailScript, 'SET'); ?>
   <?php endif; ?>
 <?php elseif ($cover === false): ?>
-  <img src="<?=$this->url('cover-unavailable')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="nocover" alt="<?=$this->transEscAttr('No Cover Image')?>" aria-hidden="true" tabindex="-1" />
+  <img src="<?=$this->url('cover-unavailable')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="nocover" alt="<?=$this->transEscAttr('No Cover Image')?>" aria-hidden="true" tabindex="-1">
 <?php else: ?>
   <?php /* load cover by ajax */ ?>
   <div id="<?=$coverId?>" class="ajaxcover">
@@ -42,7 +42,7 @@ JS;
      <div class="cover-container">
         <?=$this->setIconText = false;?>
         <a class="coverlink hidden" href="javascript:" aria-hidden="true" tabindex="-1">
-          <img <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?> class="recordcover ajax" src="<?=$this->url('cover-unavailable')?>" alt="<?=$this->escapeHtmlAttr($alt); ?>" />
+          <img <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?> class="recordcover ajax" src="<?=$this->url('cover-unavailable')?>" alt="<?=$this->escapeHtmlAttr($alt); ?>">
           <?php
               $coverScript = <<<JS
               loadCoverByElement(
diff --git a/themes/finc/templates/cart/contents.phtml b/themes/finc/templates/cart/contents.phtml
index 7eb666ee295..9c08eb074bb 100644
--- a/themes/finc/templates/cart/contents.phtml
+++ b/themes/finc/templates/cart/contents.phtml
@@ -1,7 +1,7 @@
 <!-- finc: cart - contents -->
 <?php $records = $this->cart()->getRecordDetails();
 if (!empty($records)): ?>
-  <hr/>
+  <hr>
   <ul class="list-unstyled">
   <?php foreach ($records as $i => $record): ?>
     <li>
diff --git a/themes/finc/templates/myresearch/edit.phtml b/themes/finc/templates/myresearch/edit.phtml
index 4ad763f6e5f..01023cf62d8 100644
--- a/themes/finc/templates/myresearch/edit.phtml
+++ b/themes/finc/templates/myresearch/edit.phtml
@@ -49,7 +49,7 @@
     </div>
   <?php endif; ?>
   <?php if (count($this->lists) > 0): ?>
-    <hr/>
+    <hr>
     <div class="form-group">
       <select name="addToList" class="form-control">
         <option value="-1">- <?=$this->transEsc('Add to another list')?> -</option>
diff --git a/themes/finc/templates/myresearch/newpassword.phtml b/themes/finc/templates/myresearch/newpassword.phtml
index 334b80035ff..f383da468b0 100644
--- a/themes/finc/templates/myresearch/newpassword.phtml
+++ b/themes/finc/templates/myresearch/newpassword.phtml
@@ -23,7 +23,7 @@
 <?php elseif (!isset($this->hash)): ?>
   <div class="error"><?=$this->transEsc('recovery_user_not_found') ?></div>
 <?php else: ?>
-  <form id="newpassword" class="form-new-password" action="<?=$this->url('myresearch-newpassword') ?>" method="post" data-toggle="validator" role="form">
+  <form id="newpassword" class="form-new-password" action="<?=$this->url('myresearch-newpassword') ?>" method="post" data-toggle="validator">
     <input type="hidden" value="<?=$this->escapeHtmlAttr($this->auth()->getManager()->getCsrfHash())?>" name="csrf"/>
     <input type="hidden" value="<?=$this->escapeHtmlAttr($this->hash) ?>" name="hash"/>
     <input type="hidden" value="<?=$this->escapeHtmlAttr($this->username) ?>" name="username"/>
diff --git a/themes/finc/templates/myresearch/setpin.phtml b/themes/finc/templates/myresearch/setpin.phtml
index d3ec8d6401c..e280dc9d634 100644
--- a/themes/finc/templates/myresearch/setpin.phtml
+++ b/themes/finc/templates/myresearch/setpin.phtml
@@ -23,7 +23,7 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') .
     <?php elseif (!isset($this->hash)): ?>
       <div class="error"><?=$this->transEsc('recovery_user_not_found')?></div>
     <?php else: ?>
-      <form id="setpin" class="form-set-pin" action="<?=$this->url('myresearch-setpin')?>" method="post" data-toggle="validator" role="form">
+      <form id="setpin" class="form-set-pin" action="<?=$this->url('myresearch-setpin')?>" method="post" data-toggle="validator">
         <input type="hidden" value="<?=$this->escapeHtmlAttr($this->auth()->getManager()->getCsrfHash(true))?>" name="csrf"/>
         <input type="hidden" value="<?=$this->escapeHtmlAttr($this->hash)?>" name="hash"/>
         <input type="hidden" value="<?=$this->escapeHtmlAttr($this->username)?>" name="username"/>
diff --git a/themes/finc/templates/record/save.phtml b/themes/finc/templates/record/save.phtml
index a74f3371334..f75be9a5932 100644
--- a/themes/finc/templates/record/save.phtml
+++ b/themes/finc/templates/record/save.phtml
@@ -19,7 +19,7 @@
     <?php foreach ($this->containingLists as $i => $list): ?>
       <a href="<?=$this->url('userList', ['id' => $list['id']]) ?>" data-lightbox-ignore><?=$this->escapeHtml($list['title'])?></a><?php if($i < count($this->containingLists) - 1): ?>, <?php endif; ?>
     <?php endforeach; ?>
-    </p><hr/>
+    </p><hr>
   <?php endif; ?>
 
   <?php /* Only display the list drop-down if the user has lists that do not contain
-- 
GitLab