akkoma-fe/src/components/mfa_form/recovery_form.vue

73 lines
1.7 KiB
Vue
Raw Normal View History

<template>
2019-07-05 07:17:44 +00:00
<div class="login panel panel-default">
<!-- Default panel contents -->
2019-07-05 07:17:44 +00:00
<div class="panel-heading">
{{ $t('login.heading.recovery') }}
</div>
2019-07-05 07:17:44 +00:00
<div class="panel-body">
<form
class="login-form"
@submit.prevent="submit"
>
<div class="form-group">
<label for="code">{{ $t('login.recovery_code') }}</label>
<input
id="code"
v-model="code"
class="form-control"
>
</div>
2019-07-05 07:17:44 +00:00
<div class="form-group">
<div class="login-bottom">
<div>
<button
class="button-unstyled -link"
type="button"
2021-02-25 12:32:21 +00:00
@click.prevent="requireTOTP"
2019-07-05 07:17:44 +00:00
>
{{ $t('login.enter_two_factor_code') }}
</button>
2019-07-05 07:17:44 +00:00
<br>
<button
class="button-unstyled -link"
type="button"
2021-02-25 12:32:21 +00:00
@click.prevent="abortMFA"
2019-07-05 07:17:44 +00:00
>
{{ $t('general.cancel') }}
</button>
2019-07-05 07:17:44 +00:00
</div>
<button
type="submit"
class="btn button-default"
2019-07-05 07:17:44 +00:00
>
{{ $t('general.verify') }}
</button>
</div>
</div>
2019-07-05 07:17:44 +00:00
</form>
</div>
2019-07-05 07:17:44 +00:00
<div
v-if="error"
class="form-group"
>
<div class="alert error">
{{ error }}
<button
class="button-unstyled"
2019-07-05 07:17:44 +00:00
@click="clearError"
>
<FAIcon
class="fa-scale-110 fa-old-padding"
icon="times"
/>
</button>
2019-07-05 07:17:44 +00:00
</div>
</div>
</div>
</template>
<script src="./recovery_form.js" ></script>