account creation: add backup view

Change-Id: I9d2ff356cd07069c0bb9d7ea0c83d4c8eb26e387
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77a6051..7333820 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,6 +184,8 @@
    src/CallInConferenceVC.h
    src/ConnectToAccManagerVC.mm
    src/ConnectToAccManagerVC.h
+   src/AccountBackupVC.mm
+   src/AccountBackupVC.h
 )
 
 SET(ringclient_VIEWS
@@ -286,6 +288,7 @@
    ChooseContactVC
    CallInConferenceVC
    ConnectToAccManagerVC
+   AccountBackupVC
 )
 
 # Icons
diff --git a/src/AccountBackupVC.h b/src/AccountBackupVC.h
new file mode 100644
index 0000000..32f4fd3
--- /dev/null
+++ b/src/AccountBackupVC.h
@@ -0,0 +1,36 @@
+/*
+ *  Copyright (C) 2019 Savoir-faire Linux Inc.
+ *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "LrcModelsProtocol.h"
+#import <string>
+
+@protocol AccountBackupDelegate <NSObject>
+-(void)completedWithSuccess:(BOOL) success;
+-(void)showView:(NSView*)view;
+@end
+
+@interface AccountBackupVC : NSViewController <LrcModelsProtocol>
+
+@property (retain, nonatomic) id <AccountBackupDelegate> delegate;
+@property std::string accountToBackup;
+-(void)show;
+
+@end
+
diff --git a/src/AccountBackupVC.mm b/src/AccountBackupVC.mm
new file mode 100644
index 0000000..3bec4ad
--- /dev/null
+++ b/src/AccountBackupVC.mm
@@ -0,0 +1,101 @@
+/*
+ *  Copyright (C) 2019 Savoir-faire Linux Inc.
+ *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+#import "AccountBackupVC.h"
+#import "Constants.h"
+
+//LRC
+#import <api/lrc.h>
+#import <api/newaccountmodel.h>
+
+@interface AccountBackupVC () {
+    __unsafe_unretained IBOutlet NSView* initialView;
+    __unsafe_unretained IBOutlet NSView* errorView;
+    __unsafe_unretained IBOutlet NSButton* skipBackupButton;
+}
+
+@end
+
+@implementation AccountBackupVC
+@synthesize accountModel, accountToBackup;
+
+-(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil accountmodel:(lrc::api::NewAccountModel*) accountModel {
+    if (self =  [self initWithNibName:nibNameOrNil bundle:nibBundleOrNil])
+    {
+        self.accountModel = accountModel;
+    }
+    return self;
+}
+
+-(void)show {
+    [self.view setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+    [initialView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+    [errorView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+    BOOL skipBackup = [[NSUserDefaults standardUserDefaults] boolForKey: SkipBackUpPage];
+    [skipBackupButton setState: !skipBackup];
+    [self.delegate showView: initialView];
+}
+
+- (IBAction)skip:(id)sender
+{
+    [self.delegate completedWithSuccess:YES];
+}
+
+- (IBAction)startAgain:(id)sender
+{
+    [self.delegate showView: initialView];
+}
+
+- (IBAction)alwaysSkipBackup:(id)sender
+{
+    [[NSUserDefaults standardUserDefaults] setBool:![sender state] forKey:SkipBackUpPage];
+}
+
+- (IBAction)exportAccount:(id)sender
+{
+    NSSavePanel* filePicker = [NSSavePanel savePanel];
+    NSString* name  = [@(self.accountToBackup.c_str()) stringByAppendingString: @".gz"];
+    [filePicker setNameFieldStringValue: name];
+    if ([filePicker runModal] != NSFileHandlingPanelOKButton) {
+        return;
+    }
+    NSString *password = @"";
+    const char* fullPath = [[filePicker URL] fileSystemRepresentation];
+    lrc::api::account::ConfProperties_t accountProperties = self.accountModel->getAccountConfig(self.accountToBackup);
+    if(accountProperties.archiveHasPassword) {
+        NSAlert *alert = [[NSAlert alloc] init];
+        [alert addButtonWithTitle:@"OK"];
+        [alert addButtonWithTitle:@"Cancel"];
+        [alert setMessageText: NSLocalizedString(@"Enter account password",
+                                                 @"Backup enter password")];
+        NSTextField *input = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 200, 20)];
+        [alert setAccessoryView:input];
+        if ([alert runModal] != NSAlertFirstButtonReturn) {
+            return;
+        }
+        password = [input stringValue];
+    }
+    if (self.accountModel->exportToFile(self.accountToBackup, fullPath, [password UTF8String])) {
+        [self.delegate completedWithSuccess:YES];
+    } else {
+        [self.delegate showView: errorView];
+    }
+}
+
+@end
diff --git a/src/Constants.h b/src/Constants.h
index 416f314..ed7eca9 100644
--- a/src/Constants.h
+++ b/src/Constants.h
@@ -39,4 +39,6 @@
     NSString * const DownloadFolder = @"download_folder";
 }
 
+NSString * const SkipBackUpPage = @"always_skip_backup_page";
+
 const CGFloat MAX_IMAGE_SIZE = 1024;
diff --git a/src/RingWizardNewAccountVC.h b/src/RingWizardNewAccountVC.h
index 2d2a961..370b1e0 100644
--- a/src/RingWizardNewAccountVC.h
+++ b/src/RingWizardNewAccountVC.h
@@ -19,9 +19,10 @@
 
 #import <Cocoa/Cocoa.h>
 #import "LrcModelsProtocol.h"
+#import <string>
 
 @protocol RingWizardNewDelegate <NSObject>
-- (void)didCreateAccountWithSuccess:(BOOL)success;
+- (void)didCreateAccountWithSuccess:(BOOL)success accountId:(std::string)accountId;
 - (void)showView:(NSView*)view;
 @end
 
diff --git a/src/RingWizardNewAccountVC.mm b/src/RingWizardNewAccountVC.mm
index 0291fbe..f7a5d09 100644
--- a/src/RingWizardNewAccountVC.mm
+++ b/src/RingWizardNewAccountVC.mm
@@ -120,6 +120,7 @@
 - (void)prepareViewToShow {
     [self.view setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
     [creationView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+    [loadingView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
     [passwordField setHidden: YES];
     [repeatPasswordView setHidden: YES];
     buttonTopConstraint.constant = 35;
@@ -271,7 +272,7 @@
                                           accountProperties.Ringtone.ringtonePath = [defaultRingtonePath() UTF8String];
                                           self.accountModel->setAccountConfig(accountID, accountProperties);
                                           [self registerDefaultPreferences];
-                                          [self.delegate didCreateAccountWithSuccess:YES];
+                                          [self.delegate didCreateAccountWithSuccess:YES accountId: accountToCreate];
                                       });
     //if account creation failed remove loading view
     accountRemoved = QObject::connect(self.accountModel,
@@ -282,7 +283,7 @@
                                           }
                                           QObject::disconnect(accountCreated);
                                           QObject::disconnect(accountRemoved);
-                                          [self.delegate didCreateAccountWithSuccess:NO];
+                                          [self.delegate didCreateAccountWithSuccess:NO accountId: accountToCreate];
                                       });
     [self display:loadingView];
     [progressBar startAnimation:nil];
@@ -311,7 +312,7 @@
 
 - (IBAction)cancel:(id)sender
 {
-    [self.delegate didCreateAccountWithSuccess:NO];
+    [self.delegate didCreateAccountWithSuccess:NO accountId: accountToCreate];
 }
 
 #pragma mark - UserNameRegistration delegate methods
diff --git a/src/RingWizardWC.h b/src/RingWizardWC.h
index 35c0c30..685a24c 100644
--- a/src/RingWizardWC.h
+++ b/src/RingWizardWC.h
@@ -24,10 +24,11 @@
 #import "LrcModelsProtocol.h"
 #import "AddSIPAccountVC.h"
 #import "ConnectToAccManagerVC.h"
+#import "AccountBackupVC.h"
 
 @interface RingWizardWC : NSWindowController <NSWindowDelegate, NSPathControlDelegate,
     NSOpenSavePanelDelegate, RingWizardChooseDelegate, RingWizardNewDelegate,
-    RingWizardLinkDelegate, AddSIPAccountDelegate, RingWizardAccManagerDelegate,
+    RingWizardLinkDelegate, AddSIPAccountDelegate, RingWizardAccManagerDelegate, AccountBackupDelegate,
 LrcModelsProtocol>
 - (void)showChooseWithCancelButton:(BOOL)showCancel;
 - (void)showNewAccountVC;
diff --git a/src/RingWizardWC.mm b/src/RingWizardWC.mm
index 2cf5c23..045d981 100644
--- a/src/RingWizardWC.mm
+++ b/src/RingWizardWC.mm
@@ -26,10 +26,6 @@
 #import "Constants.h"
 #import "views/NSImage+Extensions.h"
 #import "views/NSColor+RingTheme.h"
-#import "RingWizardNewAccountVC.h"
-#import "RingWizardLinkAccountVC.h"
-#import "RingWizardChooseVC.h"
-#import "ConnectToAccManagerVC.h"
 
 @interface RingWizardWC ()
 
@@ -45,6 +41,7 @@
     IBOutlet RingWizardChooseVC* chooseActiontWC;
     IBOutlet AddSIPAccountVC* addSIPAccountVC;
     IBOutlet ConnectToAccManagerVC* connectToAccManagerVC;
+    IBOutlet AccountBackupVC* accountBackupVC;
     BOOL isCancelable;
 }
 
@@ -68,10 +65,12 @@
     linkAccountWC = [[RingWizardLinkAccountVC alloc] initWithNibName:@"RingWizardLinkAccount" bundle:nil accountmodel:self.accountModel];
     addSIPAccountVC = [[AddSIPAccountVC alloc] initWithNibName:@"AddSIPAccountVC" bundle:nil accountmodel:self.accountModel];
     connectToAccManagerVC = [[ConnectToAccManagerVC alloc] initWithNibName:@"ConnectToAccManagerVC" bundle:nil accountmodel:self.accountModel];
+    accountBackupVC = [[AccountBackupVC alloc] initWithNibName:@"AccountBackupVC" bundle:nil accountmodel:self.accountModel];
     [addSIPAccountVC setDelegate:self];
     [chooseActiontWC setDelegate:self];
     [linkAccountWC setDelegate:self];
     [newAccountWC setDelegate:self];
+    [accountBackupVC setDelegate:self];
     [connectToAccManagerVC setDelegate:self];
     [self showChooseWithCancelButton:isCancelable];
 }
@@ -192,9 +191,14 @@
 
 #pragma - WizardCreateAccountDelegate methods
 
-- (void)didCreateAccountWithSuccess:(BOOL)success
+- (void)didCreateAccountWithSuccess:(BOOL)success accountId:(std::string)accountId;
 {
-    [self completedWithSuccess:success];
+    BOOL skipBackup = [[NSUserDefaults standardUserDefaults] boolForKey: SkipBackUpPage];
+    if (skipBackup || !success) {
+        [self completedWithSuccess:success];
+        return;
+    }
+    [self showBackUpAccount: accountId];
 }
 
 #pragma - WizardLinkAccountDelegate methods
@@ -210,6 +214,16 @@
     [self completedWithSuccess:success];
 }
 
+- (void)showBackUpAccount:(std::string)accountId{
+    [self.windowHeader setStringValue: NSLocalizedString(@"Backup your account",
+                                                         @"Backup account")];
+    [ringImage setHidden: YES];
+    titleConstraint.constant = 0;
+    accountBackupVC.accountToBackup = accountId;
+    [self showView: accountBackupVC.view];
+    [accountBackupVC show];
+}
+
 -(void) completedWithSuccess:(BOOL) success {
     if (success) {
         [self.window close];
diff --git a/ui/Base.lproj/AccountBackupVC.strings b/ui/Base.lproj/AccountBackupVC.strings
new file mode 100644
index 0000000..5d6e983
--- /dev/null
+++ b/ui/Base.lproj/AccountBackupVC.strings
@@ -0,0 +1,18 @@
+
+/* Class = "NSButtonCell"; title = "Skip"; ObjectID = "73h-fa-4yX"; */
+"73h-fa-4yX.title" = "Skip";
+
+/* Class = "NSTextFieldCell"; title = "An error occured during the backup. Please check your credentials."; ObjectID = "7lU-Qy-WOb"; */
+"7lU-Qy-WOb.title" = "An error occured during the backup. Please check your credentials.";
+
+/* Class = "NSButtonCell"; title = "Never show me this again"; ObjectID = "PVF-bb-Yoi"; */
+"PVF-bb-Yoi.title" = "Never show me this again";
+
+/* Class = "NSTextFieldCell"; title = "This account only exists on this device. If you lost your device or uninstall the application, your account will be deleted. You can backup your account now or later."; ObjectID = "SUG-lC-TDL"; */
+"SUG-lC-TDL.title" = "This account only exists on this device. If you lost your device or uninstall the application, your account will be deleted. You can backup your account now or later.";
+
+/* Class = "NSButtonCell"; title = "Export account"; ObjectID = "cod-s7-SPd"; */
+"cod-s7-SPd.title" = "Export account";
+
+/* Class = "NSButtonCell"; title = "OK"; ObjectID = "ruw-Kp-tCz"; */
+"ruw-Kp-tCz.title" = "OK";
diff --git a/ui/Base.lproj/AccountBackupVC.xib b/ui/Base.lproj/AccountBackupVC.xib
new file mode 100644
index 0000000..216eede
--- /dev/null
+++ b/ui/Base.lproj/AccountBackupVC.xib
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="AccountBackupVC">
+            <connections>
+                <outlet property="errorView" destination="MTi-8n-Ag6" id="ann-DX-3lG"/>
+                <outlet property="initialView" destination="Hz6-mo-xeY" id="JTn-7F-YE6"/>
+                <outlet property="skipBackupButton" destination="eTj-Rr-qu8" id="uv0-E5-Htn"/>
+                <outlet property="view" destination="OnL-bH-yod" id="30v-Vj-JXc"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView misplaced="YES" id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="400" height="149"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <stackView distribution="fill" orientation="vertical" alignment="leading" spacing="15" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SoC-Ko-34A">
+                    <rect key="frame" x="20" y="66" width="360" height="80"/>
+                    <subviews>
+                        <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="d0m-IT-qJ0">
+                            <rect key="frame" x="0.0" y="29" width="360" height="51"/>
+                            <textFieldCell key="cell" sendsActionOnEndEditing="YES" drawsBackground="YES" id="SUG-lC-TDL">
+                                <font key="font" metaFont="system"/>
+                                <string key="title">This account only exists on this device. If you lost your device or uninstall the application, your account will be deleted. You can backup your account now or later.</string>
+                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+                            </textFieldCell>
+                        </textField>
+                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eTj-Rr-qu8">
+                            <rect key="frame" x="-2" y="-2" width="178" height="18"/>
+                            <buttonCell key="cell" type="check" title="Never show me this again" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="PVF-bb-Yoi">
+                                <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="alwaysSkipBackup:" target="-2" id="qkJ-7P-ZJ1"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="360" id="YXI-Ht-bjc"/>
+                    </constraints>
+                    <visibilityPriorities>
+                        <integer value="1000"/>
+                        <integer value="1000"/>
+                    </visibilityPriorities>
+                    <customSpacing>
+                        <real value="3.4028234663852886e+38"/>
+                        <real value="3.4028234663852886e+38"/>
+                    </customSpacing>
+                </stackView>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lxh-2V-y2g">
+                    <rect key="frame" x="186" y="13" width="133" height="32"/>
+                    <buttonCell key="cell" type="push" title="Export account" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="cod-s7-SPd">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                        <string key="keyEquivalent" base64-UTF8="YES">
+Gw
+</string>
+                    </buttonCell>
+                    <connections>
+                        <action selector="exportAccount:" target="-2" id="mlH-j3-Vot"/>
+                    </connections>
+                </button>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c5s-Hc-WfE">
+                    <rect key="frame" x="319" y="13" width="67" height="32"/>
+                    <buttonCell key="cell" type="push" title="Skip" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="73h-fa-4yX">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                        <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+                    </buttonCell>
+                    <connections>
+                        <action selector="skip:" target="-2" id="hhD-xi-KNk"/>
+                    </connections>
+                </button>
+            </subviews>
+            <constraints>
+                <constraint firstItem="SoC-Ko-34A" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="90J-8n-Neo"/>
+                <constraint firstAttribute="bottom" secondItem="c5s-Hc-WfE" secondAttribute="bottom" constant="20" id="BMn-wU-fbW"/>
+                <constraint firstItem="SoC-Ko-34A" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" id="EVg-tD-ilL"/>
+                <constraint firstItem="c5s-Hc-WfE" firstAttribute="centerY" secondItem="Lxh-2V-y2g" secondAttribute="centerY" id="S4D-ME-8EY"/>
+                <constraint firstItem="c5s-Hc-WfE" firstAttribute="leading" secondItem="Lxh-2V-y2g" secondAttribute="trailing" constant="12" id="VIh-EG-xAE"/>
+                <constraint firstItem="Lxh-2V-y2g" firstAttribute="top" secondItem="SoC-Ko-34A" secondAttribute="bottom" constant="25" id="erY-gK-J7b"/>
+                <constraint firstAttribute="trailing" secondItem="c5s-Hc-WfE" secondAttribute="trailing" constant="20" id="qMr-tz-3hx"/>
+                <constraint firstAttribute="trailing" secondItem="SoC-Ko-34A" secondAttribute="trailing" constant="20" id="teq-1L-Hey"/>
+            </constraints>
+        </customView>
+        <customView id="OnL-bH-yod">
+            <rect key="frame" x="0.0" y="0.0" width="340" height="200"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <point key="canvasLocation" x="334" y="754"/>
+        </customView>
+        <view misplaced="YES" id="MTi-8n-Ag6">
+            <rect key="frame" x="0.0" y="0.0" width="400" height="149"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="guH-rw-fQT">
+                    <rect key="frame" x="-2" y="66" width="404" height="34"/>
+                    <textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="center" title="An error occured during the backup. Please check your credentials." id="7lU-Qy-WOb">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bLO-Fz-g1y">
+                    <rect key="frame" x="306" y="13" width="80" height="32"/>
+                    <constraints>
+                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="68" id="3Ph-kR-k0M"/>
+                    </constraints>
+                    <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ruw-Kp-tCz">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                        <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+                    </buttonCell>
+                    <connections>
+                        <action selector="startAgain:" target="-2" id="meX-Nv-zKP"/>
+                    </connections>
+                </button>
+            </subviews>
+            <constraints>
+                <constraint firstItem="guH-rw-fQT" firstAttribute="width" secondItem="MTi-8n-Ag6" secondAttribute="width" id="1A2-IC-i2o"/>
+                <constraint firstItem="guH-rw-fQT" firstAttribute="top" secondItem="MTi-8n-Ag6" secondAttribute="top" constant="25" id="1jX-ry-2bH"/>
+                <constraint firstAttribute="trailing" secondItem="bLO-Fz-g1y" secondAttribute="trailing" constant="20" id="2yc-KI-u5s"/>
+                <constraint firstItem="guH-rw-fQT" firstAttribute="centerX" secondItem="MTi-8n-Ag6" secondAttribute="centerX" id="Ur0-Mz-0EI"/>
+                <constraint firstAttribute="bottom" secondItem="bLO-Fz-g1y" secondAttribute="bottom" constant="20" id="xKC-xL-wo8"/>
+                <constraint firstItem="bLO-Fz-g1y" firstAttribute="top" secondItem="guH-rw-fQT" secondAttribute="bottom" constant="25" id="yNG-1G-bwk"/>
+            </constraints>
+            <point key="canvasLocation" x="29" y="436.5"/>
+        </view>
+    </objects>
+</document>
diff --git a/ui/Base.lproj/ConnectToAccManagerVC.strings b/ui/Base.lproj/ConnectToAccManagerVC.strings
deleted file mode 100644
index 21fd562..0000000
--- a/ui/Base.lproj/ConnectToAccManagerVC.strings
+++ /dev/null
Binary files differ
diff --git a/ui/Base.lproj/Localizable.strings b/ui/Base.lproj/Localizable.strings
index fc219ae..fded4ef 100644
--- a/ui/Base.lproj/Localizable.strings
+++ b/ui/Base.lproj/Localizable.strings
@@ -219,3 +219,6 @@
 
 /* Recording view explanation label */
 "Could not record message during call" = "Could not record message during call";
