mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 23:36:11 +01:00
356 lines
17 KiB
HTML
Executable File
356 lines
17 KiB
HTML
Executable File
{% extends "baseTemplate/index.html" %}
|
|
{% load i18n %}
|
|
{% block title %}{% trans "Create New Website - 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 Website" %}</h2>
|
|
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
|
|
</div>
|
|
|
|
|
|
<div ng-controller="createWebsite" class="panel">
|
|
<div class="panel-body">
|
|
<h3 class="content-box-header">
|
|
{% trans "Website Details" %} <img ng-hide="webSiteCreationLoading"
|
|
src="{% static 'images/loading.gif' %}">
|
|
</h3>
|
|
<div class="example-box-wrapper">
|
|
|
|
<form name="websiteCreationForm" action="/" id="createPackages"
|
|
class="form-horizontal bordered-row panel-body">
|
|
|
|
<div ng-hide="installationDetailsForm" class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
|
|
<div class="col-sm-6">
|
|
<select ng-model="packageForWebsite" class="form-control">
|
|
{% for items in packageList %}
|
|
<option>{{ items }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div ng-hide="installationDetailsForm" class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
|
|
<div class="col-sm-6">
|
|
<select ng-model="websiteOwner" class="form-control">
|
|
{% for items in owernList %}
|
|
<option>{{ items }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
{# My Work #}
|
|
<div ng-hide="installationDetailsForm" class="form-group">
|
|
<label class="col-sm-3 control-label"
|
|
style="margin-bottom: 15px">{% trans "Test Domain" %}</label>
|
|
<label class="switch my-3">
|
|
<input type="checkbox" checked id="myCheck" onclick="website_create_checkbox_function()"
|
|
style="margin-top: 10px">
|
|
<span class="slider"></span>
|
|
</label>
|
|
|
|
<label id="help">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" style="padding-top: 10px"
|
|
preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
|
|
<path fill="currentColor"
|
|
d="M12 6a3.939 3.939 0 0 0-3.934 3.934h2C10.066 8.867 10.934 8 12 8s1.934.867 1.934 1.934c0 .598-.481 1.032-1.216 1.626a9.208 9.208 0 0 0-.691.599c-.998.997-1.027 2.056-1.027 2.174V15h2l-.001-.633c.001-.016.033-.386.441-.793c.15-.15.339-.3.535-.458c.779-.631 1.958-1.584 1.958-3.182A3.937 3.937 0 0 0 12 6zm-1 10h2v2h-2z"/>
|
|
<path fill="currentColor"
|
|
d="M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10s10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8s8 3.589 8 8s-3.589 8-8 8z"/>
|
|
</svg>
|
|
|
|
</label>
|
|
<label class="help_test_domain">
|
|
The test domain allows you to deploy websites without the need to add DNS records, it
|
|
allows you to create staging environments, deploy test websites, and much more...
|
|
|
|
</label>
|
|
<br><br>
|
|
|
|
|
|
<div id="Website_Create_Test_Domain" class="tabcontent"
|
|
style="border: none;margin-left: 10px">
|
|
<div ng-hide="installationDetailsForm" class="form-group"
|
|
ng-if="{{ test_domain_data }} == 1 ">
|
|
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
|
<div class="col-sm-6">
|
|
<div class="input-group bootstrap-touchspin">
|
|
<span
|
|
class="input-group-addon bootstrap-touchspin-prefix"
|
|
style="display: none;"></span>
|
|
<input id="TestDomainNameCreate"
|
|
class="form-control"
|
|
type="text" value=""
|
|
name="touchspin-demo-1"
|
|
style="display: block;"
|
|
placeholder="{% trans "Enter Subdomain Here" %}">
|
|
|
|
<span style="width: 48%" class="input-group-btn">
|
|
<input id="Part2_domainNameCreate" class="form-control"
|
|
type="text" name="Part2_domainNameCreate"
|
|
style="display: block;color: black;font-weight: bold;color: black;opacity: 1"
|
|
placeholder=".{{ Randam_String }}.cyberpanel.website"
|
|
value=".{{ Randam_String }}.cyberpanel.website" readonly></span>
|
|
</div>
|
|
</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>
|
|
<div ng-if="{{ test_domain_data }} == 0 ">
|
|
<center>Looks like you have not subscribed to temporary domain feature, <a
|
|
href="https://go.cyberpanel.net/TempDomain">click here</a>
|
|
for more details.
|
|
</center>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="Website_Create_Own_Domain" class="tabcontent"
|
|
style="border: none;display: none;margin-left: 10px">
|
|
|
|
<div ng-hide="installationDetailsForm" class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
|
<div class="col-sm-6">
|
|
<div class="input-group bootstrap-touchspin">
|
|
<span
|
|
class="input-group-addon bootstrap-touchspin-prefix"
|
|
style="display: none;"></span>
|
|
<input ng-model="own_domainNameCreate" id="touchspin-demo-1"
|
|
class="form-control"
|
|
type="text" value=""
|
|
name="touchspin-demo-1"
|
|
style="display: block;"
|
|
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}">
|
|
|
|
<span style="width: 25%" class="input-group-btn">
|
|
</span></div>
|
|
</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>
|
|
</div>
|
|
|
|
</div>
|
|
{# My Work End#}
|
|
{# #}
|
|
|
|
<div ng-hide="installationDetailsForm" class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "Email" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="email" name="email" class="form-control" ng-model="adminEmail" required>
|
|
</div>
|
|
<div ng-show="websiteCreationForm.email.$error.email"
|
|
class="current-pack">{% trans "Invalid Email" %}</div>
|
|
</div>
|
|
|
|
<div ng-hide="installationDetailsForm" 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="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>
|
|
<input ng-model="apacheBackend" type="checkbox" value="">
|
|
Apache as Reverse Proxy (for Ubuntu 22 and AlmaLinux 8)
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<label class="col-sm-3 control-label"></label>
|
|
<div class="col-sm-9">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input ng-model="dkimCheck" type="checkbox" value="">
|
|
DKIM Support
|
|
</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>
|
|
<label class="col-sm-3 control-label"></label>
|
|
<div class="col-sm-9">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input ng-model="mailDomain" type="checkbox" value="">
|
|
Create Mail Domain
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div ng-hide="installationDetailsForm" class="form-group">
|
|
<label class="col-sm-3 control-label"></label>
|
|
<div class="col-sm-4">
|
|
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.email.$invalid"
|
|
type="button" ng-click="createWebsite()"
|
|
class="btn btn-primary btn-lg">{% trans "Create Website" %}</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>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{% endblock %}
|