Files
CyberPanel/websiteFunctions/templates/websiteFunctions/createDomain.html
2024-09-27 15:00:23 +05:00

301 lines
14 KiB
HTML
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Create Sub/Addon Domain - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<style>
.switch {
margin-top: 7px;
margin-left: 12px;
position: relative;
display: inline-block;
width: 32px;
height: 19px;
border-radius: 10%;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
border-radius: 10%;
}
.slider:before {
position: absolute;
content: "";
height: 11px;
width: 12px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
border-radius: 20%;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 2px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(12px);
-ms-transform: translateX(12px);
transform: translateX(12px);
}
.help_test_domain {
background-color: black;
padding: 10px;
display: none;
opacity: 0.7;
position: absolute;
z-index: 9;
text-align: justify;
}
#help:hover + .help_test_domain {
display: block;
display: inline-block;
color: white;
font-weight: lighter;
font-size: small;
border-radius: 5px;
width: 200px;
{#height: auto;#}
}
</style>
<div class="container">
<div id="page-title">
<h2>{% trans "Create Sub/Addon Domain" %} - <a target="_blank"
href="https://cyberpanel.net/KnowledgeBase/home/create-sub-addon-domain/"
style="height: 23px;line-height: 21px;"
class="btn btn-border btn-alt border-red btn-link font-red"
title=""><span>{% trans "Learn about Sub/Addon Domains" %}</span></a></h2>
<p>{% trans "Create Sub/Addon domains. " %}</p>
</div>
<div ng-controller="websitePages" class="panel">
<div class="panel-body">
<h3 class="content-box-header">
{% trans "Details" %} <img ng-hide="domainLoading"
src="{% static 'images/loading.gif' %}">
</h3>
{% if defaultSite == 'NONE' %}
<div class="example-box-wrapper">
<div class="alert alert-danger">
<p>{% trans "You need to create website before creating Sub/Addon domains." %} </p>
</div>
</div>
{% else %}
<div class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages"
class="form-horizontal bordered-row panel-body">
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Domain Type" %} </label>
<div class="col-sm-6">
<select ng-change="WebsiteType()" ng-model="websitetype" class="form-control">
<option>Sub Domain</option>
<option>Addon Domain</option>
</select>
</div>
</div>
<span style="display: none" id="defaultSite">{{ defaultSite }}</span>
<div class="form-group" ng-hide="webselection">
<label class="col-sm-3 control-label">{% trans "Select Website" %} </label>
<div class="col-sm-6">
<select ng-change="WebsiteSelection()" ng-model="masterDomain" class="form-control">
{% for items in websiteList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
{# <div ng-hide="DomainCreateForm" class="form-group">#}
{# <label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>#}
{# <div class="col-sm-6">#}
{# <input name="dom" type="text" class="form-control"#}
{# ng-model="domainNameCreate" required>#}
{# </div>#}
{# </div>#}
{##}
{# <div ng-hide="DomainCreateForm" class="form-group">#}
{# <label class="col-sm-3 control-label">{% trans "Path" %}: /home/{$ masterDomain $}/ </label>#}
{# <div class="col-sm-6">#}
{# <input type="text" class="form-control" ng-model="docRootPath" required>#}
{# </div>#}
{# <div ng-show="websiteCreationForm.dom.$error.pattern"#}
{# class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>#}
{# </div>#}
{# My Work . #}
<div ng-hide="DomainCreateForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
<div class="col-sm-6">
<input name="dom" type="text" class="form-control"
ng-model="domainNameCreate" required>
</div>
</div>
<div ng-hide="DomainCreateForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Path" %}: /home/{$ masterDomain
$}/ </label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="docRootPath" required>
</div>
<div ng-show="websiteCreationForm.dom.$error.pattern"
class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
</div>
{# My Work End #}
<div ng-hide="DomainCreateForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Select PHP" %}</label>
<div class="col-sm-6">
<select ng-model="phpSelection" class="form-control">
{% for php in phps %}
<option>{{ php }}</option>
{% endfor %}
</select>
</div>
</div>
<div ng-hide="DomainCreateForm" ng-hide="installationDetailsForm"
class="form-group">
<label class="col-sm-3 control-label">{% trans "Additional Features" %}</label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="sslCheck" type="checkbox" value="">
SSL
</label>
</div>
</div>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
{% if test_domain_data %}
<input ng-model="apacheBackend" type="checkbox" value="">
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22, AlmaLinux 8 and AlmaLinux 9.)
{% else %}
<input ng-model="apacheBackend" type="checkbox" value="" disabled>
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22, AlmaLinux 8 and AlmaLinux 9.) -
<strong><a href="https://go.cyberpanel.net/ApacheRev">Premium
Feature</a> <i
class="p fa fa-external-link btn-icon"></i></strong>
{% endif %}
</label>
</div>
</div>
{# <label class="col-sm-3 control-label"></label>#}
{# <div class="col-sm-9">#}
{# <div class="checkbox">#}
{# <label>#}
{# <input ng-model="openBasedir" type="checkbox" value="">#}
{# open_basedir Protection#}
{# </label>#}
{# </div>#}
{# </div>#}
</div>
<div ng-hide="DomainCreateForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="createDomain()"
class="btn btn-primary btn-lg">{% trans "Create Domain" %}</button>
</div>
</div>
<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<div class="alert alert-success text-center">
<h2>{$ currentStatus $}</h2>
</div>
<div class="progress">
<div id="installProgress" class="progress-bar" role="progressbar"
aria-valuenow="70" aria-valuemin="0" aria-valuemax="100"
style="width:0%">
<span class="sr-only">70% Complete</span>
</div>
</div>
<div ng-hide="errorMessageBox" class="alert alert-danger">
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="success" class="alert alert-success">
<p>{% trans "Website succesfully created." %}</p>
</div>
<div ng-hide="couldNotConnect" class="alert alert-danger">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</div>
</div>
</div>
<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-disabled="goBackDisable" ng-click="goBack()"
class="btn btn-primary btn-lg">{% trans "Go Back" %}</button>
</div>
</div>
</form>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}