<p class="help-block" translate>
    The Yubikey Token is an USB device that emits an event based One Time
    Password. You can initialize the Yubikey using the tool ykpersonalize.
    Paste the secret hex key here.
    For tokens compatible with the Yubico cloud service check "emit a public ID".
    When programming the token the prefix must be 6 bytes, which will give
    you a UID with 12 characters.
    You also need to choose, if the Yubikey emits the additional UID, which
    is either 12 or 16 characters long. You can check this in the test field.
</p>

<h4 translate>Token data</h4>

<div class="form-group">
    <label for="yubikeyTest" translate>Test Yubikey</label>
    <input type="text"
           autofocus
           class="form-control"
           placeholder="{{ 'Push Yubikey button here...'|translate }}"
           ng-model="tempData.yubikeyTest" name="yubikeyTest"
           ng-change="yubikeyGetLen()">
</div>

<div class="form-group">
    <input type="checkbox" ng-model="tempData.yubikeyUid"
           name="yubikeyUID" id="yubikeyUID">
    <label for="yubikeyUID" translate>emit a public UID</label>

    <div ng-show="tempData.yubikeyUid">
    <label for="yubikeyUidLen" translate>Length of UID</label>
    <select ng-model="tempData.yubikeyUidLen"
            name="yubikeyUidLen">
        <option>12</option>
        <option>16</option>
    </select>
        </div>
</div>

<div class="form-group">
    <label for="otpkey" translate>OTP Key</label>
    <input type="text" ng-pattern="/^[0-9a-fA-F]*$/"
           ng-init="form.genkey=false"
           autofocus
           class="form-control"
           placeholder="{{ 'Enter OTP key...'|translate }}"
           required
           ng-model="form.otpkey" name="otpkey">
</div>
<div class="form-group">
    <label for="otplen" translate>OTP length</label>
    <select class="form-control"
            id="otplen"
            required
            ng-model="form.otplen">
        <option>32</option>
        <option>44</option>
        <option>48</option>
    </select>
</div>
