1 <%@ MasterClass="Application.Layouts.Wizard" Theme="Baculum-v1"%>
2 <com:TContent ID="Wizard">
3 <com:TWizard ID="InstallWizard"
5 StepStyle.CssClass="steps"
6 HeaderStyle.CssClass="header"
7 NavigationStyle.CssClass="navigation"
8 UseDefaultLayout="false"
10 OnCancelButtonClick="wizardStop"
11 OnCompleteButtonClick="wizardCompleted"
15 <div class="step step-<%=($this->Parent->ActiveStepIndex === 0) ? 'first-active' : (($this->Parent->ActiveStepIndex === 1) ? 'first-next-active' : 'first')%>">
16 <div><com:TTranslate Text="Language" /></div>
18 <div class="step step-<%=($this->Parent->ActiveStepIndex === 1) ? 'active' : (($this->Parent->ActiveStepIndex === 2) ? 'prev-active' : 'normal')%>">
19 <div><com:TTranslate Text="Licence" /></div>
21 <div class="step step-<%=($this->Parent->ActiveStepIndex === 2) ? 'active' : (($this->Parent->ActiveStepIndex === 3) ? 'prev-active' : 'normal')%>">
22 <div><com:TTranslate Text="Database" /></div>
24 <div class="step step-<%=($this->Parent->ActiveStepIndex === 3) ? 'active' : (($this->Parent->ActiveStepIndex === 4) ? 'prev-active' : 'normal')%>">
25 <div><com:TTranslate Text="Console" /></div>
27 <div class="step step-<%=($this->Parent->ActiveStepIndex === 4) ? 'active' : (($this->Parent->ActiveStepIndex === 5) ? 'prev-active' : 'normal')%>">
28 <div><com:TTranslate Text="Authorization" /></div>
30 <div class="step step-<%=($this->Parent->ActiveStepIndex === 5) ? 'last-active' : (($this->Parent->ActiveStepIndex === 6) ? 'last-prev-active' : 'last')%>">
31 <div><com:TTranslate Text="Finish" /></div>
33 <div id="title"><%=$this->Parent->ActiveStep->Title%><div>
35 </prop:HeaderTemplate>
36 <prop:StartNavigationTemplate>
37 <com:TPanel CssClass="button-cancel" Visible="<%=$this->getPage()->firstRun === false%>"><com:BButton CommandName="Cancel" Text="<%[ Cancel ]%>" /></com:TPanel>
38 <div <%=$this->getPage()->firstRun === false ? 'class="button-prev-next"' : ''%>><com:BButton CommandName="NextStep" Text="<%[ Next » ]%>" /></div>
39 </prop:StartNavigationTemplate>
41 <prop:StepNavigationTemplate>
42 <com:TPanel CssClass="button-cancel" Visible="<%=$this->getPage()->firstRun === false%>"><com:BButton CommandName="Cancel" Text="<%[ Cancel ]%>" /></com:TPanel>
43 <div <%=$this->getPage()->firstRun === false ? 'class="button-prev-next"' : ''%>>
44 <com:BButton CausesValidation="False" CssClass="bbutton" CommandName="PreviousStep" Text="<%[ « Previous ]%>" />
45 <com:BButton ID="NextButton" CommandName="NextStep" Text="<%[ Next » ]%>" />
47 </prop:StepNavigationTemplate>
49 <prop:FinishNavigationTemplate>
50 <com:TPanel CssClass="button-cancel" Visible="<%=$this->getPage()->firstRun === false%>"><com:BButton CommandName="Cancel" Text="<%[ Cancel ]%>" /></com:TPanel>
51 <div <%=$this->getPage()->firstRun === false ? 'class="button-prev-next"' : ''%>>
52 <com:BButton CausesValidation="False" CssClass="bbutton" CommandName="PreviousStep" Text="<%[ « Previous ]%>" />
53 <com:BButton CommandName="Complete" Text="<%[ Save ]%>" />
55 </prop:FinishNavigationTemplate>
56 <com:TWizardStep ID="Step1" Title="<%[ Step 1 - select language ]%>" StepType="Auto">
58 <div class="text"><com:TLabel ForControl="Lang" Text="<%[ Language: ]%>" /></div>
60 <com:TActiveDropDownList ID="Lang" CssClass="textbox" Width="150px" OnTextChanged="setLang" CausesValidation="false">
61 <com:TListItem Value="en" Text="<%[ English ]%>" />
62 <com:TListItem Value="pl" Text="<%[ Polish ]%>" />
63 <com:TListItem Value="pt" Text="<%[ Portuguese ]%>" />
64 <com:TListItem Value="ja" Text="<%[ Japanese ]%>" />
65 </com:TActiveDropDownList>
66 <com:TCompareValidator CssClass="validator-block" Display="Dynamic" ControlToValidate="Lang" DataType="String" ValueToCompare="none" Operator="NotEqual" Text="<%[ Please select language. ]%>" />
70 <com:TWizardStep ID="Step2" Title="<%[ Step 2 - acceptance of a license ]%>" StepType="Auto">
71 <div id="licence"><com:TLabel ID="Licence" /></div>
72 <div id="licence-agree">
73 <com:TCheckBox ID="LicenceAgree" Checked="<%=$this->getPage()->firstRun === false || $this->LicenceAgree->Checked === true%>" />
74 <com:TLabel ForControl="LicenceAgree" Text="<%[ I have read the license terms and accept them ]%>" /><br />
75 <com:TRequiredFieldValidator CssClass="validator-block" ControlToValidate="LicenceAgree" FocusOnError="true" Display="Dynamic" Text="<%[ Need to move on to accept the license. ]%>" />
78 <com:TWizardStep ID="Step3" Title="<%[ Step 3 - params of Bacula database connection ]%>" StepType="Auto">
79 <com:TActivePanel ID="Step2Content">
81 <div class="text"><com:TLabel ForControl="DBType" Text="<%[ Database type: ]%>" /></div>
83 <com:TActiveDropDownList ID="DBType" CssClass="textbox" Width="170px" OnLoad="setDBType" OnTextChanged="setDBType" CausesValidation="false" OnCallback="renderPanel">
84 <com:TListItem Value="none" Text="<%[ select database ]%>" />
85 <com:TListItem Value="pgsql" Text="PostgreSQL" />
86 <com:TListItem Value="mysql" Text="MySQL" />
87 <com:TListItem Value="sqlite" Text="SQLite" />
88 </com:TActiveDropDownList>
89 <com:TCompareValidator CssClass="validator-block" Display="Dynamic" ControlToValidate="DBType" DataType="String" ValueToCompare="none" Operator="NotEqual" Text="<%[ Please select database type. ]%>" />
94 <div class="text"><com:TLabel ForControl="DBName" Text="<%[ Database name: ]%>" /></div>
96 <com:TTextBox ID="DBName" CssClass="textbox" />
97 <com:TRequiredFieldValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="DBName" Text="<%[ Please enter database name. ]%>" />
101 <div class="text"><com:TLabel ForControl="Login" Text="<%[ Login: ]%>" /></div>
103 <com:TActiveTextBox ID="Login" CssClass="textbox" />
104 <com:TRequiredFieldValidator ID="LoginValidator" CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="Login" Text="<%[ Please enter login. ]%>" />
108 <div class="text"><com:TLabel ForControl="Password" Text="<%[ Password: ]%>" /></div>
109 <div class="field"><com:TActiveTextBox ID="Password" CssClass="textbox" TextMode="Password" PersistPassword="true" /></div>
112 <div class="text"><com:TLabel ForControl="IP" Text="<%[ IP address (or hostname): ]%>" /></div>
114 <com:TActiveTextBox ID="IP" CssClass="textbox" />
115 <com:TRequiredFieldValidator ID="IPValidator" CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="IP" Text="<%[ Please enter IP address or hostname. ]%>" />
119 <div class="text"><com:TLabel ForControl="Port" Text="<%[ Port: ]%>" /></div>
121 <com:TActiveTextBox ID="Port" CssClass="textbox" Width="55px" MaxLength="5" Enabled="false" />
122 <com:TRequiredFieldValidator ID="PortValidator" CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="Port" Text="<%[ Please enter database port. ]%>" />
125 <com:TActivePanel ID="DBPathField" CssClass="line" Display="<%=$this->getPage()->firstRun === false && !$this->IsCallBack && $this->getPage()->applicationConfig['db']['type'] == 'sqlite' ? 'Fixed' : $this->DBPathField->Display%>">
126 <div class="text"><com:TLabel ForControl="DBPath" Text="<%[ SQLite database path: ]%>" /></div>
128 <com:TActiveTextBox ID="DBPath" CssClass="textbox" Enabled="false" />
129 <com:TRequiredFieldValidator ID="DBPathValidator" Display="Dynamic" CssClass="validator-block" ControlCssClass="invalidate" ControlToValidate="DBPath" Text="<%[ Please enter database path. ]%>" />
133 <div class="text"><com:TLabel ForControl="ConnectionTest" Text="<%[ Connection test: ]%>" /></div>
135 <table border="0" cellpadding="1px">
137 <td align="center" valign="middle">
138 <com:TActiveButton ID="ConnectionTest" Text="<%[ test ]%>" CausesValidation="false" OnCallback="connectionDBTest">
139 <prop:ClientSide.OnLoading>
140 Element.hide('<%=$this->DbTestResultOk->ClientID%>');
141 Element.hide('<%=$this->DbTestResultErr->ClientID%>');
142 Element.show('<%=$this->DbTestLoader->ClientID%>');
143 </prop:ClientSide.OnLoading>
144 <prop:ClientSide.OnComplete>
145 Element.hide('<%=$this->DbTestLoader->ClientID%>');
146 </prop:ClientSide.OnComplete>
149 <td align="center" valign="middle">
150 <com:TActiveLabel ID="DbTestLoader" Display="None"><img src="<%=$this->getTheme()->getBaseUrl()%>/ajax-loader.gif" alt="<%[ Loading... ]%>" /></com:TActiveLabel>
151 <com:TActiveLabel ID="DbTestResultOk" Display="None" CssClass="validate"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_ok.png" alt="Validate" /> <%[ OK ]%></com:TActiveLabel>
152 <com:TActiveLabel ID="DbTestResultErr" Display="None" CssClass="validator-block"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_err.png" alt="Invalidate" /> <%[ Connection error ]%></com:TActiveLabel>
158 <com:TPanel Style="clear: left" />
161 <com:TWizardStep ID="Step4" Title="<%[ Step 4 - Baculum access to bconsole ]%>" StepType="Auto">
163 <div class="text"><com:TLabel ForControl="BconsolePath" Text="<%[ Bconsole binary file path: ]%>" /></div>
165 <com:TTextBox ID="BconsolePath" CssClass="textbox" CausesValidation="false" />
166 <com:TRequiredFieldValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="BconsolePath" Text="<%[ Please enter bconsole path. ]%>" />
170 <div class="text"><com:TLabel ForControl="BconsoleConfigPath" Text="<%[ Bconsole admin config file path: ]%>" /></div>
172 <com:TTextBox ID="BconsoleConfigPath" CssClass="textbox" CausesValidation="false" />
173 <com:TRequiredFieldValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="BconsoleConfigPath" Text="<%[ Please enter bconsole config file path. ]%>" />
177 <div class="text"><com:TLabel ForControl="UseSudo" Text="<%[ Use sudo: ]%>" /></div>
179 <com:TCheckBox ID="UseSudo" />
183 <div class="text"><com:TLabel ForControl="BconsoleConnectionTest" Text="<%[ Bconsole connection test: ]%>" /></div>
185 <table border="0" cellpadding="1px">
187 <td align="center" valign="middle">
188 <com:TActiveButton ID="BconsoleConnectionTest" Text="<%[ test ]%>" CausesValidation="false" OnCallback="connectionBconsoleTest">
189 <prop:ClientSide.OnLoading>
190 Element.hide('<%=$this->BconsoleTestResultOk->ClientID%>');
191 Element.hide('<%=$this->BconsoleTestResultErr->ClientID%>');
192 Element.show('<%=$this->BconsoleTestLoader->ClientID%>');
193 </prop:ClientSide.OnLoading>
194 <prop:ClientSide.OnComplete>
195 Element.hide('<%=$this->BconsoleTestLoader->ClientID%>');
196 </prop:ClientSide.OnComplete>
199 <td align="center" valign="middle">
200 <com:TActiveLabel ID="BconsoleTestLoader" Display="None"><img src="<%=$this->getTheme()->getBaseUrl()%>/ajax-loader.gif" alt="<%[ Loading... ]%>" /></com:TActiveLabel>
201 <com:TActiveLabel ID="BconsoleTestResultOk" Display="None" CssClass="validate" EnableViewState="false"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_ok.png" alt="Validate" /> <%[ OK ]%></com:TActiveLabel>
202 <com:TActiveLabel ID="BconsoleTestResultErr" Display="None" CssClass="validator-block" EnableViewState="false"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_err.png" alt="Invalidate" /> <%[ Connection error ]%></com:TActiveLabel>
209 <p><b><%[ NOTE! ]%></b><br /><em><%[ Baculum needs access to bconsole by the web server. ]%></em></p>
213 <p><%[ For need defining more Baculum users with custom access or restricted console access (Bconsole ACLs) here is possible to determine custom bconsole configuration file format for each user. ]%></p>
216 <p><%[ If there is used only one Baculum user then below field value will be ignored. ]%></p>
219 <div class="text"><com:TLabel ForControl="BconsoleConfigCustomPath" Text="<%[ Bconsole custom config file path: ]%>" /></div>
221 <com:TTextBox ID="BconsoleConfigCustomPath" CssClass="textbox" CausesValidation="false" />
222 <com:TRequiredFieldValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="BconsoleConfigCustomPath" Text="<%[ Please enter bconsole custom config file path. ]%>" />
226 <p><b><%[ NOTE! ]%></b><br /><%[ {user} keyword will be replaced for each logged user into according username. ]%></p>
229 <com:TWizardStep ID="Step5" Title="<%[ Step 5 - authorization params to Baculum ]%>" StepType="Auto">
231 <div class="text"><com:TLabel ForControl="PanelLogin" Text="<%[ Administration login: ]%>" /></div>
233 <com:TTextBox ID="PanelLogin" CssClass="textbox" CausesValidation="false" />
234 <com:TRequiredFieldValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="PanelLogin" Text="<%[ Please enter login. ]%>" />
235 <com:TRegularExpressionValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="PanelLogin" RegularExpression="<%=$this->userPattern%>" Text="<%[ Invalid login value. Login may contain a-z A-Z 0-9 characters. ]%>" />
239 <div class="text"><com:TLabel ForControl="PanelPassword" Text="<%[ Administration password: ]%>" /></div>
241 <com:TTextBox ID="PanelPassword" CssClass="textbox" TextMode="Password" MaxLength="30" PersistPassword="true" />
242 <com:TRequiredFieldValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="PanelPassword" Text="<%[ Please enter password. ]%>"/>
243 <com:TRegularExpressionValidator CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="PanelPassword" RegularExpression="[\S\s]{5,30}" Text="<%[ Password must be longer than 4 chars. ]%>" />
247 <div class="text"><com:TLabel ForControl="RetypePanelPassword" Text="<%[ Retype administration password: ]%>" /></div>
249 <com:TTextBox ID="RetypePanelPassword" CssClass="textbox" TextMode="Password" MaxLength="30" PersistPassword="true" />
250 <com:TRequiredFieldValidator ID="RetypePasswordRequireValidator" CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="RetypePanelPassword" Text="<%[ Please enter retype password. ]%>"/>
251 <com:TRegularExpressionValidator ID="RetypePasswordRegexpValidator" CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="RetypePanelPassword" RegularExpression="[\S\s]{5,30}" Text="<%[ Password must be longer than 4 chars. ]%>" />
252 <com:TCustomValidator ID="RetypePasswordCustomValidator" CssClass="validator-block" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="RetypePanelPassword" OnServerValidate="validateAdministratorPassword" Text="<%[ Passwords must be the same. ]%>" />
256 <p><b><%[ NOTE! ]%></b><br /><em><%[ Above administration login and administration password will be used for login as administrator to Baculum WebGUI. They are your HTTP Basic authorization params by using which you will be logged in to Baculum. ]%></em></p>
259 <com:TWizardStep ID="Step6" Title="<%[ Step 6 - Finish ]%>" StepType="Finish">
261 <legend><%[ Database parameters ]%></legend>
263 <div class="text"><%[ Database type: ]%></div>
264 <div class="field bold"><%=$this->getModule('configuration')->getDbNameByType($this->DBType->SelectedValue)%></div>
267 <div class="text"><%[ Database name: ]%></div>
268 <div class="field bold"><%=$this->DBName->Text%></div>
271 <div class="text"><%[ Login: ]%></div>
272 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? $this->Login->Text : '-'%></div>
275 <div class="text"><%[ Password: ]%></div>
276 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? preg_replace('/.{1}/', '*', $this->Password->Text) : '-'%></div>
279 <div class="text"><%[ IP address (or hostname): ]%></div>
280 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? $this->IP->Text : '-'%></div>
283 <div class="text"><%[ Database port: ]%></div>
284 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? $this->Port->Text : '-'%></div>
287 <div class="text"><%[ Database file path (SQLite only): ]%></div>
288 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === true ? $this->DBPath->Text : '-'%></div>
292 <legend><%[ Bconsole access ]%></legend>
294 <div class="text"><%[ Bconsole binary file path: ]%></div>
295 <div class="field bold"><%=$this->BconsolePath->Text%></div>
298 <div class="text"><%[ Bconsole admin config file path: ]%></div>
299 <div class="field bold"><%=$this->BconsoleConfigPath->Text%></div>
302 <div class="text"><%[ Bconsole custom config file path: ]%></div>
303 <div class="field bold"><%=$this->BconsoleConfigCustomPath->Text%></div>
306 <div class="text"><%[ Use sudo for bconsole requests: ]%></div>
307 <div class="field bold"><%=($this->UseSudo->Checked === true) ? 'yes' : 'no'%></div>
311 <legend><%[ Authorization to Baculum panel ]%></legend>
313 <div class="text"><%[ Administration login: ]%></div>
314 <div class="field bold"><%=$this->PanelLogin->Text%></div>
317 <div class="text"><%[ Administration password: ]%></div>
318 <div class="field bold"><%=preg_replace('/.{1}/', '*', $this->PanelPassword->Text)%></div>