File: InstallerDBmysql.tt

package info (click to toggle)
otrs2 5.0.16-1%2Bdeb9u6
  • links: PTS
  • area: non-free
  • in suites: stretch
  • size: 141,108 kB
  • sloc: perl: 746,356; xml: 54,469; sql: 10,505; sh: 430; makefile: 64
file content (139 lines) | stat: -rw-r--r-- 6,955 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

[% RenderBlockStart("DatabaseMySQL") %]
<div class="W950px SpacingTop SpacingBottom CenterBox">
    <form action="[% Env("CGIHandle") %]" method="post" id="FormDB" class="Validate PreventMultipleSubmits">
        <input type="hidden" name="Action"      value="Installer" />
        <input type="hidden" name="Subaction"   value="DBCreate" />
        <input type="hidden" name="DBType"      value="mysql" />
        <input type="hidden" name="InstallType" value="[% Data.InstallType | html %]" />

        <div class="WidgetSimple">
            <div class="Header">
                <h2>[% Translate(Data.Item) | html %] ([% Data.Step %])</h2>
            </div>

            <div class="Content">
                <fieldset class="TableLike">
                    <label for="DBUser">[% Translate("User") | html %]:</label>
                    <div class="Field">
                        <input type="text" id="DBUser" name="DBUser" value="[% Data.DefaultDBUser | html %]" class="W50pc" autocomplete="off" />
                    </div>
                    <div class="Clear"></div>

                    <label for="DBPassword">[% Translate("Password") | html %]:</label>
                    <div class="Field">
                        <input type="password" id="DBPassword" name="DBPassword" value="" class="W50pc" autocomplete="off" />
                        <p class="FieldExplanation">
                            [% Translate(Data.PasswordExplanation) | html %]
                        </p>
                    </div>
                    <div class="Clear"></div>

                    <label for="DBHost">[% Translate("Host") | html %]:</label>
                    <div class="Field">
                        <input type="text" id="DBHost" name="DBHost" value="[% Config("DatabaseHost") %]" class="W50pc" />
                    </div>
                    <div class="Clear"></div>

[% RenderBlockStart("DatabaseMySQLUseExisting") %]
                    <label for="DBName">[% Translate("Database name") | html %]:</label>
                    <div class="Field">
                        <input type="text" id="DBName" name="DBName" value="[% Config("Database") %]" class="W50pc" />
                    </div>
                    <div class="Clear"></div>
[% RenderBlockEnd("DatabaseMySQLUseExisting") %]

                    <div class="Field">
                        <button class="Primary CallForAction" type="button" id="ButtonCheckDB"><span>[% Translate("Check database settings") | html %]</span></button>
                    </div>
                    <div class="Clear"></div>
                </fieldset>

                <fieldset class="TableLike Hidden ErrorMsg">
                    <h4>[% Translate("Result of database check") | html %]</h4>

                    <div class="Field">
                        <p id="FormDBResultMessage" class="Error"></p>
                        <p id="FormDBResultComment" class="FieldExplanation"></p>
                    </div>
                    <div class="Clear"></div>
                </fieldset>

                <fieldset class="TableLike Hidden Success">
                    <h4>[% Translate("Result of database check") | html %]</h4>

                    <div class="Field Result">
                        <p><i class="fa fa-check"></i> [% Translate("Database check successful.") | html %]</p>
                    </div>

                    <div class="Clear"></div>
                </fieldset>

[% RenderBlockStart("DatabaseMySQLCreate") %]
                <fieldset class="TableLike Hidden HideMe">
                    <h4>
                        [% Translate("Database User") | html %] ([% Translate("New") | html %])
                    </h4>

                    <label for="OTRSDBUser">[% Translate("User") | html %]:</label>
                    <div class="Field">
                        <input type="text" id="OTRSDBUser" name="OTRSDBUser" value="[% Config("DatabaseUser") %]" class="W50pc" autocomplete="off" />
                        <p class="FieldExplanation">
                            [% Translate("A new database user with limited permissions will be created for this OTRS system.") | html %]
                        </p>
                    </div>
                    <div class="Clear"></div>

                    <label for="OTRSDBPassword">[% Translate("Password") | html %]:</label>
                    <div class="Field">
                        <input type="password" id="OTRSDBPassword" name="OTRSDBPassword" value="[% Data.Password | html %]"
                        class="W50pc Validate_Equal Validate_Equal_RepeatOTRSDBPassword" autocomplete="off" />
                    </div>
                    <div id="OTRSDBPasswordError" class="TooltipErrorMessage"><p>[% Translate("Passwords do not match") | html %]!</p></div>
                    <div class="Clear"></div>

                    <label for="RepeatOTRSDBPassword">[% Translate("Repeat Password") | html %]:</label>
                    <div class="Field">
                        <input type="password" id="RepeatOTRSDBPassword" name="RepeatOTRSDBPassword" value="[% Data.Password | html %]" class="W50pc" autocomplete="off" />
                        <p class="FieldExplanation">
                            [% Translate("Generated password") | html %]: <span class="Emphasis">[% Data.Password | html %]</span>
                        </p>
                    </div>
                    <div class="Clear"></div>
                    <h4>
                        [% Translate("Database") | html %]
                    </h4>

                    <label for="DBName">[% Translate("Database name") | html %]:</label>
                    <div class="Field">
                        <input type="text" id="DBName" name="DBName" value="[% Config("Database") %]" class="W50pc" />
                    </div>
                    <div class="Clear"></div>
                </fieldset>
[% RenderBlockEnd("DatabaseMySQLCreate") %]

                <div class="Spacing Right">
                    <button type="button" class="CallForAction" id="ButtonBack"><span>[% Translate("Back") | html %]</span></button>
                    <button class="Primary CallForAction Disabled HideMe" type="submit" id="FormDBSubmit" disabled><span>[% Translate("Next") | html %]</span></button>
                </div>
            </div>
        </div>
    </form>
</div>

[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#ButtonCheckDB').bind('click',Core.Installer.CheckDBData);
    $('#ButtonBack').bind('click', function() {
        parent.history.back();
    });
//]]></script>
[% END %]
[% RenderBlockEnd("DatabaseMySQL") %]