Skip to content

Commit

Permalink
Merge pull request #55 from MetOffice/bugfix/html-validation
Browse files Browse the repository at this point in the history
HTML validation errors, http to https
  • Loading branch information
mike-gormley authored Jun 22, 2022
2 parents 13a8589 + df55435 commit 7a0ccb5
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 35 deletions.
2 changes: 1 addition & 1 deletion ldregistry/templates/change-password.vm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#if($subject.isAuthenticated())
<h2>$msg['user.password.change.heading']</h2>
<div class="row">
<form class="form-horizontal form-validated" role="form" action="$root/system/security/setpassword" method="post">
<form class="form-horizontal form-validated" action="$root/system/security/setpassword" method="post">
<div class="form-group">
<label for="currentPassword" class="col-md-offset-1 col-md-4 control-label">$msg['user.password.current']</label>
<div class="col-md-6">
Expand Down
4 changes: 2 additions & 2 deletions ldregistry/templates/login.vm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</div>
#if(!$registry.configExtensions.suppressPasswordLogin)
<div class="row">
<form class="form-horizontal" role="form" action="$lroot/system/security/pwlogin" method="post">
<form class="form-horizontal" action="$lroot/system/security/pwlogin" method="post">
<div class="form-group">
<label for="userid1" class="col-md-offset-1 col-md-2 control-label">$msg['user.username.label']</label>
<div class="col-md-8">
Expand Down Expand Up @@ -80,7 +80,7 @@
<h2>$msg['login.register.heading']</h2>
#if( ! $registry.configExtensions.suppressPasswordLogin)
<div class="row">
<form class="form-horizontal" role="form" action="$lroot/system/security/pwregister" method="post">
<form class="form-horizontal" action="$lroot/system/security/pwregister" method="post">
<div class="form-group">
<label for="userid2" class="col-md-offset-1 col-md-2 control-label">$user.username.label</label>
<div class="col-md-8">
Expand Down
10 changes: 5 additions & 5 deletions ldregistry/templates/macros.vm
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@
<tbody>
#foreach($v in $reg.sortLanguages($values, $language))
<tr>
<td align="right">
<td class="text-right">
<strong>$v.language</strong>
</td>
<td align="left" class="langValueColumn">
<td class="text-left langValueColumn">
#render($v)
</td>
</tr>
Expand All @@ -160,7 +160,7 @@
<tbody>
#foreach($pv in $res.listProperties())
<tr>
<td class="align-right span2"> <strong title="$pv.getProp().uRI">$pv.getProp().name</strong> </td>
<td class="text-right span2"> <strong title="$pv.getProp().uRI">$pv.getProp().name</strong> </td>
<td>
#if($pv.isMultilingual())
#langtable($pv.getValues())
Expand Down Expand Up @@ -274,7 +274,7 @@
<div class="input-group space-above">
<input type="hidden" name="provider" value="$provider.name" />
<input type="hidden" name="return" value="$return" />
<input type="submit" value="$msg.get('login.oauth.provider.login', $provider.label)" class="btn btn-primary" type="button" />
<input type="submit" value="$msg.get('login.oauth.provider.login', $provider.label)" class="btn btn-primary" />
</div><!-- /input-group -->
</form>
#end
Expand All @@ -284,7 +284,7 @@
<div class="input-group space-above">
<input type="hidden" name="provider" value="$provider.name" />
<input type="hidden" name="return" value="$return" />
<input type="submit" value="$msg.get('login.oauth.provider.register', $provider.label)" class="btn btn-primary" type="button" />
<input type="submit" value="$msg.get('login.oauth.provider.register', $provider.label)" class="btn btn-primary" />
</div>
</form>
#end
8 changes: 4 additions & 4 deletions ldregistry/templates/main/_item-render.vm
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
#set( $isAdministrator = $lib.reg.isPermitted("Grant", $uri) )

<div class="row">
<div class="col-md-10">
<div class="col">
#parse( "main/_breadcrumbs.vm" )
</div>
</div>

