Skip to content

Commit

Permalink
Bug fixes (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss authored Aug 16, 2017
1 parent a03dbe1 commit 4324755
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ UNRELEASED CHANGES:

RELEASED VERSIONS:

v0.6.3 - 2017-08-16
-------------------

* Fix kids not being able to be removed
* Fix some CSRF potential vulnerabilities

v0.6.2 - 2017-08-16
-------------------

Expand Down
4 changes: 2 additions & 2 deletions app/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1015,11 +1015,11 @@ public function unsetOffspring(Contact $kid, $bilateral = false)
$offspring->delete();

if ($bilateral) {
$offspring = Offspring::where('contact_id', $this->id)
$progenitor = Progenitor::where('contact_id', $this->id)
->where('is_the_parent_of', $kid->id)
->first();

$offspring->delete();
$progenitor->delete();
}
}

Expand Down
2 changes: 1 addition & 1 deletion config/monica.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@
| bad things will happen.
|
*/
'app_version' => '0.6.2',
'app_version' => '0.6.3',
];
1 change: 1 addition & 0 deletions resources/lang/cz/people.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
'kids_update_success' => 'Dítě bylo úspěšně aktualizován',
'kids_delete_success' => 'Dítě bylo úspěšně smazáno',
'kids_add_birthday_reminder' => 'Popřát k narozeninám :name, dítě od :contact_firstname',
'kids_unlink_confirmation' => 'Are you sure you want to delete this relationship? This kid will not be deleted - only the relationship between the two.',

// tasks
'tasks_desc' => 'Udržovat přehled o detailech pro :name',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/de/people.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'kids_update_success' => 'Das Kind wurde erfolgreich aktualisiert',
'kids_delete_success' => 'Das Kind wurde erfolgreich gelöscht',
'kids_add_birthday_reminder' => 'Gratuliere :name zum Geburtstag, :contact_firstname\'s Kind',
'kids_unlink_confirmation' => 'Are you sure you want to delete this relationship? This kid will not be deleted - only the relationship between the two.',

// tasks
'tasks_desc' => 'Behalte Aufgaben für :name im Auge',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en/people.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
'kids_update_success' => 'The child has been updated successfully',
'kids_delete_success' => 'The child has been deleted successfully',
'kids_add_birthday_reminder' => 'Wish happy birthday to :name, :contact_firstname\'s child',
'kids_unlink_confirmation' => 'Are you sure you want to delete this relationship? This kid will not be deleted - only the relationship between the two.',

// tasks
'tasks_desc' => 'Keep tracks of things you need to do for :name',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/fr/people.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
'kids_update_success' => 'L\'enfant a été mis à jour avec succès.',
'kids_delete_success' => 'L\'enfant a été supprimé avec succès.',
'kids_add_birthday_reminder' => 'Souhaiter bon anniversaire à :name, enfant de :contact_firstname.',
'kids_unlink_confirmation' => 'Are you sure you want to delete this relationship? This kid will not be deleted - only the relationship between the two.',

// tasks
'tasks_desc' => 'Gardez une trace des choses à faire pour :name.',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/it/people.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'kids_update_success' => 'Figlio modificato',
'kids_delete_success' => 'Figlio rimosso',
'kids_add_birthday_reminder' => 'Fai gli auguri di buon compleanno a :name, figlio di :contact_firstname',
'kids_unlink_confirmation' => 'Are you sure you want to delete this relationship? This kid will not be deleted - only the relationship between the two.',

// tasks
'tasks_desc' => 'Tieni traccia delle cose che devi fare per :name',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/pt-br/people.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
'kids_update_success' => 'A criança foi atualizada com sucesso',
'kids_delete_success' => 'A criança foi excluída com sucesso',
'kids_add_birthday_reminder' => 'Deseje um feliz aniversário para :name, pessoa importante de :contact_firstname',
'kids_unlink_confirmation' => 'Are you sure you want to delete this relationship? This kid will not be deleted - only the relationship between the two.',

// tasks
'tasks_desc' => 'Mantenha na linhas as coisas que você precisa para :name',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/ru/people.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
'kids_update_success' => 'Запись о ребёнке была успешно обновлена!',
'kids_delete_success' => 'Запись о ребёнке была удалена!',
'kids_add_birthday_reminder' => 'Поздравьте с днём рождения :name, ребёнка :contact_firstname',
'kids_unlink_confirmation' => 'Are you sure you want to delete this relationship? This kid will not be deleted - only the relationship between the two.',

// tasks
'tasks_desc' => 'Управляйте Задачами связанными с :name',
Expand Down
2 changes: 1 addition & 1 deletion resources/views/people/dashboard/kids/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
({{ $kid->getAge() }})
@endif

<a href="#" class="action-link" onclick="if (confirm('{{ trans('people.kids_delete_confirmation') }}')) { $(this).closest('li').find('.entry-delete-form').submit(); } return false;">Remove</a>
<a href="#" class="action-link" onclick="if (confirm('{{ trans('people.kids_unlink_confirmation') }}')) { $(this).closest('li').find('.entry-delete-form').submit(); } return false;">Remove</a>

<form method="POST" action="{{ action('People\\KidsController@unlink', compact('contact', 'kid')) }}" class="entry-delete-form hidden">
{{ csrf_field() }}
Expand Down

0 comments on commit 4324755

Please sign in to comment.