+
+/* Backup account */
+"Backup your account" = "Backup your account";
diff --git a/ui/Base.lproj/RingWizardChoose.strings b/ui/Base.lproj/RingWizardChoose.strings
deleted file mode 100644
index 0508134..0000000
--- a/ui/Base.lproj/RingWizardChoose.strings
+++ /dev/null
Binary files differ
diff --git a/ui/Base.lproj/RingWizardNewAccount.strings b/ui/Base.lproj/RingWizardNewAccount.strings
deleted file mode 100644
index 5da801e..0000000
--- a/ui/Base.lproj/RingWizardNewAccount.strings
+++ /dev/null
Binary files differ
diff --git a/ui/Base.lproj/RingWizardNewAccount.xib b/ui/Base.lproj/RingWizardNewAccount.xib
index 8fd8b6a..2153ebd 100644
--- a/ui/Base.lproj/RingWizardNewAccount.xib
+++ b/ui/Base.lproj/RingWizardNewAccount.xib
@@ -514,11 +514,11 @@
         </popover>
         <userDefaultsController representsSharedInstance="YES" id="JOT-gS-qe2"/>
         <customView id="WWd-Hs-Pwi">
-            <rect key="frame" x="0.0" y="0.0" width="413" height="60"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <rect key="frame" x="0.0" y="0.0" width="400" height="150"/>
+            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
             <subviews>
                 <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1hK-Hw-cJh">
-                    <rect key="frame" x="35" y="-12" width="344" height="17"/>
+                    <rect key="frame" x="28" y="78" width="344" height="17"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="340" id="tHE-Zh-IYn"/>
                     </constraints>
@@ -529,7 +529,7 @@
                     </textFieldCell>
                 </textField>
                 <progressIndicator wantsLayer="YES" maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="1rt-CR-Wpz">
-                    <rect key="frame" x="159" y="13" width="96" height="32"/>
+                    <rect key="frame" x="152" y="103" width="96" height="32"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="96" id="g01-Ci-luV"/>
                     </constraints>