diff --git a/app/Account.php b/app/Account.php index b4a5f2985b0..e6f02e6bc62 100644 --- a/app/Account.php +++ b/app/Account.php @@ -517,12 +517,11 @@ public function getRemindersForMonth(int $month) { $startOfMonth = \Carbon\Carbon::now()->addMonthsNoOverflow($month)->startOfMonth(); $endInThreeMonths = \Carbon\Carbon::now()->addMonthsNoOverflow($month)->endOfMonth(); - $reminders = auth()->user()->account->reminders() - ->whereBetween('next_expected_date', [$startOfMonth, $endInThreeMonths]) - ->orderBy('next_expected_date', 'asc') - ->get(); - return $reminders; + return auth()->user()->account->reminders() + ->whereBetween('next_expected_date', [$startOfMonth, $endInThreeMonths]) + ->orderBy('next_expected_date', 'asc') + ->get(); } /** diff --git a/app/Activity.php b/app/Activity.php index c856bc3d739..17902d17bde 100644 --- a/app/Activity.php +++ b/app/Activity.php @@ -160,7 +160,7 @@ public function getContactsForAPI() */ public function getInfoForJournalEntry() { - $data = [ + return [ 'type' => 'activity', 'id' => $this->id, 'activity_type' => (! is_null($this->type) ? $this->type->getTranslationKeyAsString() : null), @@ -173,7 +173,5 @@ public function getInfoForJournalEntry() 'year' => $this->date_it_happened->year, 'attendees' => $this->getContactsForAPI(), ]; - - return $data; } } diff --git a/app/Console/Commands/PingVersionServer.php b/app/Console/Commands/PingVersionServer.php index b486205754e..b5fec49fafb 100644 --- a/app/Console/Commands/PingVersionServer.php +++ b/app/Console/Commands/PingVersionServer.php @@ -40,7 +40,7 @@ public function __construct() */ public function handle() { - if (config('monica.check_version') == false) { + if (! config('monica.check_version')) { return false; } @@ -83,7 +83,7 @@ public function handle() } // make sure the JSON has all the fields we need - if (isset($json['latest_version']) == false or isset($json['new_version']) == false or isset($json['number_of_versions_since_user_version']) == false) { + if (! isset($json['latest_version']) || ! isset($json['new_version']) || ! isset($json['number_of_versions_since_user_version'])) { return; } diff --git a/app/Contact.php b/app/Contact.php index 78f39bedd9e..fb59ca9576b 100644 --- a/app/Contact.php +++ b/app/Contact.php @@ -993,7 +993,7 @@ public function getPotentialContacts() ->where('is_the_parent_of', $this->id) ->count(); - if ($relationship != 0 or $offspring != 0 or $progenitor != 0) { + if ($relationship != 0 || $offspring != 0 || $progenitor != 0) { $partners->forget($counter); } $counter++; @@ -1055,7 +1055,7 @@ public function getPartialOffsprings() */ public function setRelationshipWith(self $partner, $bilateral = false) { - $relationship = Relationship::create( + Relationship::create( [ 'account_id' => $this->account_id, 'contact_id' => $this->id, @@ -1065,7 +1065,7 @@ public function setRelationshipWith(self $partner, $bilateral = false) ); if ($bilateral) { - $relationship = Relationship::create( + Relationship::create( [ 'account_id' => $this->account_id, 'contact_id' => $partner->id, @@ -1084,7 +1084,7 @@ public function setRelationshipWith(self $partner, $bilateral = false) */ public function updateRelationshipWith(self $partner) { - $relationship = Relationship::create( + Relationship::create( [ 'account_id' => $this->account_id, 'contact_id' => $partner->id, @@ -1103,7 +1103,7 @@ public function updateRelationshipWith(self $partner) */ public function isTheOffspringOf(self $parent, $bilateral = false) { - $offspring = Offspring::create( + Offspring::create( [ 'account_id' => $this->account_id, 'contact_id' => $this->id, @@ -1112,7 +1112,7 @@ public function isTheOffspringOf(self $parent, $bilateral = false) ); if ($bilateral) { - $progenitor = Progenitor::create( + Progenitor::create( [ 'account_id' => $this->account_id, 'contact_id' => $parent->id, @@ -1175,15 +1175,15 @@ public function unsetOffspring(self $kid, $bilateral = false) */ public function deleteEventsAboutTheseTwoContacts(self $contact, $type) { - $events = Event::where('contact_id', $this->id) - ->where('object_id', $contact->id) - ->where('object_type', $type) - ->delete(); + Event::where('contact_id', $this->id) + ->where('object_id', $contact->id) + ->where('object_type', $type) + ->delete(); - $events = Event::where('contact_id', $contact->id) - ->where('object_id', $this->id) - ->where('object_type', $type) - ->delete(); + Event::where('contact_id', $contact->id) + ->where('object_id', $this->id) + ->where('object_type', $type) + ->delete(); } /** @@ -1222,9 +1222,7 @@ public function getFirstProgenitor() $offspring = Offspring::where('contact_id', $this->id) ->first(); - $progenitor = self::findOrFail($offspring->is_the_child_of); - - return $progenitor; + return self::findOrFail($offspring->is_the_child_of); } /** @@ -1236,9 +1234,7 @@ public function getFirstPartner() $relationship = Relationship::where('with_contact_id', $this->id) ->first(); - $relationship = self::findOrFail($relationship->contact_id); - - return $relationship; + return self::findOrFail($relationship->contact_id); } /** @@ -1247,14 +1243,7 @@ public function getFirstPartner() */ public function isOwedMoney() { - return $this - ->debts() - ->where('status', '=', 'inprogress') - ->getResults() - ->sum(function ($d) { - return $d->in_debt === 'yes' ? -$d->amount : $d->amount; - }) - > 0; + return $this->totalOutstandingDebtAmount() > 0; } /** @@ -1299,7 +1288,7 @@ public function getFamilyMembers() */ public function hasFirstMetInformation() { - return ! is_null($this->first_met_additional_info) or ! is_null($this->firstMetDate) or ! is_null($this->first_met_through_contact_id); + return ! is_null($this->first_met_additional_info) || ! is_null($this->firstMetDate) || ! is_null($this->first_met_through_contact_id); } /** diff --git a/app/Day.php b/app/Day.php index bf7ee9e57f9..3eaae204bde 100644 --- a/app/Day.php +++ b/app/Day.php @@ -65,7 +65,7 @@ public function getCommentAttribute($value) */ public function getInfoForJournalEntry() { - $data = [ + return [ 'type' => 'day', 'id' => $this->id, 'rate' => $this->rate, @@ -77,7 +77,5 @@ public function getInfoForJournalEntry() 'year' => $this->date->year, 'happens_today' => $this->date->isToday(), ]; - - return $data; } } diff --git a/app/Entry.php b/app/Entry.php index 09f132f8c7a..6728602c6ce 100644 --- a/app/Entry.php +++ b/app/Entry.php @@ -65,7 +65,7 @@ public function getPostAttribute($value) */ public function getInfoForJournalEntry() { - $data = [ + return [ 'type' => 'activity', 'id' => $this->id, 'title' => $this->title, @@ -76,7 +76,5 @@ public function getInfoForJournalEntry() 'month_name' => \App\Helpers\DateHelper::getShortMonth($this->created_at), 'year' => $this->created_at->year, ]; - - return $data; } } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 9e049005cb3..aee2e85ae21 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -33,10 +33,8 @@ class Handler extends ExceptionHandler */ public function report(Exception $e) { - if (config('monica.sentry_support') and config('app.env') == 'production') { - if ($this->shouldReport($e)) { - app('sentry')->captureException($e); - } + if (config('monica.sentry_support') && config('app.env') == 'production' && $this->shouldReport($e)) { + app('sentry')->captureException($e); } parent::report($e); } diff --git a/app/Helpers/DateHelper.php b/app/Helpers/DateHelper.php index 35f1638b14a..2c8fbc90927 100644 --- a/app/Helpers/DateHelper.php +++ b/app/Helpers/DateHelper.php @@ -17,9 +17,7 @@ class DateHelper */ public static function createDateFromFormat($date, $timezone) { - $date = Carbon::createFromFormat('Y-m-d H:i:s', $date, $timezone); - - return $date; + return Carbon::createFromFormat('Y-m-d H:i:s', $date, $timezone); } /** diff --git a/app/Helpers/InstanceHelper.php b/app/Helpers/InstanceHelper.php index d8fc7b91cb8..c4b071de9ba 100644 --- a/app/Helpers/InstanceHelper.php +++ b/app/Helpers/InstanceHelper.php @@ -13,9 +13,7 @@ class InstanceHelper */ public static function getNumberOfPaidSubscribers() { - $paidAccounts = Account::where('stripe_id', '!=', null)->count(); - - return $paidAccounts; + return Account::where('stripe_id', '!=', null)->count(); } /** @@ -30,14 +28,12 @@ public static function getPlanInformationFromConfig(String $timePeriod) return; } - $planInformation = [ + return [ 'type' => $timePeriod, 'name' => config('monica.paid_plan_'.$timePeriod.'_friendly_name'), 'id' => config('monica.paid_plan_'.$timePeriod.'_id'), 'price' => config('monica.paid_plan_'.$timePeriod.'_price'), 'friendlyPrice' => config('monica.paid_plan_'.$timePeriod.'_price') / 100, ]; - - return $planInformation; } } diff --git a/app/Http/Controllers/ActivitiesController.php b/app/Http/Controllers/ActivitiesController.php index 9c75fa20ab4..ad850697e11 100644 --- a/app/Http/Controllers/ActivitiesController.php +++ b/app/Http/Controllers/ActivitiesController.php @@ -66,7 +66,7 @@ public function store(ActivitiesRequest $request, Contact $contact) } // Log a journal entry - $journalEntry = (new JournalEntry)->add($activity); + (new JournalEntry)->add($activity); return redirect('/people/'.$contact->id) ->with('success', trans('people.activities_add_success')); diff --git a/app/Http/Controllers/Api/ApiActivityController.php b/app/Http/Controllers/Api/ApiActivityController.php index ea25dfba64b..8e5ee0012f5 100644 --- a/app/Http/Controllers/Api/ApiActivityController.php +++ b/app/Http/Controllers/Api/ApiActivityController.php @@ -94,7 +94,7 @@ public function store(Request $request) } // Log a journal entry - $journalEntry = (new JournalEntry)->add($activity); + (new JournalEntry)->add($activity); // Now we associate the activity with each one of the attendees $attendeesID = $request->get('contacts'); @@ -167,7 +167,7 @@ public function update(Request $request, $activityId) // Log a journal entry but need to delete the previous one first $activity->deleteJournalEntry(); - $journalEntry = (new JournalEntry)->add($activity); + (new JournalEntry)->add($activity); // Get the attendees $attendees = $request->get('contacts'); diff --git a/app/Http/Controllers/Api/ApiContactController.php b/app/Http/Controllers/Api/ApiContactController.php index cd30c46ff7f..3330fefe66e 100644 --- a/app/Http/Controllers/Api/ApiContactController.php +++ b/app/Http/Controllers/Api/ApiContactController.php @@ -153,16 +153,14 @@ public function store(Request $request) // in this case, we know the month and day, but not necessarily the year $date = \Carbon\Carbon::parse($request->get('birthdate')); - if ($request->get('birthdate_is_year_unknown') == true) { + if ($request->get('birthdate_is_year_unknown')) { $specialDate = $contact->setSpecialDate('birthdate', 0, $date->month, $date->day); } else { $specialDate = $contact->setSpecialDate('birthdate', $date->year, $date->month, $date->day); $newReminder = $specialDate->setReminder('year', 1, trans('people.people_add_birthday_reminder', ['name' => $contact->first_name])); } - } else { - if ($request->get('birthdate_is_age_based') == true) { - $specialDate = $contact->setSpecialDateFromAge('birthdate', $request->input('birthdate_age')); - } + } elseif ($request->get('birthdate_is_age_based')) { + $specialDate = $contact->setSpecialDateFromAge('birthdate', $request->input('birthdate_age')); } // first met date @@ -171,16 +169,14 @@ public function store(Request $request) // in this case, we know the month and day, but not necessarily the year $date = \Carbon\Carbon::parse($request->get('first_met_date')); - if ($request->get('first_met_date_is_year_unknown') == true) { + if ($request->get('first_met_date_is_year_unknown')) { $specialDate = $contact->setSpecialDate('first_met', 0, $date->month, $date->day); } else { $specialDate = $contact->setSpecialDate('first_met', $date->year, $date->month, $date->day); $newReminder = $specialDate->setReminder('year', 1, trans('people.people_add_birthday_reminder', ['name' => $contact->first_name])); } - } else { - if ($request->get('first_met_date_is_age_based') == true) { - $specialDate = $contact->setSpecialDateFromAge('first_met', $request->input('first_met_date_age')); - } + } elseif ($request->get('first_met_date_is_age_based')) { + $specialDate = $contact->setSpecialDateFromAge('first_met', $request->input('first_met_date_age')); } // deceased date @@ -189,16 +185,14 @@ public function store(Request $request) // in this case, we know the month and day, but not necessarily the year $date = \Carbon\Carbon::parse($request->get('deceased_date')); - if ($request->get('deceased_date_is_year_unknown') == true) { + if ($request->get('deceased_date_is_year_unknown')) { $specialDate = $contact->setSpecialDate('deceased_date', 0, $date->month, $date->day); } else { $specialDate = $contact->setSpecialDate('deceased_date', $date->year, $date->month, $date->day); $newReminder = $specialDate->setReminder('year', 1, trans('people.people_add_birthday_reminder', ['name' => $contact->first_name])); } - } else { - if ($request->get('deceased_date_is_age_based') == true) { - $specialDate = $contact->setSpecialDateFromAge('deceased_date', $request->input('deceased_date_age')); - } + } elseif ($request->get('deceased_date_is_age_based')) { + $specialDate = $contact->setSpecialDateFromAge('deceased_date', $request->input('deceased_date_age')); } $contact->setAvatarColor(); @@ -289,16 +283,14 @@ public function update(Request $request, $contactId) // in this case, we know the month and day, but not necessarily the year $date = \Carbon\Carbon::parse($request->get('birthdate')); - if ($request->get('birthdate_is_year_unknown') == true) { + if ($request->get('birthdate_is_year_unknown')) { $specialDate = $contact->setSpecialDate('birthdate', 0, $date->month, $date->day); } else { $specialDate = $contact->setSpecialDate('birthdate', $date->year, $date->month, $date->day); $newReminder = $specialDate->setReminder('year', 1, trans('people.people_add_birthday_reminder', ['name' => $contact->first_name])); } - } else { - if ($request->get('birthdate_is_age_based') == true) { - $specialDate = $contact->setSpecialDateFromAge('birthdate', $request->input('birthdate_age')); - } + } elseif ($request->get('birthdate_is_age_based')) { + $specialDate = $contact->setSpecialDateFromAge('birthdate', $request->input('birthdate_age')); } // first met date @@ -308,16 +300,14 @@ public function update(Request $request, $contactId) // in this case, we know the month and day, but not necessarily the year $date = \Carbon\Carbon::parse($request->get('first_met_date')); - if ($request->get('first_met_date_is_year_unknown') == true) { + if ($request->get('first_met_date_is_year_unknown')) { $specialDate = $contact->setSpecialDate('first_met', 0, $date->month, $date->day); } else { $specialDate = $contact->setSpecialDate('first_met', $date->year, $date->month, $date->day); $newReminder = $specialDate->setReminder('year', 1, trans('people.people_add_birthday_reminder', ['name' => $contact->first_name])); } - } else { - if ($request->get('first_met_date_is_age_based') == true) { - $specialDate = $contact->setSpecialDateFromAge('first_met', $request->input('first_met_date_age')); - } + } elseif ($request->get('first_met_date_is_age_based')) { + $specialDate = $contact->setSpecialDateFromAge('first_met', $request->input('first_met_date_age')); } // deceased date @@ -327,16 +317,14 @@ public function update(Request $request, $contactId) // in this case, we know the month and day, but not necessarily the year $date = \Carbon\Carbon::parse($request->get('deceased_date')); - if ($request->get('deceased_date_is_year_unknown') == true) { + if ($request->get('deceased_date_is_year_unknown')) { $specialDate = $contact->setSpecialDate('deceased_date', 0, $date->month, $date->day); } else { $specialDate = $contact->setSpecialDate('deceased_date', $date->year, $date->month, $date->day); $newReminder = $specialDate->setReminder('year', 1, trans('people.people_add_birthday_reminder', ['name' => $contact->first_name])); } - } else { - if ($request->get('deceased_date_is_age_based') == true) { - $specialDate = $contact->setSpecialDateFromAge('deceased_date', $request->input('deceased_date_age')); - } + } elseif ($request->get('deceased_date_is_age_based')) { + $specialDate = $contact->setSpecialDateFromAge('deceased_date', $request->input('deceased_date_age')); } $contact->logEvent('contact', $contact->id, 'update'); @@ -373,7 +361,7 @@ public function destroy(Request $request, $id) } } - if ($contactIdRowExists == true) { + if ($contactIdRowExists) { DB::table($tableName)->where('contact_id', $contact->id)->delete(); } } diff --git a/app/Http/Controllers/Api/ApiController.php b/app/Http/Controllers/Api/ApiController.php index 3f078ac4aca..90a82da80a2 100644 --- a/app/Http/Controllers/Api/ApiController.php +++ b/app/Http/Controllers/Api/ApiController.php @@ -36,7 +36,7 @@ class ApiController extends Controller public function __construct() { $this->middleware(function ($request, $next) { - $apiUsage = (new ApiUsage)->log($request); + (new ApiUsage)->log($request); if ($request->has('sort')) { $this->setSortCriteria($request->get('sort')); @@ -61,12 +61,11 @@ public function __construct() // make sure the JSON is well formatted if the given call sends a JSON // TODO: there is probably a much better way to do that - if ($request->method() != 'GET' and $request->method() != 'DELETE') { - if (is_null(json_decode($request->getContent()))) { - return $this->setHTTPStatusCode(400) - ->setErrorCode(37) - ->respondWithError(config('api.error_codes.37')); - } + if ($request->method() != 'GET' && $request->method() != 'DELETE' + && is_null(json_decode($request->getContent()))) { + return $this->setHTTPStatusCode(400) + ->setErrorCode(37) + ->respondWithError(config('api.error_codes.37')); } return $next($request); diff --git a/app/Http/Controllers/Contacts/PetsController.php b/app/Http/Controllers/Contacts/PetsController.php index 4b4e4531951..02fddb11dfc 100644 --- a/app/Http/Controllers/Contacts/PetsController.php +++ b/app/Http/Controllers/Contacts/PetsController.php @@ -69,7 +69,7 @@ public function store(PetsRequest $request, Contact $contact) ] ); - return $data = [ + return [ 'id' => $pet->id, 'name' => $pet->name, 'pet_category_id' => $pet->pet_category_id, @@ -93,7 +93,7 @@ public function update(PetsRequest $request, Contact $contact, Pet $pet) ] ); - return $data = [ + return [ 'id' => $pet->id, 'name' => $pet->name, 'pet_category_id' => $pet->pet_category_id, diff --git a/app/Http/Controllers/ContactsController.php b/app/Http/Controllers/ContactsController.php index be317f8cd37..9ba9941c2ec 100644 --- a/app/Http/Controllers/ContactsController.php +++ b/app/Http/Controllers/ContactsController.php @@ -240,7 +240,7 @@ public function update(Request $request, Contact $contact) ->withErrors($validator); } - if ($contact->setName($request->input('firstname'), null, $request->input('lastname')) == false) { + if (! $contact->setName($request->input('firstname'), null, $request->input('lastname'))) { return back() ->withInput() ->withErrors('There has been a problem with saving the name.'); diff --git a/app/Http/Controllers/JournalController.php b/app/Http/Controllers/JournalController.php index 1d0d454c964..7624155a7c5 100644 --- a/app/Http/Controllers/JournalController.php +++ b/app/Http/Controllers/JournalController.php @@ -57,7 +57,7 @@ public function list() // I need the pagination items when I send back the array. // There is probably a simpler way to achieve this. - $jsonToSendBack = [ + return [ 'total' => $journalEntries->total(), 'per_page' => $journalEntries->perPage(), 'current_page' => $journalEntries->currentPage(), @@ -65,8 +65,6 @@ public function list() 'prev_page_url' => $journalEntries->previousPageUrl(), 'data' => $entries, ]; - - return $jsonToSendBack; } /** @@ -76,9 +74,7 @@ public function list() */ public function get(JournalEntry $journalEntry) { - $object = $journalEntry->getObjectData(); - - return $object; + return $journalEntry->getObjectData(); } /** @@ -94,7 +90,7 @@ public function storeDay(DaysRequest $request) // Log a journal entry $journalEntry = (new JournalEntry)->add($day); - $data = [ + return [ 'id' => $journalEntry->id, 'date' => $journalEntry->date, 'journalable_id' => $journalEntry->journalable_id, @@ -102,8 +98,6 @@ public function storeDay(DaysRequest $request) 'object' => $journalEntry->getObjectData(), 'show_calendar' => true, ]; - - return $data; } /** @@ -169,7 +163,7 @@ public function save(Request $request) $entry->save(); // Log a journal entry - $journalEntry = (new JournalEntry)->add($entry); + (new JournalEntry)->add($entry); return redirect()->route('journal.index'); } diff --git a/app/Http/Controllers/Settings/PersonalizationController.php b/app/Http/Controllers/Settings/PersonalizationController.php index a96df7d0b41..610afe4d7ea 100644 --- a/app/Http/Controllers/Settings/PersonalizationController.php +++ b/app/Http/Controllers/Settings/PersonalizationController.php @@ -40,7 +40,7 @@ public function storeContactFieldType(Request $request) 'protocol' => 'max:255|nullable', ])->validate(); - $contactFieldType = auth()->user()->account->contactFieldTypes()->create( + return auth()->user()->account->contactFieldTypes()->create( $request->only([ 'name', 'protocol', @@ -50,8 +50,6 @@ public function storeContactFieldType(Request $request) 'account_id' => auth()->user()->account->id, ] ); - - return $contactFieldType; } /** @@ -111,7 +109,7 @@ public function destroyContactFieldType(Request $request, $contactFieldTypeId) ]); } - if ($contactFieldType->delible == false) { + if (! $contactFieldType->delible) { return response()->json([ 'errors' => [ 'message' => trans('app.error_unauthorized'), diff --git a/app/Jobs/ExportAccountAsSQL.php b/app/Jobs/ExportAccountAsSQL.php index 1663bbdf98b..a09efbb970d 100644 --- a/app/Jobs/ExportAccountAsSQL.php +++ b/app/Jobs/ExportAccountAsSQL.php @@ -109,11 +109,9 @@ public function handle() // Looping over the values foreach ($data as $columnName => $value) { - if ($columnName == 'account_id') { - if ($value !== $account->id) { - $skipLine = true; - break; - } + if ($columnName == 'account_id' && $value !== $account->id) { + $skipLine = true; + break; } if (is_null($value)) { @@ -125,7 +123,7 @@ public function handle() array_push($tableValues, $value); } - if ($skipLine == false) { + if (! $skipLine) { $newSQLLine .= implode(',', $tableValues).');'.PHP_EOL; $sql .= $newSQLLine; } diff --git a/app/Jobs/ResizeAvatars.php b/app/Jobs/ResizeAvatars.php index d5967d547ec..3397e2db535 100644 --- a/app/Jobs/ResizeAvatars.php +++ b/app/Jobs/ResizeAvatars.php @@ -34,7 +34,7 @@ public function __construct(Contact $contact) */ public function handle() { - if ($this->contact->has_avatar == true) { + if ($this->contact->has_avatar) { try { $avatar_file = Storage::disk($this->contact->avatar_location)->get($this->contact->avatar_file_name); $avatar_path = Storage::disk($this->contact->avatar_location)->url($this->contact->avatar_file_name); diff --git a/app/SpecialDate.php b/app/SpecialDate.php index 1775b8a522d..59e1a4e30a3 100644 --- a/app/SpecialDate.php +++ b/app/SpecialDate.php @@ -164,7 +164,7 @@ public function getAge() return; } - if ($this->is_year_unknown == true) { + if ($this->is_year_unknown) { return; } diff --git a/resources/assets/js/contacts.js b/resources/assets/js/contacts.js index 6c19948e575..20b6cf59c57 100644 --- a/resources/assets/js/contacts.js +++ b/resources/assets/js/contacts.js @@ -36,8 +36,7 @@ $('a[href^="#logCallModal"]').click(function(e) { $('#markPersonDeceased').click(function() { $('#datePersonDeceased').toggle(this.checked); - if(document.getElementById('markPersonDeceased').checked) { - } else { + if(! document.getElementById('markPersonDeceased').checked) { $('#checkboxDatePersonDeceased').prop('checked', false); $('#addReminderDeceased').prop('checked', false); $('#datesSelector').prop('checked', false);