<p class="help-block" translate>
The TOTP token is a time based token. You can paste a secret key or
    have the server generate the secret and scan the QR code with a
    smartphone app like the Google Authenticator or FreeOTP turning your
    smartphone into an authentication device.
</p>

<h4 translate>Token data</h4>

<div class="form-group">
    <div ng-hide="checkRight('totp_force_server_generate')">
        <input type="checkbox" ng-model="form.genkey"
               name="generate" id="generate">
        <label for="generate" translate>Generate OTP Key on the Server</label>
    </div>

    <div ng-show="form.genkey">
        <p class="help-block" translate>
            The server will create the OTP key
            and a QR Code
            will be
            displayed to you to be scanned.
        </p>
    </div>
</div>
<div class="form-group"
     ng-show="checkRight('totp_2step=allow') || (!$state.includes('token.wizard') && checkRight('totp_2step=force'))">
    <input type="checkbox" ng-model="form['2stepinit']"
           ng-disabled="checkRight('totp_2step=force')"
           name="twostep_enrollment" id="twostep_enrollment">
    <label for="twostep_enrollment" translate>Use two-step enrollment with the privacyIDEA Authenticator App</label>
</div>
<div class="form-group" ng-hide="form.genkey">
    <label for="otpkey" translate>OTP Key</label>
    <input type="text" ng-pattern="/^[0-9a-fA-F]*$/"
           autofocus
           class="form-control"
           placeholder="{{ 'Enter OTP key...'|translate }}"
           ng-model="form.otpkey" name="otpkey">
</div>
<div class="form-group"
    ng-hide="checkRight('totp_otplen')">
    <label for="otplen" translate>OTP length</label>
    <select class="form-control"
            id="otplen"
            ng-model="form.otplen"
            ng-options="otplen for otplen in formInit.otplens">
    </select>
    <p class="help-block" ng-show="form.genkey" translate>
        The Google Authenticator only supports an OTP length of 6.
    </p>
</div>
<div class="form-group"
    ng-hide="checkRight('totp_timestep')">
    <label for="timestep" translate>Timestep</label>
    <select class="form-control"
            ng-model="form.timeStep"
            name="timestep"
            ng-options="timestep for timestep in formInit.timesteps"></select>
    seconds.
</div>

<div class="form-group"
    ng-hide="checkRight('totp_hashlib')">
    <label for="hashlib" translate>Hash algorithm</label>
    <select class="form-control"
            id="hashlib"
            ng-model="form.hashlib"
            ng-options="hashlib for hashlib in formInit.hashlibs">
    </select>
    <p class="help-block" ng-show="form.genkey" translate>
        The Google Authenticator only supports the SHA1 algorithm.
    </p>
</div>
<div class="form-group">
    <label for="description" translate>Description</label>
    <input type="text" class="form-control"
            placeholder="{{ 'Some nice words...'|translate }}"
            ng-model="form.description" />
</div>
