| 1 | {@ include(common/header) @} |
| 2 | <h1 class="paragraph">プロフィールの編集({{ $e->username }})</h1> |
| 3 | {@ if ($error) @} |
| 4 | <p> |
| 5 | <div class="errormes"> |
| 6 | {{{ $error }}} |
| 7 | </div> |
| 8 | </p> |
| 9 | {@ endif @} |
| 10 | {@ if ($message) @} |
| 11 | <p class="paragraph">{{ $message }}</p> |
| 12 | {@ endif @} |
| 13 | |
| 14 | <form action="/profile/{{ $e->username }}/edit" method="POST" enctype="multipart/form-data"> |
| 15 | <input type="hidden" name="csrf_token" value="{{ $csrf }}" /> |
| 16 | <table> |
| 17 | <tbody> |
| 18 | <tr> |
| 19 | <td>アイコン:</td> |
| 20 | <td> |
| 21 | <img src="{{ $e->avatarUrl }}" alt="" style="max-width: 100px; max-height: 100px;" /><br /> |
| 22 | <input type="file" name="avatar" accept="image/png,image/jpeg,image/gif,image/webp" /><br /> |
| 23 | {@ if ($e->avatar !== '') @} |
| 24 | <label><input type="checkbox" name="removeAvatar" value="1" /> アイコンを削除する</label> |
| 25 | {@ endif @} |
| 26 | </td> |
| 27 | </tr> |
| 28 | <tr> |
| 29 | <td><label for="displayname">表示名:</label></td> |
| 30 | <td><input type="text" id="displayname" name="displayname" maxlength="50" value="{{ $e->displayname }}" /></td> |
| 31 | </tr> |
| 32 | <tr> |
| 33 | <td><label for="gender">性別:</label></td> |
| 34 | <td> |
| 35 | <select id="gender" name="gender"> |
| 36 | <option value="-1"{{{ $e->gender === -1 ? ' selected="selected"' : '' }}}>不明</option> |
| 37 | <option value="0"{{{ $e->gender === 0 ? ' selected="selected"' : '' }}}>男</option> |
| 38 | <option value="1"{{{ $e->gender === 1 ? ' selected="selected"' : '' }}}>女</option> |
| 39 | </select> |
| 40 | </td> |
| 41 | </tr> |
| 42 | <tr> |
| 43 | <td><label for="namecolor">名前のスタイル(CSS):</label></td> |
| 44 | <td> |
| 45 | <textarea id="namecolor" name="namecolor" rows="2" cols="50" maxlength="500" placeholder="例:color: #ea79d8; font-weight: bold;">{{ $e->namecolor ?? '' }}</textarea><br /> |
| 46 | <small>空なら性別の色。プレビュー:{{{ namecolor($e) }}}</small> |
| 47 | </td> |
| 48 | </tr> |
| 49 | <tr> |
| 50 | <td><label for="bio">自己紹介:</label></td> |
| 51 | <td><textarea id="bio" name="bio" rows="5" cols="50" maxlength="500">{{ $e->bio ?? '' }}</textarea></td> |
| 52 | </tr> |
| 53 | {@ if ($fediEnabled && $e->fedi) @} |
| 54 | <tr> |
| 55 | <td>Fediverse:</td> |
| 56 | <td><label><input type="checkbox" name="locked" value="1"{{{ $locked ? ' checked="checked"' : '' }}} /> フォローを承認制にする</label></td> |
| 57 | </tr> |
| 58 | {@ endif @} |
| 59 | {@ if ($e->isSelf) @} |
| 60 | <tr> |
| 61 | <td><label for="email">メールアドレス:</label></td> |
| 62 | <td> |
| 63 | <input type="email" id="email" name="email" value="{{ $e->email }}" /> |
| 64 | {@ if (isset($e->pendingEmail)) @} |
| 65 | <br /><small>「{{ $e->pendingEmail }}」の確認待ち</small> |
| 66 | {@ endif @} |
| 67 | </td> |
| 68 | </tr> |
| 69 | <tr> |
| 70 | <td><label for="newPassword">新しいパスワード:</label></td> |
| 71 | <td><input type="password" id="newPassword" name="newPassword" autocomplete="new-password" /></td> |
| 72 | </tr> |
| 73 | <tr> |
| 74 | <td><label for="newPasswordVerify">新しいパスワード(確認):</label></td> |
| 75 | <td><input type="password" id="newPasswordVerify" name="newPasswordVerify" autocomplete="new-password" /></td> |
| 76 | </tr> |
| 77 | <tr> |
| 78 | <td><label for="currentPassword">現在のパスワード:</label></td> |
| 79 | <td><input type="password" id="currentPassword" name="currentPassword" autocomplete="current-password" /><br /><small>メールアドレスかパスワードを変更する場合は必須</small></td> |
| 80 | </tr> |
| 81 | {@ endif @} |
| 82 | {@ if ($twoFactor && ($e->isSelf || $e->twoFactorOn)) @} |
| 83 | <tr> |
| 84 | <td>二段階認証:</td> |
| 85 | <td>{{ $e->twoFactorOn ? '有効' : '無効' }}(<a href="/profile/{{ $e->username }}/2fa">設定</a>)</td> |
| 86 | </tr> |
| 87 | {@ endif @} |
| 88 | {@ if ($e->isAdmin) @} |
| 89 | <tr> |
| 90 | <td>ロール(管理者):</td> |
| 91 | <td> |
| 92 | <input type="hidden" name="rolesForm" value="1" /> |
| 93 | {@ foreach ($roles as $bit => $label) @} |
| 94 | <label><input type="checkbox" name="roles[]" value="{{ $bit }}"{{{ ($e->role & $bit) || ($bit === \Roles::FEDIVERSE && $e->fedi) ? ' checked="checked"' : '' }}} /> {{ $label }}</label><br /> |
| 95 | {@ endforeach @} |
| 96 | <small>全部外すとBANになります。</small> |
| 97 | </td> |
| 98 | </tr> |
| 99 | {@ endif @} |
| 100 | <tr> |
| 101 | <td></td> |
| 102 | <td><button>保存</button> <a href="/profile/{{ $e->username }}">戻る</a></td> |
| 103 | </tr> |
| 104 | </tbody> |
| 105 | </table> |
| 106 | </form> |
| 107 | {@ include(common/footer) @} |