]> BookStack Code Mirror - bookstack/blob - resources/views/users/api-tokens/edit.blade.php
API Tokens: Updated interfaces to return to correct location
[bookstack] / resources / views / users / api-tokens / edit.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4
5     <div class="container small pt-xl">
6
7         <main class="card content-wrap auto-height">
8             <h1 class="list-heading">{{ trans('settings.user_api_token') }}</h1>
9
10             <form action="{{ $token->getUrl() }}" method="post">
11                 {{ method_field('put') }}
12                 {{ csrf_field() }}
13
14                 <div class="setting-list">
15
16                     <div class="grid half gap-xl v-center">
17                         <div>
18                             <label class="setting-list-label">{{ trans('settings.user_api_token_id') }}</label>
19                             <p class="small">{{ trans('settings.user_api_token_id_desc') }}</p>
20                         </div>
21                         <div>
22                             @include('form.text', ['name' => 'token_id', 'readonly' => true])
23                         </div>
24                     </div>
25
26
27                     @if( $secret )
28                         <div class="grid half gap-xl v-center">
29                             <div>
30                                 <label class="setting-list-label">{{ trans('settings.user_api_token_secret') }}</label>
31                                 <p class="small text-warn">{{ trans('settings.user_api_token_secret_desc') }}</p>
32                             </div>
33                             <div>
34                                 <input type="text" readonly="readonly" value="{{ $secret }}">
35                             </div>
36                         </div>
37                     @endif
38
39                     @include('users.api-tokens.parts.form', ['model' => $token])
40                 </div>
41
42                 <div class="grid half gap-xl v-center">
43
44                     <div class="text-muted text-small">
45                         <span title="{{ $token->created_at }}">
46                             {{ trans('settings.user_api_token_created', ['timeAgo' => $token->created_at->diffForHumans()]) }}
47                         </span>
48                         <br>
49                         <span title="{{ $token->updated_at }}">
50                             {{ trans('settings.user_api_token_updated', ['timeAgo' => $token->created_at->diffForHumans()]) }}
51                         </span>
52                     </div>
53
54                     <div class="form-group text-right">
55                         <a href="{{  $back }}" class="button outline">{{ trans('common.back') }}</a>
56                         <a href="{{  $token->getUrl('/delete') }}" class="button outline">{{ trans('settings.user_api_token_delete') }}</a>
57                         <button class="button" type="submit">{{ trans('common.save') }}</button>
58                     </div>
59                 </div>
60
61             </form>
62
63         </main>
64     </div>
65
66 @stop