master
ブランチ master
LittleBeast / view / admin / setup.maron
1.7 KB、21行 生 Blame 履歴
1{@ include(common/header) @}
2 <h1 class="paragraph">最初の管理者</h1>
3{@ if ($error) @}
4 <div class="errormes">{{ $error }}</div>
5{@ endif @}
6{@ if (!$hasCode) @}
7 <p class="paragraph">管理者のアカウントが有りません。最初の管理者を作るには、config/config.phpのADMIN_SETUP_CODEに長くて推測されにくいコードを設定して、このページを再読み込みして下さい。</p>
8 <pre class="admin-pre">define('ADMIN_SETUP_CODE', '(例:openssl rand -hex 16 の出力)');</pre>
9{@ else @}
10 <p class="paragraph">管理者のアカウントが有りません。config.phpのADMIN_SETUP_CODEと同じコードを入力して、最初の管理者を作って下さい。作った後はADMIN_SETUP_CODEを空にして下さい。</p>
11 <form method="post" action="/admin/setup" class="admin-form">
12 <input type="hidden" name="csrf_token" value="{{ $csrf }}" />
13 <label>セットアップのコード:<input type="password" name="code" autocomplete="off" required="required" /></label>
14 <label>ユーザー名(6文字以上の英数字):<input type="text" name="username" value="{{ $in['username'] }}" required="required" /></label>
15 <label>メールアドレス:<input type="email" name="email" value="{{ $in['email'] }}" required="required" /></label>
16 <label>パスワード:<input type="password" name="password" autocomplete="new-password" required="required" /></label>
17 <label>パスワード(確認):<input type="password" name="passwordVerify" autocomplete="new-password" required="required" /></label>
18 <button>管理者を作る</button>
19 </form>
20{@ endif @}
21{@ include(common/footer) @}