<div class="row">
<div id="description" class="col-md-10">
<h2>#if($register)$msg.get('register.heading', $entity.name) #{else}$msg.get('registerItem.heading', $entity.name) #end #if($versionNumber)- $msg.get('registerItem.version.heading', $versionNumber)#end</h2>
<p> <strong>URI:</strong> <span title="$entity.uRI" id="forItemURI">$entity.uRI</span> &nbsp;&nbsp;<a href="#" onkeydown="copyToClipboardKeydown(event, 'forItemURI', 'copyButtonID_forItemURI')" onfocus="copyToClipboardFocus('copyButtonID_forItemURI')" onblur="copyToClipboardBlur('copyButtonID_forItemURI')"><span title="Copy URI to clipboard" id="copyButtonID_forItemURI" onclick="copyToClipboard('forItemURI', 'copyButtonID_forItemURI')">&nbsp;</span></a></p>
<div class="col-md-offset-0 col-md-1" style="margin-right: 2%">
<div class="col" style="margin: 0 10px 10px 0">
#showstatus( $item.getPropertyValue("reg:status") )
</div>
<p> #description($entity, "<p><em>$msg['resource.description.notFound']</em></p>") </p>
<p><strong>URI:</strong> <span title="$entity.uRI" id="forItemURI">$entity.uRI</span> &nbsp;&nbsp;<a href="#" onkeydown="copyToClipboardKeydown(event, 'forItemURI', 'copyButtonID_forItemURI')" onfocus="copyToClipboardFocus('copyButtonID_forItemURI')" onblur="copyToClipboardBlur('copyButtonID_forItemURI')"><span title="Copy URI to clipboard" id="copyButtonID_forItemURI" onclick="copyToClipboard('forItemURI', 'copyButtonID_forItemURI')">&nbsp;</span></a></p>
<p> #description($entity, "<em>$msg['resource.description.notFound']</em>") </p>
</div>
<div id="metadata-pane" class="col-md-5 hide">
<div class="tab-content" id="metadata-content">
Expand Down
7 changes: 1 addition & 6 deletions ldregistry/templates/main/_md-panel-downloads.vm
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
## Render the table of download options for an item
#set($href = "#if($versionNumber)#linkhref($item):$versionNumber#else#linkhref($entity)#end")
<h3 class="text-center">Download formats available</h3>
<table class="table table-condensed">
<tbody>

#set($href = "#if($versionNumber)#linkhrefInt($item):$versionNumber#else#linkhrefInt($entity)#end")
<h3 class="text-center">$msg['registerItem.download.format.heading']</h3>
<table class="table table-condensed">
Expand Down Expand Up @@ -48,5 +44,4 @@
</tr>
#end
</tbody>
</table>

</table>
2 changes: 1 addition & 1 deletion ldregistry/templates/nav/_navbar.vm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#end
#set( $absoluteRoot = "$scheme://$request.serverName" )

<nav class='navbar o-navbar-reg navbar-static-top' role='navigation'>
<nav class='navbar o-navbar-reg navbar-static-top'>
<div class='container'>
<div class='row'>
<div class='col-sm-3'>
Expand Down
2 changes: 1 addition & 1 deletion ldregistry/templates/reset-password.vm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="col-md-offset-2 col-md-8 blob-password">
<div class="blob-inner">
<div class="row">
<form class="form-horizontal form-validated" role="form" action="$root/system/security/resetpassword" method="post" autocomplete="off">
<form class="form-horizontal form-validated" action="$root/system/security/resetpassword" method="post" autocomplete="off">
<input type="hidden" id="userid2" name="userid" value="$userid">
<div class="form-group">
<label for="password1" class="col-md-offset-1 col-md-4 control-label">$msg['user.password.label']</label>
Expand Down
8 changes: 4 additions & 4 deletions ldregistry/templates/sparql-form.vm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div id="query-edit-cm" class=""></div>
</div>
<div class="query-chrome">
<form class="form-inline" role="form">
<form class="form-inline">

