blob: b639ed5754b4bc77c99731909b3f77877d40b049 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="strings.html">
<dom-module id="extensions-runtime-hosts-dialog">
<template>
<style include="cr-shared-style paper-button-style"></style>
<cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">[[computeDialogTitle_(currentSite)]]</div>
<div slot="body">
<cr-input id="input" label="$i18n{runtimeHostsDialogInputLabel}"
placeholder="http://example.com"
value="{{site_}}" on-input="validate_"
invalid="[[inputInvalid_]]"
error-message="$i18n{runtimeHostsDialogInputError}"
spellcheck="false"
autofocus>
</cr-input>
</div>
<div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_">
$i18n{cancel}
</paper-button>
<paper-button class="action-button" id="submit" on-click="onSubmitTap_"
disabled="[[computeSubmitButtonDisabled_(inputInvalid_, site_)]]">
[[computeSubmitButtonLabel_(currentSite)]]
</paper-button>
</div>
</cr-dialog>
</template>
<script src="runtime_hosts_dialog.js"></script>
</dom-module>