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:Application.Portlets.BButton CommandName="Cancel" Text="<%[ Cancel ]%>" /></com:TPanel>
38 <div <%=$this->getPage()->firstRun === false ? 'class="button-prev-next"' : ''%>><com:Application.Portlets.BButton CommandName="NextStep" Text="<%[ Next » ]%>" /></div>
39 </prop:StartNavigationTemplate>
41 <prop:StepNavigationTemplate>
42 <com:TPanel CssClass="button-cancel" Visible="<%=$this->getPage()->firstRun === false%>"><com:Application.Portlets.BButton CommandName="Cancel" Text="<%[ Cancel ]%>" /></com:TPanel>
43 <div <%=$this->getPage()->firstRun === false ? 'class="button-prev-next"' : ''%>>
44 <com:Application.Portlets.BButton CausesValidation="False" CommandName="PreviousStep" Text="<%[ « Previous ]%>" />
45 <com:Application.Portlets.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:Application.Portlets.BButton CommandName="Cancel" Text="<%[ Cancel ]%>" /></com:TPanel>
51 <div <%=$this->getPage()->firstRun === false ? 'class="button-prev-next"' : ''%>>
52 <com:Application.Portlets.BButton CausesValidation="False" CommandName="PreviousStep" Text="<%[ « Previous ]%>" />
53 <com:Application.Portlets.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:TActiveDropDownList>
64 <com:TCompareValidator CssClass="validator" Display="Dynamic" ControlToValidate="Lang" DataType="String" ValueToCompare="none" Operator="NotEqual" Text="<%[ Please select language. ]%>" />
68 <com:TWizardStep ID="Step2" Title="<%[ Step 2 - acceptance of a license ]%>" StepType="Auto">
69 <div id="licence"><com:TLabel ID="Licence" /></div>
70 <div id="licence-agree">
71 <com:TCheckBox ID="LicenceAgree" Checked="<%=$this->getPage()->firstRun === false || $this->LicenceAgree->Checked === true%>" />
72 <com:TLabel ForControl="LicenceAgree" Text="<%[ I have read the license terms and agree to ]%>" /><br />
73 <com:TRequiredFieldValidator CssClass="validator" ControlToValidate="LicenceAgree" FocusOnError="true" Display="Dynamic" Text="<%[ Need to move on to accept the license. ]%>" />
76 <com:TWizardStep ID="Step3" Title="<%[ Step 3 - params of Bacula database connection ]%>" StepType="Auto">
77 <com:TActivePanel ID="Step2Content">
79 <div class="text"><com:TLabel ForControl="DBType" Text="<%[ Database type: ]%>" /></div>
81 <com:TActiveDropDownList ID="DBType" CssClass="textbox" Width="170px" OnLoad="setDBType" OnTextChanged="setDBType" CausesValidation="false" OnCallback="renderPanel">
82 <com:TListItem Value="none" Text="<%[ select database ]%>" />
83 <com:TListItem Value="pgsql" Text="PostgreSQL" />
84 <com:TListItem Value="mysql" Text="MySQL" />
85 <com:TListItem Value="sqlite" Text="SQLite" />
86 </com:TActiveDropDownList>
87 <com:TCompareValidator CssClass="validator" Display="Dynamic" ControlToValidate="DBType" DataType="String" ValueToCompare="none" Operator="NotEqual" Text="<%[ Please select database type. ]%>" />
92 <div class="text"><com:TLabel ForControl="DBName" Text="<%[ Database name: ]%>" /></div>
94 <com:TTextBox ID="DBName" CssClass="textbox" />
95 <com:TRequiredFieldValidator CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="DBName" Text="<%[ Please enter database name. ]%>" />
99 <div class="text"><com:TLabel ForControl="Login" Text="<%[ Login: ]%>" /></div>
101 <com:TActiveTextBox ID="Login" CssClass="textbox" />
102 <com:TRequiredFieldValidator ID="LoginValidator" CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="Login" Text="<%[ Please enter login. ]%>" />
106 <div class="text"><com:TLabel ForControl="Password" Text="<%[ Password: ]%>" /></div>
107 <div class="field"><com:TActiveTextBox ID="Password" CssClass="textbox" TextMode="Password" PersistPassword="true" /></div>
110 <div class="text"><com:TLabel ForControl="IP" Text="<%[ IP address (or hostname): ]%>" /></div>
112 <com:TActiveTextBox ID="IP" CssClass="textbox" />
113 <com:TRequiredFieldValidator ID="IPValidator" CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="IP" Text="<%[ Please enter IP address or hostname. ]%>" />
117 <div class="text"><com:TLabel ForControl="Port" Text="<%[ Port: ]%>" /></div>
119 <com:TActiveTextBox ID="Port" CssClass="textbox" Width="55px" MaxLength="5" Enabled="false" />
120 <com:TRequiredFieldValidator ID="PortValidator" CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="Port" Text="<%[ Please enter database port. ]%>" />
123 <com:TActivePanel ID="DBPathField" CssClass="line" Display="<%=$this->getPage()->firstRun === false && !$this->IsCallBack && $this->getPage()->applicationConfig['db']['type'] == 'sqlite' ? 'Fixed' : $this->DBPathField->Display%>">
124 <div class="text"><com:TLabel ForControl="DBPath" Text="<%[ SQLite database path: ]%>" /></div>
126 <com:TActiveTextBox ID="DBPath" CssClass="textbox" Enabled="false" />
127 <com:TRequiredFieldValidator ID="DBPathValidator" Display="Dynamic" CssClass="validator" ControlCssClass="invalidate" ControlToValidate="DBPath" Text="<%[ Please enter database path. ]%>" />
131 <div class="text"><com:TLabel ForControl="ConnectionTest" Text="<%[ Connection test: ]%>" /></div>
133 <table border="0" cellpadding="1px">
135 <td align="center" valign="middle">
136 <com:TActiveButton ID="ConnectionTest" Text="<%[ test ]%>" CausesValidation="false" OnCallback="connectionDBTest">
137 <prop:ClientSide.OnLoading>
138 Element.hide('<%=$this->DbTestResultOk->ClientID%>');
139 Element.hide('<%=$this->DbTestResultErr->ClientID%>');
140 Element.show('<%=$this->DbTestLoader->ClientID%>');
141 </prop:ClientSide.OnLoading>
142 <prop:ClientSide.OnComplete>
143 Element.hide('<%=$this->DbTestLoader->ClientID%>');
144 </prop:ClientSide.OnComplete>
147 <td align="center" valign="middle">
148 <com:TActiveLabel ID="DbTestLoader" Display="None"><img src="<%=$this->getTheme()->getBaseUrl()%>/ajax-loader.gif" alt="<%[ Loading... ]%>" /></com:TActiveLabel>
149 <com:TActiveLabel ID="DbTestResultOk" Display="None" CssClass="validate"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_ok.png" alt="Validate" /> <%[ OK ]%></com:TActiveLabel>
150 <com:TActiveLabel ID="DbTestResultErr" Display="None" CssClass="validator"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_err.png" alt="Invalidate" /> <%[ Connection error ]%></com:TActiveLabel>
156 <com:TPanel Style="clear: left" />
159 <com:TWizardStep ID="Step4" Title="<%[ Step 4 - Baculum access to bconsole ]%>" StepType="Auto">
160 <com:TActivePanel ID="Step4Content">
162 <div class="text"><com:TLabel ForControl="BconsolePath" Text="<%[ Bconsole binary file path: ]%>" /></div>
164 <com:TTextBox ID="BconsolePath" CssClass="textbox" CausesValidation="false" />
165 <com:TRequiredFieldValidator CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="BconsolePath" Text="<%[ Please enter bconsole path. ]%>" />
169 <div class="text"><com:TLabel ForControl="BconsoleConfigPath" Text="<%[ Bconsole admin config file path: ]%>" /></div>
171 <com:TTextBox ID="BconsoleConfigPath" CssClass="textbox" CausesValidation="false" />
172 <com:TRequiredFieldValidator CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="BconsoleConfigPath" Text="<%[ Please enter bconsole config file path. ]%>" />
176 <div class="text"><com:TLabel ForControl="UseSudo" Text="<%[ Use sudo: ]%>" /></div>
178 <com:TCheckBox ID="UseSudo" />
182 <div class="text"><com:TLabel ForControl="BconsoleConnectionTest" Text="<%[ Bconsole connection test: ]%>" /></div>
184 <table border="0" cellpadding="1px">
186 <td align="center" valign="middle">
187 <com:TActiveButton ID="BconsoleConnectionTest" Text="<%[ test ]%>" CausesValidation="false" OnCallback="connectionBconsoleTest">
188 <prop:ClientSide.OnLoading>
189 Element.hide('<%=$this->BconsoleTestResultOk->ClientID%>');
190 Element.hide('<%=$this->BconsoleTestResultErr->ClientID%>');
191 Element.show('<%=$this->BconsoleTestLoader->ClientID%>');
192 </prop:ClientSide.OnLoading>
193 <prop:ClientSide.OnComplete>
194 Element.hide('<%=$this->BconsoleTestLoader->ClientID%>');
195 </prop:ClientSide.OnComplete>
198 <td align="center" valign="middle">
199 <com:TActiveLabel ID="BconsoleTestLoader" Display="None"><img src="<%=$this->getTheme()->getBaseUrl()%>/ajax-loader.gif" alt="<%[ Loading... ]%>" /></com:TActiveLabel>
200 <com:TActiveLabel ID="BconsoleTestResultOk" Display="None" CssClass="validate"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_ok.png" alt="Validate" /> <%[ OK ]%></com:TActiveLabel>
201 <com:TActiveLabel ID="BconsoleTestResultErr" Display="None" CssClass="validator"><img src="<%=$this->getTheme()->getBaseUrl()%>/icon_err.png" alt="Invalidate" /> <%[ Connection error ]%></com:TActiveLabel>
208 <p><b><%[ NOTE! ]%></b><br /><em><%[ Baculum needs access to bconsole by the web server. ]%></em></p>
212 <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>
215 <p><%[ If there is used only one Baculum user then below field value will be ignored. ]%></p>
218 <div class="text"><com:TLabel ForControl="BconsoleConfigCustomPath" Text="<%[ Bconsole custom config file path: ]%>" /></div>
220 <com:TTextBox ID="BconsoleConfigCustomPath" CssClass="textbox" CausesValidation="false" />
221 <com:TRequiredFieldValidator CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="BconsoleConfigCustomPath" Text="<%[ Please enter bconsole custom config file path. ]%>" />
225 <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" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="PanelLogin" Text="<%[ Please enter login. ]%>" />
238 <div class="text"><com:TLabel ForControl="PanelPassword" Text="<%[ Administration password: ]%>" /></div>
240 <com:TTextBox ID="PanelPassword" CssClass="textbox" TextMode="Password" MaxLength="30" PersistPassword="true" />
241 <com:TRequiredFieldValidator CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="PanelPassword" Text="<%[ Please enter password. ]%>"/>
242 <com:TRegularExpressionValidator CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="PanelPassword" RegularExpression="[\w\s]{5,30}" Text="<%[ Password must be longer than 4 chars. ]%>" />
246 <div class="text"><com:TLabel ForControl="RetypePanelPassword" Text="<%[ Retype administration password: ]%>" /></div>
248 <com:TTextBox ID="RetypePanelPassword" CssClass="textbox" TextMode="Password" MaxLength="30" PersistPassword="true" />
249 <com:TRequiredFieldValidator ID="RetypePasswordRequireValidator" CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="RetypePanelPassword" Text="<%[ Please enter retype password. ]%>"/>
250 <com:TRegularExpressionValidator ID="RetypePasswordRegexpValidator" CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="RetypePanelPassword" RegularExpression="[\w\s]{5,30}" Text="<%[ Password must be longer than 4 chars. ]%>" />
251 <com:TCustomValidator ID="RetypePasswordCustomValidator" CssClass="validator" Display="Dynamic" ControlCssClass="invalidate" ControlToValidate="RetypePanelPassword" OnServerValidate="validateAdministratorPassword" Text="<%[ Passwords must be the same. ]%>" />
255 <p><b><%[ NOTE! ]%></b><br /><em><%[ Above administration login and administration password should be the same as login params defined in Web Server authorization file. They are HTTP Basic authorization params by using which you have logged in to this wizard. ]%></em></p>
258 <com:TWizardStep ID="Step6" Title="<%[ Step 6 - Finish ]%>" StepType="Finish">
260 <legend><%[ Database parameters ]%></legend>
262 <div class="text"><%[ Database type: ]%></div>
263 <div class="field bold"><%=$this->getModule('configuration')->getDbNameByType($this->DBType->SelectedValue)%></div>
266 <div class="text"><%[ Database name: ]%></div>
267 <div class="field bold"><%=$this->DBName->Text%></div>
270 <div class="text"><%[ Login: ]%></div>
271 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? $this->Login->Text : '-'%></div>
274 <div class="text"><%[ Password: ]%></div>
275 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? preg_replace('/.{1}/', '*', $this->Password->Text) : '-'%></div>
278 <div class="text"><%[ IP address (or hostname): ]%></div>
279 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? $this->IP->Text : '-'%></div>
282 <div class="text"><%[ Database port: ]%></div>
283 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === false ? $this->Port->Text : '-'%></div>
286 <div class="text"><%[ Database file path (SQLite only): ]%></div>
287 <div class="field bold"><%=$this->getModule('configuration')->isSQLiteType($this->DBType->SelectedValue) === true ? $this->DBPath->Text : '-'%></div>
291 <legend><%[ Bconsole access ]%></legend>
293 <div class="text"><%[ Bconsole binary file path: ]%></div>
294 <div class="field bold"><%=$this->BconsolePath->Text%></div>
297 <div class="text"><%[ Bconsole admin config file path: ]%></div>
298 <div class="field bold"><%=$this->BconsoleConfigPath->Text%></div>
301 <div class="text"><%[ Bconsole custom config file path: ]%></div>
302 <div class="field bold"><%=$this->BconsoleConfigCustomPath->Text%></div>
305 <div class="text"><%[ Use sudo for bconsole requests: ]%></div>
306 <div class="field bold"><%=($this->UseSudo->Checked === true) ? 'yes' : 'no'%></div>
310 <legend><%[ Authorization to Baculum panel ]%></legend>
312 <div class="text"><%[ Administration login: ]%></div>
313 <div class="field bold"><%=$this->PanelLogin->Text%></div>
316 <div class="text"><%[ Administration password: ]%></div>
317 <div class="field bold"><%=preg_replace('/.{1}/', '*', $this->PanelPassword->Text)%></div>