Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/set_zone_ttls/index.tmpl

[%
# cpanel - whostmgr/docroot/templates/set_zone_ttls/index.tmpl
#                                                  Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

    USE Whostmgr;
    USE JSON;

    SET PAGE_BASE = base_path;
    SET PAGE_NAME = Whostmgr.get_page_name_by_url(PAGE_BASE);

    WRAPPER 'master_templates/master.tmpl'
        header         = locale.makevar(PAGE_NAME),
        breadcrumburl  = PAGE_BASE,
        base           = PAGE_BASE,
        CJT2_EXCLUSIVE = 1,
        theme          = 'bootstrap',
        app_key        = 'set_zone_time_to_live_ttl'
        extrastyle = '
.ng-dirty input.ng-dirty.ng-valid:not(.no-validation-border) {
    border-color: #ccc;
}
.ng-dirty input.ng-dirty.ng-valid:not(.no-validation-border):focus {
    border-color: #66afe9;
}
.page-stats {
    margin-bottom: 20px;
}
.panel {
    margin-bottom: 10px;
}
.select-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.select-list-item {
    border-top: 1px solid #ddd;
    padding: 4px 8px;
}
.select-list-item:nth-child(odd) {
    background-color: #f9f9f9;
}
';
%]
<div id="content"
    ng-controller="listZones"
    class="ng-cloak section"
    ng-cloak>
<form action="[% ui.action %]" name="secform">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
            <label for="domainselect">[% locale.maketext("Select zone(s) to update:") %]</label>
            <div class="form-group">
                <search id="zoneSearchFilter"
                    ng-model="filterValue"
                    class="no-validation-border"
                    ng-change="searchFilterChanged()"></search>
            </div>
            <div id="zonechoice" class="form-group panel panel-default" >
                <div id="zoneChoiceViewport"
                    class="panel-body" ui-scroll-viewport style="overflow-anchor: none; overflow-y: auto; display: block; padding:0; height:300px;">
                    <ul class="select-list">
                        <li class="select-list-item"
                            ui-scroll="zone in zonesDatasource"
                            adapter="uiScrollAdapter"
                            start-index="0">
                            <div class="checkbox" style="margin:0">
                                <label style="display:block;margin:0">
                                    <input
                                        ng-model="selectedItems[zone]"
                                        ng-change="onSelectItem(zone)"
                                        name="p"
                                        type="checkbox"
                                        value="{{ :: zone }}">
                                    <span ng-bind=":: zone"></span>
                                </label>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <p class="page-stats" ng-bind="showingText"></p>
            <input type="hidden" name="domainselect" ng-repeat="(key, value) in selectedItems" value="{{key}}" ng-if="key">
        </div>
    </div>

    <div class="row ng-hide" ng-show="hasZones">
        <div id="atLeastOneZoneError" class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <ul class="validation-container ng-hide" ng-show="showSelectionValidationMsg">
                <li class="validation validation-error">
                    <span class="glyphicon glyphicon-exclamation-sign"></span>
                    <span class="validation-message">[% locale.maketext('You must specify at least one zone.') %]</span>
                </li>
            </ul>
        </div>
    </div>

    <div class="form-group">
        <div class="row">
            <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                <label for="newttl">[% locale.maketext("New [output,acronym,TTL,Time To Live]:") %]</label>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                <input type="text"
                    class="form-control"
                    name="newttl"
                    id="newttl"
                    ng-model="ttl"
                    required
                    positive-integer />
                <span class="help-block">[% locale.maketext("The default [output,acronym,TTL,Time to Live] is [quant,_1,second,seconds].", 14400) %]</span>
            </div>
            <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                <ul validation-container field-name="newttl">
                    <validation-item
                        field-name="newttl"
                        validation-name="required">[% locale.maketext("This field is required.") %]</validation-item>
                </ul>
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="checkbox">
            <label>
                <input type="checkbox" name="synczones" id="synczones" value="1" />
                <span>[% locale.maketext("Do [output,strong,not] synchronize changes across the [output,acronym,DNS,Domain Name Service] cluster.") %]</span>
            </label>
        </div>
    </div>
    <div class="form-group">
        <input type="submit"
            id="submit"
            class="btn btn-primary"
            value="[% locale.maketext('Set TTLs') %]"
            ng-click="validateForm($event, secform)"/>
    </div>
</form>
</div>

<script type="text/javascript">
    var PAGE = window.PAGE || {};
    PAGE.domains = [% data.dnslist.json() -%];
</script>

[% PROCESS 'master_templates/cjt2_header_include.tt' %]

[% END -%]
Back to Directory File Manager