blob: 4fa0a79d5e8ed88e225561d2105e9a31554b8fe9 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/network/network_config.html">
<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="internet_shared_css.html">
<dom-module id="internet-config">
<template>
<style include="internet-shared iron-flex">
dialog {
width: 460px;
}
.error {
color: red;
font-weight: 500;
}
</style>
<dialog is="cr-dialog" id="dialog" close-text="$i18n{close}">
<div slot="title">[[getDialogTitle_(networkProperties_)]]</div>
<div slot="body">
<network-config id="networkConfig" class="flex"
networking-private="[[networkingPrivate]]"
global-policy="[[globalPolicy]]"
network-properties="{{networkProperties_}}"
enable-connect="{{enableConnect_}}" enable-save="{{enableSave_}}"
share-allow-enable="[[shareAllowEnable_]]"
share-default="[[shareDefault_]]"
error="{{error_}}"
on-close="close">
</network-config>
</div>
<div class="layout horizontal center" slot="button-container">
<template is="dom-if" if="[[error_]]" restamp>
<div class="flex error">[[getError_(error_)]]</div>
</template>
<paper-button class="cancel-button" on-tap="onCancelTap_">
$i18n{cancel}
</paper-button>
<template is="dom-if" if="[[isConfigured_(networkProperties_, guid)]]">
<paper-button class="action-button" on-tap="onSaveOrConnectTap_"
disabled="[[!enableSave_]]">
$i18n{save}
</paper-button>
</template>
<template is="dom-if" if="[[!isConfigured_(networkProperties_, guid)]]">
<paper-button class="action-button" on-tap="onSaveOrConnectTap_"
disabled="[[!enableConnect_]]">
$i18n{networkButtonConnect}
</paper-button>
</template>
</div>
</dialog>
</template>
<script src="internet_config.js"></script>
</dom-module>