blob: 8c7d6c18e10ced2499736cc336bc3ff603d007dc [file] [log] [blame]
<!doctype html>
<html dir="$i18n{textdirection}" lang="$i18n{language}">
<head>
<meta charset="utf-8">
<title>$i18n{title}</title>
<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_components/chromeos/network/network_shared_css.html">
<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_network_icon.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/load_time_data.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="stylesheet" href="chrome://resources/css/text_defaults_md.css">
<script src="chrome://internet-config-dialog/strings.js"></script>
</head>
<body>
<dom-module id="internet-config-dialog">
<template>
<style include="network-shared iron-flex">
dialog {
border-radius: 0;
height: 100%;
width: 100%;
}
dialog [slot=body] {
/* This should match or exceed SystemWebDialogDelegate::kDialogHeight
to ensure the content is stretched to fit. */
height: 480px;
}
.error {
color: red;
font-weight: 500;
}
</style>
<dialog is="cr-dialog" id="dialog" no-cancel>
<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_}}" connect-on-save
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>
<paper-button class="action-button" on-tap="onConnectTap_"
disabled="[[!enableConnect_]]">
$i18n{networkButtonConnect}
</paper-button>
</div>
</dialog>
</template>
<script src="internet_config_dialog.js"></script>
</dom-module>
<internet-config-dialog></internet-config-dialog>
</body>
</html>