Viewing File: /usr/local/cpanel/base/frontend/jupiter/backup/wizard-restore-type.html.tt

[%
SET CPANEL.CPVAR.headerimg = "../images/tools.gif";
SET CPANEL.CPVAR.dprefix = "../";
%]

[% js_code = PROCESS js_block name = FORM.type %]

[% WRAPPER '_assets/master.html.tt'
    app_key = 'backup_wizard'
    include_legacy_stylesheets = 1
    include_legacy_scripts = 1
    include_cjt = 1
    page_js = js_code
    page_stylesheets = [
        "css2-min/backup.css"
    ]
    page_scripts     = [
        "libraries/handlebars/handlebars.js",
        "backup/index.js",
    ]
-%]

<div class="body-content">
    [% IF !CPANEL.feature('backup') %]
        <meta http-equiv="refresh" content="0;url=../index.html" />
    [% ELSE %]

        <div id="backup-nav" class="row">
            <div class="col-xs-12">
                <h2 id="hdrSteps">[% locale.maketext('Steps:') %]</h2>
                <ol>
                    <li id="tabBackupRestore" class="one"><a href="wizard.html" id="backupRestore"><span>[% locale.maketext("Back Up or Restore") %]</span></a></li>
                    <li id="tabFullPartial" class="two"><a href="wizard-restore.html" id="restoreType"><span>[% locale.maketext("Select Restore Type") %]</span></a></li>
                    <li id="tabRestore" class="three"><span class="current">[% locale.maketext("Restore") %]</span></li>
                </ol>
            </div>
        </div>

        <div id="br-wrap" class="row">

            <div class="col-xs-12">
                <h2 id="hdrFinalStep">[% locale.maketext("Final Step") %]</h2>
                <p id="descFinalStep">[% locale.maketext("Restore your backup.") %]</p>

                <div id="br-content-wide">
                    [% IF (FORM.type == "home") %]
                    <h4 id="restore-home-form-title">[% locale.maketext("Restore a Home Directory Backup") %]</h4>
                    <form id="restore-home-form">
                        [% PROCESS form name => FORM.type, %]
                    </form>
                    [% ELSIF (FORM.type == "db") %]
                    <h4 id="restore-db-form-title">[% locale.maketext("Restore a Database Backup") %]</h4>
                    <form id="restore-db-form">
                        [% PROCESS form name => FORM.type, %]
                    </form>
                    [% ELSIF (FORM.type == "forwarder") %]
                    <h4 id="restore-forwarder-form-title">[% locale.maketext("Restore an Email Forwarders Backup") %]</h4>
                    <form id="restore-forwarder-form">
                        [% PROCESS form name => FORM.type, %]
                    </form>
                    [% ELSIF (FORM.type == "filter") %]
                    <h4 id="restore-filter-form-title">[% locale.maketext("Restore an Email Filters Backup") %]</h4>
                    <form id="restore-filter-form">
                        [% PROCESS form name => FORM.type, %]
                    </form>
                    [% END %]
                </div>
            </div>
        </div>

        [% INCLUDE _assets/return_link.html.tt return_location="wizard-restore.html" return_link_text=locale.maketext("Go Back") %]

    [% END %]
</div>

<script type="text/x-handlebars-template" id="success-template">
    <div id="{{id}}" class="alert alert-success" role="alert">
        <button id="{{id}}-close" type="button"
            class="close" aria-label="[% locale.maketext('Close') %]">
            <span aria-hidden="true">&times;</span>
        </button>
        <span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>
        <div class="alert-message">
            <strong class="alert-title">[% locale.maketext('Success:') %]</strong>
            <span class="alert-body"><span id="{{id}}-message">{{message}}</span></span>
        </div>
    </div>
</script>

<script type="text/x-handlebars-template" id="error-template">
    <div id="{{id}}" class="alert alert-danger" role="alert">
        <button id="{{id}}-close" type="button"
            class="close" aria-label="[% locale.maketext('Close') %]">
            <span aria-hidden="true">&times;</span>
        </button>
        <span class="glyphicon glyphicon-remove-sign" aria-hidden="true"></span>
        <div class="alert-message">
            <strong class="alert-title">[% locale.maketext('Error:') %]</strong>
            <span class="alert-body"><span id="{{id}}-message">{{message}}</span></span>
            {{#if rest.length}}
            <p class="alert-more">
                <b>[% locale.maketext('Additional Information:') %]</b>
                <ul class="people_list">
                  {{#each rest}}
                  <li>{{this}}</li>
                  {{/each}}
                </ul>
            </p>
            {{/if}}
        </div>
    </div>
</script>
[% END %]

[% BLOCK form %]
<div class="form-group">
    <div id="restore-[% name %]-message-container" class="row">
        <div class="col-xs-12">
            <span id="restore-[% name %]-spinner" style="display:none">
              <i class="fas fa-spinner fa-spin"></i>
            </span>
            <span id="restore-[% name %]-message">
            </span>
        </div>
    </div>
    <div class="row" id="restore-[% name %]-fields">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <input type="hidden" value="[% CPANEL.homedir %]" name="dir" />
            <input type="file" id="restore-[% name %]-file" name="file1" />
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div id="restore-[% name %]-file_error"></div>
        </div>
    </div>
</div>
<div class="form-group">
    <button id="restore-[% name %]-submit-button"
            type="submit"
            class="btn btn-primary">
           [% locale.maketext("Upload") %]
    </button>
</div>
[% END %]


[% BLOCK js_block %]
<script type="text/javascript">
    [%
    SET polyfills = [
        theme_magic_url('libraries/promise/bluebird.core.min.js'),
        theme_magic_url('libraries/fetch/fetch.umd.min.js'),
    ];
    %]

    if (!PAGE) {
        PAGE = {};
    }
    PAGE.validationTitle = [% locale.maketext("Restore").json() %];
    PAGE.missingFile     = [% locale.maketext("You must select a file to restore.").json() %];

    PAGE.restoringDb         = [% locale.maketext('Restoring database …').json() %];
    PAGE.restoringHome       = [% locale.maketext('Restoring files …').json() %];
    PAGE.restoringFilters    = [% locale.maketext('Restoring email filters …').json() %];
    PAGE.restoringForwarders = [% locale.maketext('Restoring email forwarders …').json() %];

    PAGE.session         = [% CPANEL.ENV.cp_security_token.json() %];
    PAGE.polyfills       = [% polyfills.json() %];
</script>
[% END %]
Back to Directory