Skip to content
Permalink
Browse files

fixes a bug in field-notes if you not uploaded any field notes and ha…

…ve not geocache logged before
  • Loading branch information...
mirsch committed Jul 3, 2016
1 parent 399a060 commit 9c25806851c6afb470f5545a69e42a7981502ee9
@@ -52,9 +52,11 @@
</div>

<div>
{{ form_widget(form.ignore) }}
{{ form_label(form.ignore) }}
{{ form_errors(form.ignore) }}
{% if form.ignore is defined %}
{{ form_widget(form.ignore) }}
{{ form_label(form.ignore) }}
{{ form_errors(form.ignore) }}
{% endif %}
</div>
<div>
<input type="submit" value="{{ 'field_notes.btn.upload' | trans }}" class="btn btn-default"/>
@@ -35,8 +35,13 @@ public function __construct(FieldNoteServiceInterface $fieldNoteService)
*/
public function getData($userId)
{
$date = $this->fieldNoteService->getLatestFieldNoteOrLogDate($userId);
if ($date !== null) {
$date = $date->format(DateUtil::DATE_FORMAT_MYSQL);
}
return [
UploadFieldNotesType::FIELD_IGNORE_DATE => $this->fieldNoteService->getLatestFieldNoteOrLogDate($userId)->format(DateUtil::DATE_FORMAT_MYSQL)
UploadFieldNotesType::FIELD_IGNORE_DATE => $date,
];
}
}

0 comments on commit 9c25806

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