Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Serge D's suggestion for placing Latitude and Longitude fields …

…on the same line.
  • Loading branch information...
commit f50882c41f1791fa9d57f63e308308066652ac48 1 parent 9780584
rWatcher authored talmdal committed
Showing with 7 additions and 6 deletions.
  1. +7 −6 modules/exif_gps/helpers/exif_gps_event.php
View
13 modules/exif_gps/helpers/exif_gps_event.php
@@ -56,14 +56,15 @@ static function item_deleted($item) {
static function item_edit_form($item, $form) {
// Allow users to set / edit the GPS coordinates associated with the current item.
$record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find();
+ $gpsdata = $form->edit_item->group("gps_data")->label("GPS Data");
if ($record->loaded()) {
- $form->edit_item->input("latitude")->label(t("Latitude"))
+ $gpsdata->input("latitude")->label(t("Latitude"))
->value($record->latitude);
- $form->edit_item->input("longitude")->label(t("Longitude"))
+ $gpsdata->input("longitude")->label(t("Longitude"))
->value($record->longitude);
} else {
- $form->edit_item->input("latitude")->label(t("Latitude"));
- $form->edit_item->input("longitude")->label(t("Longitude"));
+ $gpsdata->input("latitude")->label(t("Latitude"));
+ $gpsdata->input("longitude")->label(t("Longitude"));
}
}
@@ -82,8 +83,8 @@ static function item_edit_form_completed($item, $form) {
if (!$record->loaded()) {
$record->item_id = $item->id;
}
- $record->latitude = $form->edit_item->latitude->value;
- $record->longitude = $form->edit_item->longitude->value;
+ $record->latitude = $form->edit_item->gps_data->latitude->value;
+ $record->longitude = $form->edit_item->gps_data->longitude->value;
$record->save();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.