<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (c) 2014 Sebastian Stenzel
  This file is licensed under the terms of the MIT license.
  See the LICENSE.txt file for more info.
  
  Contributors:
      Sebastian Stenzel - initial API and implementation
-->
<?import java.lang.String?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ProgressIndicator?>
<?import javafx.scene.control.Button?>
<?import org.cryptomator.ui.controls.SecurePasswordField?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.CheckBox?>

<GridPane fx:controller="org.cryptomator.ui.controllers.UpgradeController" fx:id="root" vgap="12.0" hgap="12.0" prefWidth="400.0" xmlns:fx="http://javafx.com/fxml" cacheShape="true" cache="true">
	<padding>
		<Insets top="24.0" right="12.0" bottom="24.0" left="12.0" />
	</padding>

	<columnConstraints>
		<ColumnConstraints percentWidth="38.2" />
		<ColumnConstraints percentWidth="61.8" />
	</columnConstraints>

	<children>
		<Label fx:id="upgradeTitleLabel" wrapText="true" GridPane.rowIndex="0" GridPane.columnIndex="0" GridPane.columnSpan="2" cacheShape="true" cache="true" />
		
		<Label fx:id="upgradeMsgLabel" wrapText="true" GridPane.rowIndex="1" GridPane.columnIndex="0" GridPane.columnSpan="2" cacheShape="true" cache="true" />

		<Pane prefHeight="12.0" GridPane.rowIndex="2" GridPane.columnIndex="0" GridPane.columnSpan="2" cacheShape="true" cache="true">
		</Pane>

		<Label text="%unlock.label.password" GridPane.rowIndex="3" GridPane.columnIndex="0" cacheShape="true" cache="true" />
		<SecurePasswordField fx:id="passwordField" GridPane.rowIndex="3" GridPane.columnIndex="1" cacheShape="true" cache="true" />
		
		<CheckBox fx:id="confirmationCheckbox" text="%upgrade.confirmation.label" wrapText="true" GridPane.rowIndex="4" GridPane.columnIndex="0" GridPane.columnSpan="2" cacheShape="true" cache="true" />

		<HBox alignment="CENTER_RIGHT" GridPane.hgrow="ALWAYS" GridPane.rowIndex="5" GridPane.columnIndex="0" GridPane.columnSpan="2" cacheShape="true" cache="true">
			<Button fx:id="upgradeButton" text="%upgrade.button" prefWidth="150.0" onAction="#didClickUpgradeButton" cacheShape="true" cache="true" />
		</HBox>

		<ProgressIndicator progress="-1" fx:id="progressIndicator" visible="false" GridPane.rowIndex="6" GridPane.columnIndex="0" GridPane.columnSpan="2" cacheShape="true" cache="true" cacheHint="SPEED" />

		<Label fx:id="errorLabel" wrapText="true" GridPane.rowIndex="7" GridPane.columnIndex="0" GridPane.columnSpan="2" cacheShape="true" cache="true" />
	</children>
</GridPane>
