blob: 8abebff8d768140dbecc8fa9e4efde5e892159d4 [file] [log] [blame]
<!-- Copyright 2017 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://oobe/custom_elements.html">
<link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_radio_group/cr_radio_group.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
<!--
UI for the Enrollment license type selection.
Example:
<enrollment-license-card> </enrollment-license-card>
Attributes:
'disabled' - Whether the UI disabled. Could be used to disable the UI
during blocking IO operations.
'selected' - Selected license type.
Events:
'buttonclick' - Fired when user confirms license type selection.
-->
<dom-module id="enrollment-license-card">
<template>
<link rel="stylesheet" href="gaia_input_form.css">
<link rel="stylesheet" href="enrollment_license_card.css">
<style
include="shared-style iron-flex iron-flex-alignment iron-positioning">
</style>
<link rel="stylesheet" href="oobe_iron_flex_layout_fix.css">
<oobe-dialog id="license-selection-prompt-card" has-buttons>
<hd-iron-icon slot="oobe-icon"
icon1x="oobe-enrollment-32:briefcase"
icon2x="oobe-enrollment-64:briefcase"></hd-iron-icon>
<h1 slot="title" i18n-content="oauthEnrollScreenTitle"></h1>
<div slot="subtitle">
[[i18nDynamic(locale, 'licenseSelectionCardExplanation')]]
</div>
<div slot="footer" class="flex layout vertical justified">
<cr-radio-group selected="{{selected}}">
<template is="dom-repeat" items="[[licenses]]" id="repeatTemplate">
<cr-radio-button class="license-radio-button"
disabled="[[or_(item.disabled, disabled)]]"
hidden$="[[item.hidden]]" name="[[item.id]]"
id="license-option-[[item.id]]">
[[formatTitle_(item)]]
</cr-radio-button>
</template>
</cr-radio-group>
</div>
<div slot="bottom-buttons" class="flex layout horizontal end-justified">
<oobe-next-button disabled="[[disabled]]" on-tap="buttonClicked_"
id="next" class="focus-on-show"></oobe-next-button>
</div>
</oobe-dialog>
</template>
</dom-module>