Skip to content
Permalink
Browse files

enforce confirmation when changing listing state to 'is ok'

  • Loading branch information...
following5 committed May 8, 2016
1 parent d1c2103 commit ab93e080a942ee02126dcbd19e8962ecfeeb3fc4
Showing with 12 additions and 4 deletions.
  1. +2 −0 htdocs/doc/sql/static-data/data.sql
  2. +5 −3 htdocs/log.php
  3. +5 −1 htdocs/templates2/ocstyle/log_cache.tpl
@@ -2856,6 +2856,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2568', 'New coo
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2569', 'moved by %1 meters', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2570', 'moved by %1 km', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2571', 'Protect old coordinates', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2596', 'Please confirm:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2597', 'Encrypt', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2598', 'Select <i>ok</i> if you have found or checked the cache and everything is ok.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2599', 'Select <i>up to date</i> if you have checked the complete description \&ndash; from the<br />container size to encoded hints and additoional wayoints \&ndash; and can confirm<br />that everything is up-to-date.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2569', 'DE', 'verlegt um %1 Meter', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2570', 'DE', 'verlegt um %1 km', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2571', 'DE', 'Altkoordinaten schützen', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2596', 'DE', 'Bitte bestätigen:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2597', 'DE', 'Verschlüsseln', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2598', 'DE', 'Wähle <i>ok</i>, wenn du den Cache gefunden oder kontrolliert hast und alles ok ist.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2599', 'DE', 'Wähle <i>in Ordnung</i>, wenn du die vollständige Beschreibung \&ndash; von der Behältergroße<br />bis zu verschlüsselten Hinweisen und zusätzlichen Wegpunkten \&ndash; geprüft hast,<br >und alles auf aktuellem Stand ist.', '2015-06-17 10:09:14');
@@ -111,8 +111,6 @@
if ($needsMaintenance != 1 && $needsMaintenance != 2) $needsMaintenance = 0;
if ($listingOutdated != 1 && $listingOutdated != 2) $listingOutdated = 0;
}
if ($listingOutdated == 1 && !$confirmListingOk)
$listingOutdated = 0;
// if not a found log, ignore the rating
$rateOption = ($logType == 1 || $logType == 7) + 0;
@@ -195,7 +193,11 @@
$validate['logPw'] = true;
if (isset($_POST['submitform']) && $cache->requireLogPW())
$validate['logPw'] = $cache->validateLogPW($logType, $_POST['log_pw']);
// check listing-ok-confirmation
if ($listingOutdated == 1 && !$confirmListingOk)
$validate['confirmListingOk'] = false;
// check for errors
$loggable = array_product($validate);
@@ -98,6 +98,7 @@ function logtype_changed()
var new_logtype = parseInt(document.editform.logtype.value);
var nm = document.getElementById('needs_maintenance');
var lo = document.getElementById('listing_outdated');
var confirm_Lo = document.getElementById('confirm_listing_ok');
if (((new_logtype == 2) != (old_logtype == 2)) ||
(dnf_by_logger && (new_logtype == 3) != (old_logtype == 3)))
@@ -121,6 +122,7 @@ function logtype_changed()
lo.value = (old_logtype == 10 ? "0" : "1");
lo.disabled = (new_logtype == 10);
lo.className = (new_logtype == 10 ? 'disabled' : '');
confirm_Lo.value = (new_logtype == 10 ? "1" : "0");
}
old_logtype = new_logtype;
@@ -267,7 +269,9 @@ function show_tip(text)
</tr>
<tr><td class="spacer" colspan="2" id="confirm_listing_ok_spacer" style="display:none"></td></tr>
<tr id="confirm_listing_ok_row" style="display:none">
<td></td>
<td style="vertical-align:top">
{if $validate.confirmListingOk===false}<span class="errormsg">{t}Please confirm:{/t}</span>{/if}
</td>
<td>
<input type="checkbox" id="confirm_listing_ok" name="confirm_listing_ok" value="1" class="checkbox" {if $ownerlog}checked{/if}/> <label for="confirm_listing_ok">{t 1=$cache_listing_outdated_log}The problems of the cache description as mentioned in the <a href="%1" target="_blank"><img src="resource2/ocstyle/images/log/16x16-listing-outdated.png" /> log entries</a> do no longer exist.{/t} {if $gcwp}{t}All information (coordinates, container size, difficulty, terrain, description text, encoded hints, additional waypoints) is at least up-to-date with{/t} <a href="http://www.geocaching.com/seek/cache_details.aspx?wp={$gcwp}" target="_blank">{$gcwp}</a>.{/if}
</td>

0 comments on commit ab93e08

Please sign in to comment.
You can’t perform that action at this time.