Improved WordPress installation process.

This commit is contained in:
usmannasir
2018-07-13 04:26:40 +05:00
parent 7184373aa9
commit eb3bd4844f
27 changed files with 1291 additions and 195 deletions

View File

@@ -0,0 +1,62 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Application Installer - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2 id="domainNamePage">{% trans "Application Installer" %}</h2>
<p>{% trans "One-click application install." %}</p>
</div>
<div class="example-box-wrapper">
<div style="border-radius: 25px;border-color:#3498db" class="content-box">
<h3 class="content-box-header bg-blue">
{% trans "Application Installer" %} <img ng-hide="applicationInstallerLoading" src="/static/images/loading.gif">
</h3>
<div class="content-box-wrapper">
<div class="row">
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache' %}">
<div class="col-md-4" style="margin-bottom: 2%;">
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache' %}">
<img src="{% static 'images/icons/wordpress.png' %}">
</a>
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache' %}">
<span style='font-size: 21px;font-family: "Times New Roman", Times, serif; padding-left: 2%'>{% trans "Wordpress with LSCache" %}</span>
</a>
</div>
</a>
<a ng-click="installationDetailsJoomla()" href="" title="{% trans 'Install Joomla with(?) LSCache' %}">
<div class="col-md-4" style="margin-bottom: 2%;">
<a ng-click="installationDetailsJoomla()" href="" title="{% trans 'Install Joomla with LSCache' %}">
<img src="{% static 'images/icons/joomla-logo.png' %}">
</a>
<a ng-click="installationDetailsJoomla()" href="" title="{% trans 'Install Joomla with LSCache' %}">
<span style='font-size: 21px;font-family: "Times New Roman", Times, serif; padding-left: 2%'>{% trans "Joomla" %}</span>
</a>
</div>
</a>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -51,7 +51,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
<div class="col-sm-6">
<input ng-pattern="/*/i" name="dom" type="text" class="form-control" ng-model="domainNameCreate" placeholder="{% trans "Do not enter WWW, it will be auto created!" %}" required>
<input name="dom" type="text" class="form-control" ng-model="domainNameCreate" placeholder="{% trans "Do not enter WWW, it will be auto created!" %}" 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>
@@ -115,7 +115,7 @@
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.dom.$error.pattern || websiteCreationForm.email.$invalid" type="button" ng-click="createWebsite()" class="btn btn-primary btn-lg btn-block">{% trans "Create Website" %}</button>
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.email.$invalid" type="button" ng-click="createWebsite()" class="btn btn-primary btn-lg btn-block">{% trans "Create Website" %}</button>
</div>
</div>

View File

@@ -0,0 +1,127 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Install WordPress - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Install WordPress" %}</h2>
<p>{% trans "Install WordPress with LSCache." %}</p>
</div>
<div ng-controller="installWordPressCTRL" class="panel">
<div class="panel-body">
<h3 class="title-hero">
<span id="domainNamePage">{{ domainName }}</span> - {% trans "Installation Details" %} <img ng-hide="wpInstallLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Blog Title" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="blogTitle" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Login User" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="adminUser" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Login Password" %}</label>
<div class="col-sm-6">
<input type="password" class="form-control" ng-model="adminPassword" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Email" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="adminEmail" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Path" %}</label>
<div class="col-sm-6">
<input placeholder="Leave emtpy to install in website home directory. (Without preceding slash)" type="text" class="form-control" ng-model="installPath">
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="installWordPress()" class="btn btn-primary btn-lg btn-block">{% trans "Install Now" %}</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="installationFailed" class="alert alert-danger">
<p>{% trans "Installation failed. Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="installationSuccessfull" class="alert alert-success">
<p>{% trans "Installation successful. Visit:" %} {$ installationURL $}</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 btn-block">{% trans "Go Back" %}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -940,10 +940,10 @@
<div class="col-md-4" style="margin-bottom: 2%;">
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache' %}">
<a href="{$ wordPressInstallURL $}" target="_blank" title="{% trans 'Install wordpress with LSCache' %}">
<img src="{% static 'images/icons/wordpress.png' %}">
</a>
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache' %}">
<a href="{$ wordPressInstallURL $}" target="_blank" title="{% trans 'Install wordpress with LSCache' %}">
<span style='font-size: 21px;font-family: "Times New Roman", Times, serif; padding-left: 2%'>{% trans "Wordpress with LSCache" %}</span>
</a>