summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/settings/internet_page/internet_config.html
blob: df873613ea5c589be3d409606a43c106ca42ad7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<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_button/cr_button.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="internet_shared_css.html">

<dom-module id="internet-config">
  <template>
    <style include="internet-shared iron-flex">
      cr-dialog::part(dialog) {
        width: 460px;
      }

      .error {
        color: red;
        font-weight: 500;
      }
    </style>

    <cr-dialog id="dialog" close-text="$i18n{close}">
      <div slot="title">
        [[getDialogTitle_(managedProperties_, showConnect)]]
      </div>
      <div slot="body">
        <network-config id="networkConfig" class="flex"
            networking-private="[[networkingPrivate]]"
            global-policy="[[globalPolicy]]"
            managed-properties="{{managedProperties_}}"
            enable-connect="{{enableConnect_}}" enable-save="{{enableSave_}}"
            share-allow-enable="[[shareAllowEnable_]]"
            share-default="[[shareDefault_]]"
            error="{{error_}}"
            on-close="onClose_"
            connect-on-enter="[[showConnect]]">
        </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>
        <cr-button class="cancel-button" on-click="onCancelTap_">
          $i18n{cancel}
        </cr-button>
        <template is="dom-if" if="[[!showConnect]]">
          <cr-button class="action-button" on-click="onSaveTap_"
              disabled="[[!enableSave_]]">
            $i18n{save}
          </cr-button>
        </template>
        <template is="dom-if" if="[[showConnect]]">
          <cr-button class="action-button" on-click="onConnectTap_"
              disabled="[[!enableConnect_]]">
            $i18n{networkButtonConnect}
          </cr-button>
        </template>
      </div>

    </cr-dialog>
  </template>
  <script src="internet_config.js"></script>
</dom-module>