better handling of bad personal-note-coordinate input; updates #169
This commit is contained in:
parent
1df52c4914
commit
1321fe6566
@ -58,7 +58,12 @@ class CacheNote_Presenter
|
||||
$this->request->validate(self::req_note, new Validator_AlwaysValid());
|
||||
|
||||
if ($this->includeCoordinate())
|
||||
return $coordinateValid = $this->coordinate->validate();
|
||||
{
|
||||
$this->coordinate->validate();
|
||||
// Removed false-return for invalid coordinate, so that at least the note will be saved.
|
||||
// validate() produces some formal valid coordinate.
|
||||
// -- following 25 May 2015
|
||||
}
|
||||
else
|
||||
$this->coordinate->init(0, 0);
|
||||
|
||||
|
@ -331,7 +331,7 @@
|
||||
|
||||
<!-- Personal Note -->
|
||||
{if $enableCacheNote}
|
||||
<div class="content2-container bg-blue02">
|
||||
<div class="content2-container bg-blue02" id="personal_note">
|
||||
<p class="content-title-noshade-size2">
|
||||
<img src="resource2/{$opt.template.style}/images/description/20x20-cache-note.png" style="align: left; margin-right: 10px;" alt="{t}Personal cache note{/t}" />
|
||||
{t}Personal cache note{/t}
|
||||
@ -537,5 +537,11 @@
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
{if $enableCacheNote && isset($coord_error)}
|
||||
<script type="text/javascript">
|
||||
document.getElementById('personal_note').scrollIntoView();
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<!-- End Logs -->
|
||||
{/if} {* not $show_logpics *}
|
||||
|
Loading…
x
Reference in New Issue
Block a user