<div class="form-group">
<label for="sparqlEndpoint">$msg['sparql.endpoint.label']</label>
Expand All @@ -42,7 +42,7 @@
<a data-toggle="dropdown" class="btn btn-custom2 display-format" href="#" data-value="tsv" id="displayFormat">
<span>$msg['sparql.results.table.button']</span> <i class="icon-collapse"></i>
</a>
<ul class="dropdown-menu formats " role="menu" aria-labelledby="dropdownMenu2">
<ul class="dropdown-menu formats " role="menu" aria-labelledby="displayFormat">
<li role='presentation' class="" ><a data-value="tsv" role='menuitem' tabindex='-1' href='#'>$msg['sparql.results.format.table']</a></li>
<li role='presentation' class="" ><a data-value="text" role='menuitem' tabindex='-1' href='#'>$msg['sparql.results.format.plain']</a></li>
<li role='presentation' class="" ><a data-value="json" role='menuitem' tabindex='-1' href='#'>JSON</a></li>
Expand Down Expand Up @@ -90,10 +90,10 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">$msg['sparql.prefix.add']</h4>
<h4 id="myModalLabel" class="modal-title">$msg['sparql.prefix.add']</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<form class="form-horizontal">
<div class="form-group">
<label for="inputPrefix" class="col-lg-2 control-label">$msg['sparql.prefix.prefix']</label>
<div class="col-lg-10">
Expand Down
14 changes: 7 additions & 7 deletions ldregistry/templates/structure/_footer.vm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<h4>$msg['footer.about.heading']</h4>
<p>
Unless otherwise stated, all content is available under the
<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a>
<a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a>
</p>
<p class="c-footer-epimorphics">
<span class="i18n">$msg.get('footer.about.credit', "Epimorphics", "http://www.epimorphics.com")</span>
<span class="i18n">$msg.get('footer.about.credit', "Epimorphics", "https://www.epimorphics.com")</span>
</p>
#if($registry.languageManager.useCookies)
<p>
Expand All @@ -33,20 +33,20 @@
</div><!--/.row-->
</div>
</footer>
<script type="text/javascript">
<script>
window.registry = {
assets: "$lib.reg.jsEncode($assets)",
language: "$lib.reg.jsEncode($language)"
};
</script>

<script type="text/javascript" src="$assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="$assets/js/jquery.dataTables.min.js"></script>
<script src="$assets/js/bootstrap.min.js"></script>
<script src="$assets/js/jquery.dataTables.min.js"></script>
<script src="$assets/js/bootstrap-editable.min.js"></script>
<script type="text/javascript" src="$assets/js/ui.js"></script>
<script src="$assets/js/ui.js"></script>
#if($extraJS)
#foreach($file in $extraJS.split(","))
<script type="text/javascript" src="$assets/js/$file"></script>
<script src="$assets/js/$file"></script>
#end
#end
</body>
Expand Down
6 changes: 3 additions & 3 deletions ldregistry/templates/structure/_header.vm
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
#end
#end

<script type="text/javascript" src="$assets/js/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="$assets/js/jquery.form.js"></script>
<script type="text/javascript" src="$assets/js/copy-to-clipboard.js"></script>
<script src="$assets/js/jquery-3.6.0.min.js"></script>
<script src="$assets/js/jquery.form.js"></script>
<script src="$assets/js/copy-to-clipboard.js"></script>

<!-- Force all keyboard tabbed elements to have this outline style. -->
<style>
Expand Down
2 changes: 1 addition & 1 deletion ldregistry/templates/user-register.vm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h2>$msg['admin.users.details.heading']</h2>
#if( ! $registry.configExtensions.suppressPasswordLogin)
<div class="row">
<form class="form-horizontal form-validated" role="form" action="$root/system/security/pwregisterOther" method="post" autocomplete="off">
<form class="form-horizontal form-validated" action="$root/system/security/pwregisterOther" method="post" autocomplete="off">
<div class="form-group">
<label for="userid2" class="col-md-offset-1 col-md-2 control-label">$msg['user.username.label']</label>
<div class="col-md-8">
Expand Down

0 comments on commit 7a0ccb5

Please sign in to comment.