1a49d0e3fSGreg Roach<?php 2a49d0e3fSGreg Roach 31fe542e9SGreg Roachuse Fisharebest\Webtrees\Contracts\UserInterface; 4a49d0e3fSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AccountDelete; 5a49d0e3fSGreg Roachuse Fisharebest\Webtrees\I18N; 67c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual; 77c4add84SGreg Roachuse Fisharebest\Webtrees\Tree; 8a49d0e3fSGreg Roach 97c2c99faSGreg Roach/** 107c2c99faSGreg Roach * @var array<string,string> $contact_methods 117c2c99faSGreg Roach * @var Individual|null $default_individual 127c2c99faSGreg Roach * @var array<string,string> $languages 137c2c99faSGreg Roach * @var Individual|null $my_individual_record 147c2c99faSGreg Roach * @var bool $show_delete_option 157c2c99faSGreg Roach * @var array<string,string> $timezones 167c2c99faSGreg Roach * @var string $title 177c2c99faSGreg Roach * @var Tree|null $tree 187c2c99faSGreg Roach * @var UserInterface $user 197c2c99faSGreg Roach */ 207c2c99faSGreg Roach 21a49d0e3fSGreg Roach?> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach<h2 class="wt-page-title"> 24dd6b2bfcSGreg Roach <?= $title ?> 25dd6b2bfcSGreg Roach</h2> 26dd6b2bfcSGreg Roach 27a49d0e3fSGreg Roach<form method="post" class="wt-page-options wt-page-options-my-account"> 289e3c2cf9SGreg Roach <div class="row"> 29dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="user-name"> 30dd6b2bfcSGreg Roach <?= I18N::translate('Username') ?> 31dd6b2bfcSGreg Roach </label> 32dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 337dca5265SGreg Roach <input type="text" class="form-control" id="user-name" name="user_name" value="<?= e($user->userName()) ?>" dir="auto" aria-describedby="username-description" required="required"> 34315eb316SGreg Roach <div class="form-text" id="username-description"> 35dd6b2bfcSGreg Roach <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> 36315eb316SGreg Roach </div> 37dd6b2bfcSGreg Roach </div> 38dd6b2bfcSGreg Roach </div> 39dd6b2bfcSGreg Roach 409e3c2cf9SGreg Roach <div class="row"> 41dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="real-name"> 42dd6b2bfcSGreg Roach <?= I18N::translate('Real name') ?> 43dd6b2bfcSGreg Roach </label> 44dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 457dca5265SGreg Roach <input type="text" class="form-control" id="real-name" name="real_name" value="<?= e($user->realName()) ?>" dir="auto" aria-describedby="real-name-description" required="required"> 46315eb316SGreg Roach <div class="form-text" id="real-name-description"> 47dd6b2bfcSGreg Roach <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> 48315eb316SGreg Roach </div> 49dd6b2bfcSGreg Roach </div> 50dd6b2bfcSGreg Roach </div> 51dd6b2bfcSGreg Roach 52a49d0e3fSGreg Roach <?php if ($tree instanceof Tree) : ?> 539e3c2cf9SGreg Roach <div class="row"> 54dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="gedcom-id"> 55dd6b2bfcSGreg Roach <?= I18N::translate('Individual record') ?> 56dd6b2bfcSGreg Roach </label> 57dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 584b9213b3SGreg Roach <select class="form-select" id="gedcom-id" aria-describedby="gedcom-id-description" disabled> 59dd6b2bfcSGreg Roach <?php if ($my_individual_record !== null) : ?> 6039ca88baSGreg Roach <option value=""><?= $my_individual_record->fullName() ?></option> 61dd6b2bfcSGreg Roach <?php else : ?> 62dd6b2bfcSGreg Roach <option value=""><?= I18N::translateContext('unknown people', 'Unknown') ?></option> 63dd6b2bfcSGreg Roach <?php endif ?> 64dd6b2bfcSGreg Roach </select> 65315eb316SGreg Roach <div class="form-text" id="gedcom-id-description"> 66dd6b2bfcSGreg Roach <?= I18N::translate('This is a link to your own record in the family tree. If this is the wrong individual, contact an administrator.') ?> 67315eb316SGreg Roach </div> 68dd6b2bfcSGreg Roach </div> 69dd6b2bfcSGreg Roach </div> 70dd6b2bfcSGreg Roach 719e3c2cf9SGreg Roach <div class="row"> 727c4add84SGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="default-xref"> 73dd6b2bfcSGreg Roach <?= I18N::translate('Default individual') ?> 74dd6b2bfcSGreg Roach </label> 75dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 767c4add84SGreg Roach <?= view('components/select-individual', ['name' => 'default-xref', 'id' => 'default-xref', 'individual' => $default_individual, 'tree' => $tree]) ?> 77315eb316SGreg Roach <div class="form-text" id="default-xref-description"> 78dd6b2bfcSGreg Roach <?= I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> 79315eb316SGreg Roach </div> 80dd6b2bfcSGreg Roach </div> 81dd6b2bfcSGreg Roach </div> 82a49d0e3fSGreg Roach <?php endif ?> 83dd6b2bfcSGreg Roach 849e3c2cf9SGreg Roach <div class="row"> 85dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> 86dd6b2bfcSGreg Roach <?= I18N::translate('Password') ?> 87dd6b2bfcSGreg Roach </label> 88dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 89d4786c66SGreg Roach <input class="form-control" type="password" id="password" name="password" aria-describedby="password-description" autocomplete="new-password" data-wt-show-password-text="<?= e(I18N::translate('show')) ?>" data-wt-show-password-title="<?= e(I18N::translate('Show password')) ?>" data-wt-hide-password-text="<?= e(I18N::translate('hide')) ?>" data-wt-hide-password-title="<?= e(I18N::translate('Hide password')) ?>"> 90315eb316SGreg Roach <div class="form-text" id="password-description"> 9154bcf2f0SRico Sonntag <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> 92dd6b2bfcSGreg Roach <br> 93dd6b2bfcSGreg Roach <?= I18N::translate('Leave the password blank if you want to keep the current password.') ?> 94315eb316SGreg Roach </div> 95dd6b2bfcSGreg Roach </div> 96dd6b2bfcSGreg Roach </div> 97dd6b2bfcSGreg Roach 989e3c2cf9SGreg Roach <div class="row"> 99dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="language"> 100dd6b2bfcSGreg Roach <?= I18N::translate('Language') ?> 101dd6b2bfcSGreg Roach </label> 102dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 1031fe542e9SGreg Roach <?= view('components/select', ['name' => 'language', 'selected' => $user->getPreference(UserInterface::PREF_LANGUAGE), 'options' => $languages]) ?> 104dd6b2bfcSGreg Roach </div> 105dd6b2bfcSGreg Roach </div> 106dd6b2bfcSGreg Roach 1079e3c2cf9SGreg Roach <div class="row"> 108dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="timezone"> 109dd6b2bfcSGreg Roach <?= I18N::translate('Time zone') ?> 110dd6b2bfcSGreg Roach </label> 111dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 1121fe542e9SGreg Roach <?= view('components/select', ['name' => 'timezone', 'selected' => $user->getPreference(UserInterface::PREF_TIME_ZONE, 'UTC'), 'options' => $timezones]) ?> 113315eb316SGreg Roach <div class="form-text" id="timezone-description"> 114dd6b2bfcSGreg Roach <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> 115315eb316SGreg Roach </div> 116dd6b2bfcSGreg Roach </div> 117dd6b2bfcSGreg Roach </div> 118dd6b2bfcSGreg Roach 1199e3c2cf9SGreg Roach <div class="row"> 120dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="email"> 121dd6b2bfcSGreg Roach <?= I18N::translate('Email address') ?> 122dd6b2bfcSGreg Roach </label> 123dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 124e5a6b4d4SGreg Roach <input class="form-control" type="email" id="email" name="email" value="<?= e($user->email()) ?>" aria-describedby="email-description"> 125315eb316SGreg Roach <div class="form-text" id="email-description"> 126dd6b2bfcSGreg Roach <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> 127315eb316SGreg Roach </div> 128dd6b2bfcSGreg Roach </div> 129dd6b2bfcSGreg Roach </div> 130dd6b2bfcSGreg Roach 1319e3c2cf9SGreg Roach <div class="row"> 132dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="contact-method"> 133dd6b2bfcSGreg Roach <?= I18N::translate('Contact method') ?> 134dd6b2bfcSGreg Roach </label> 135dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 1361fe542e9SGreg Roach <?= view('components/select', ['name' => 'contact-method', 'id' => 'contact-method', 'selected' => $user->getPreference(UserInterface::PREF_CONTACT_METHOD), 'options' => $contact_methods]) ?> 137315eb316SGreg Roach <div class="form-text" id="contact-method-description"> 138dd6b2bfcSGreg Roach <?= I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.') ?> 139315eb316SGreg Roach </div> 140dd6b2bfcSGreg Roach </div> 141dd6b2bfcSGreg Roach </div> 142dd6b2bfcSGreg Roach 1439e3c2cf9SGreg Roach <fieldset class="row"> 144dd6b2bfcSGreg Roach <legend class="col-sm-3 col-form-label wt-page-options-label"> 145dd6b2bfcSGreg Roach <?= I18N::translate('Visible online') ?> 146dd6b2bfcSGreg Roach </legend> 147dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 1481fe542e9SGreg Roach <?= view('components/checkbox', ['label' => I18N::translate('Visible to other users when online'), 'name' => 'visible-online', 'checked' => (bool) $user->getPreference(UserInterface::PREF_IS_VISIBLE_ONLINE)]) ?> 149315eb316SGreg Roach <div class="form-text" id="visible-online-description"> 150dd6b2bfcSGreg Roach <?= I18N::translate('You can choose whether to appear in the list of users who are currently signed-in.') ?> 151dd6b2bfcSGreg Roach </div> 152dd6b2bfcSGreg Roach </div> 153dd6b2bfcSGreg Roach </fieldset> 154dd6b2bfcSGreg Roach 1559e3c2cf9SGreg Roach <div class="row mb-3"> 156dd6b2bfcSGreg Roach <div class="col-sm-3 wt-page-options-label"></div> 157dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 158a49d0e3fSGreg Roach <button type="submit" class="btn btn-primary"> 159a49d0e3fSGreg Roach <?= view('icons/save') ?> 160a49d0e3fSGreg Roach <?= I18N::translate('save') ?> 161a49d0e3fSGreg Roach </button> 162dd6b2bfcSGreg Roach </div> 163dd6b2bfcSGreg Roach </div> 164*81443e3cSGreg Roach 165*81443e3cSGreg Roach <?= csrf_field() ?> 166dd6b2bfcSGreg Roach</form> 167dd6b2bfcSGreg Roach 168dd6b2bfcSGreg Roach<?php if ($show_delete_option) : ?> 1699e3c2cf9SGreg Roach <div class="row mb-3"> 170dd6b2bfcSGreg Roach <div class="col-sm-3 wt-page-options-label"></div> 171dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 172d4786c66SGreg Roach <a href="#" class="btn btn-danger" data-wt-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($user->userName())) ?>" data-wt-post-url="<?= e(route(AccountDelete::class)) ?>"> 173a49d0e3fSGreg Roach <?= view('icons/delete') ?> 174a49d0e3fSGreg Roach <?= I18N::translate('Delete your account') ?> 175a49d0e3fSGreg Roach </a> 176dd6b2bfcSGreg Roach </div> 177dd6b2bfcSGreg Roach </div> 178dd6b2bfcSGreg Roach<?php endif ?> 179