%title
Solve an Unknown Geocache

%introduction
Unknown Geocaches really come in two types:

ones that you need to solve "in the field"

ones that you need to solve ahead of time (puzzles)

This screen lets you either mark them as solvable "in the field" or
enter solved coordinates for puzzles.  You can also use this for
multi-caches you haven't finished solving yet.

%search
ident:%[Waypoint Identifier,GC]
%modify

%if %[Solve in the field,0,type=checkbox]
%print
Marking %[Waypoint Identifier] as solvable in the field
%modify
setattr:infield=1

%else

%if "%[Latitude,N38 44.]" ne "N38 44." || "%[Longitude,W121 42.]" ne "W121 42."
%print
Saving new coordinates for %[Waypoint Identifier]: %[Latitude], %[Longitude]
%modify
setattr:puzn=%[Latitude],puzw=%[Longitude]

%else
%print
Not modifying %[Waypoint Identifier] at all

%endif

%endif
%save

%if %[open spot maps.google.com,0,type=checkbox]
%print
Opening in firefox
%export
system:cmd=firefox http://maps.google.com/maps?f=q&hl=en&q=%{lat}%2c%{lon}
%endif
