1<?php use Fisharebest\Webtrees\I18N; ?> 2<?php use Fisharebest\Webtrees\View; ?> 3 4<h2 class="wt-page-title"> 5 <?= $title ?> 6</h2> 7 8<form class="wt-page-options wt-page-options-my-account" method="post"> 9 <?= csrf_field() ?> 10 <input type="hidden" name="ged" value="<?= e($tree->name()) ?>"> 11 12 <div class="row form-group"> 13 <label class="col-sm-3 col-form-label wt-page-options-label" for="user-name"> 14 <?= I18N::translate('Username') ?> 15 </label> 16 <div class="col-sm-9 wt-page-options-value"> 17 <input type="text" class="form-control" id="user-name" name="user_name" value="<?= e($user->userName()) ?>" dir="auto" aria-describedby="username-description" required> 18 <p class="small text-muted" id="username-description"> 19 <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> 20 </p> 21 </div> 22 </div> 23 24 <div class="row form-group"> 25 <label class="col-sm-3 col-form-label wt-page-options-label" for="real-name"> 26 <?= I18N::translate('Real name') ?> 27 </label> 28 <div class="col-sm-9 wt-page-options-value"> 29 <input type="text" class="form-control" id="real-name" name="real_name" value="<?= e($user->realName()) ?>" dir="auto" aria-describedby="real-name-description" required> 30 <p class="small text-muted" id="username-description"> 31 <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> 32 </p> 33 </div> 34 </div> 35 36 <div class="row form-group"> 37 <label class="col-sm-3 col-form-label wt-page-options-label" for="gedcom-id"> 38 <?= I18N::translate('Individual record') ?> 39 </label> 40 <div class="col-sm-9 wt-page-options-value"> 41 <select class="form-control" id="gedcom-id" aria-describedby="gedcom-id-description" disabled> 42 <?php if ($my_individual_record !== null) : ?> 43 <option value=""><?= $my_individual_record->fullName() ?></option> 44 <?php else : ?> 45 <option value=""><?= I18N::translateContext('unknown people', 'Unknown') ?></option> 46 <?php endif ?> 47 </select> 48 <p class="small text-muted" id="gedcom-id-description"> 49 <?= I18N::translate('This is a link to your own record in the family tree. If this is the wrong individual, contact an administrator.') ?> 50 </p> 51 </div> 52 </div> 53 54 <div class="row form-group"> 55 <label class="col-sm-3 col-form-label wt-page-options-label" for="root-id"> 56 <?= I18N::translate('Default individual') ?> 57 </label> 58 <div class="col-sm-9 wt-page-options-value"> 59 <?= view('components/select-individual', ['name' => 'root_id', 'id' => 'root-id', 'individual' => $default_individual, 'tree' => $tree]) ?> 60 <p class="small text-muted" id="root-id-description"> 61 <?= I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> 62 </p> 63 </div> 64 </div> 65 66 <div class="row form-group"> 67 <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> 68 <?= I18N::translate('Password') ?> 69 </label> 70 <div class="col-sm-9 wt-page-options-value"> 71 <input class="form-control" type="password" id="password" name="password" aria-describedby="password-description" autocomplete="new-password"> 72 <p class="small text-muted" id="password-description"> 73 <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> 74 <br> 75 <?= I18N::translate('Leave the password blank if you want to keep the current password.') ?> 76 </p> 77 </div> 78 </div> 79 80 <div class="row form-group"> 81 <label class="col-sm-3 col-form-label wt-page-options-label" for="language"> 82 <?= I18N::translate('Language') ?> 83 </label> 84 <div class="col-sm-9 wt-page-options-value"> 85 <?= view('components/select', ['name' => 'language', 'selected' => $user->getPreference('language'), 'options' => $installed_languages]) ?> 86 </div> 87 </div> 88 89 <div class="row form-group"> 90 <label class="col-sm-3 col-form-label wt-page-options-label" for="timezone"> 91 <?= I18N::translate('Time zone') ?> 92 </label> 93 <div class="col-sm-9 wt-page-options-value"> 94 <?= view('components/select', ['name' => 'timezone', 'selected' => $user->getPreference('TIMEZONE', 'UTC'), 'options' => $timezones]) ?> 95 <p class="small text-muted" id="timezone-description"> 96 <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> 97 </p> 98 </div> 99 </div> 100 101 <div class="row form-group"> 102 <label class="col-sm-3 col-form-label wt-page-options-label" for="email"> 103 <?= I18N::translate('Email address') ?> 104 </label> 105 <div class="col-sm-9 wt-page-options-value"> 106 <input class="form-control" type="email" id="email" name="email" value="<?= e($user->email()) ?>" aria-describedby="email-description"> 107 <p class="small text-muted" id="email-description"> 108 <?= 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.') ?> 109 </p> 110 </div> 111 </div> 112 113 <div class="row form-group"> 114 <label class="col-sm-3 col-form-label wt-page-options-label" for="contact-method"> 115 <?= I18N::translate('Contact method') ?> 116 </label> 117 <div class="col-sm-9 wt-page-options-value"> 118 <?= view('components/select', ['name' => 'contact_method', 'id' => 'contact-method', 'selected' => $user->getPreference('contactmethod'), 'options' => $contact_methods]) ?> 119 <p class="small text-muted" id="contact-method-description"> 120 <?= 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.') ?> 121 </p> 122 </div> 123 </div> 124 125 <fieldset class="form-group"> 126 <div class="row"> 127 <legend class="col-sm-3 col-form-label wt-page-options-label"> 128 <?= I18N::translate('Visible online') ?> 129 </legend> 130 <div class="col-sm-9 wt-page-options-value"> 131 <?= view('components/checkbox', ['label' => I18N::translate('Visible to other users when online'), 'name' => 'visible_online', 'checked' => (bool) $user->getPreference('visibleonline')]) ?> 132 <p class="small text-muted" id="visible-online-description"> 133 <?= I18N::translate('You can choose whether to appear in the list of users who are currently signed-in.') ?> 134 </p> 135 </div> 136 </div> 137 </fieldset> 138 139 <div class="row form-group"> 140 <div class="col-sm-3 wt-page-options-label"></div> 141 <div class="col-sm-9 wt-page-options-value"> 142 <input class="btn btn-primary" type="submit" value="<?= I18N::translate('save') ?>"> 143 </div> 144 </div> 145</form> 146 147<?php if ($show_delete_option) : ?> 148 <form action="<?= e(route('delete-account', ['ged' => $tree->name()])) ?>" method="post"> 149 <?= csrf_field() ?> 150 <div class="row form-group"> 151 <div class="col-sm-3 wt-page-options-label"></div> 152 <div class="col-sm-9 wt-page-options-value"> 153 <input class="btn btn-danger" type="submit" value="<?= I18N::translate('Delete your account') ?>" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($user->userName())) ?>" onclick="return confirm(this.dataset.confirm);"> 154 </div> 155 </div> 156 </form> 157<?php endif ?> 158 159<?php View::push('javascript') ?> 160<script> 161 $('#password').hideShowPassword('infer', true); 162</script> 163<?php View::endpush() ?> 164