fix missing style and support page
This commit is contained in:
parent
45f875b3fb
commit
15c1a81831
10 changed files with 94 additions and 48 deletions
|
@ -83,6 +83,5 @@
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -5,7 +5,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<h3>{{ _('Вход') }}</h3>
|
<h2>{{ _('Вход') }}</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -8,18 +8,12 @@
|
||||||
<h2>Регистрация</h2>
|
<h2>Регистрация</h2>
|
||||||
<form action="{{ url_for('account.registration') }}" method="post">
|
<form action="{{ url_for('account.registration') }}" method="post">
|
||||||
<input type="hidden" name="method" value="member_add" />
|
<input type="hidden" name="method" value="member_add" />
|
||||||
<label for="email">
|
<label for="email">Адрес электронной почты</label>
|
||||||
Адрес ел. почты
|
<input type="text" name="email" value="" class="email" id="email" />
|
||||||
<input type="text" name="email" value="" class="email" id="email" />
|
<label for="password">Пароль</label>
|
||||||
</label>
|
<input type="password" name="password" value="" id="password" />
|
||||||
<label for="password">
|
<label for="password2">Пароль (повторно)</label>
|
||||||
Пароль
|
<input type="password" name="password2" value="" id="password2" />
|
||||||
<input type="password" name="password" value="" id="password" />
|
|
||||||
</label>
|
|
||||||
<label for="password2">
|
|
||||||
Пароль (повторно)
|
|
||||||
<input type="password" name="password2" value="" id="password2" />
|
|
||||||
</label>
|
|
||||||
<input type="submit" value="Зарегистрироваться" class="button success" />
|
<input type="submit" value="Зарегистрироваться" class="button success" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Облачный хостинг GoCloud</title>
|
<title>{% block title %}Облачный хостинг GoCloud{% endblock %}</title>
|
||||||
|
<meta name="description" content="{% block description %}GoCloud предлагает вам арендовать виртуальные серверные мощности{% endblock %}">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/app.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/app.css') }}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<h1>Облачный хостинг</h1>
|
<h1>Облачный хостинг</h1>
|
||||||
<h2>Виртуальный сервер от 200 рублей в месяц</h2>
|
<h2>Виртуальный сервер от 200 рублей в месяц</h2>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="{{ url_for('account.registration') }}" class="button success">Создать виртуальный сервер</a>
|
<a href="{{ url_for('account.registration') }}" class="button alert">Создать виртуальный сервер</a>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{% extends "gocloud2016/layouts/default.html" %}
|
{% extends "gocloud2016/layouts/default.html" %}
|
||||||
|
|
||||||
|
{% block title %}Стоимость аренды виртуального сервера - GoCloud{% endblock %}
|
||||||
|
|
||||||
|
{% block description %}Расценки на стоимость аренды виртуальных серверов различной конфигурации{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
|
|
30
SWSCloudWeb/templates/gocloud2016/pages/support/index.html
Normal file
30
SWSCloudWeb/templates/gocloud2016/pages/support/index.html
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{% extends "gocloud2016/layouts/default.html" %}
|
||||||
|
|
||||||
|
{% block title %}Поддержка онлайн виртуального сервера - GoCloud{% endblock %}
|
||||||
|
|
||||||
|
{% block description %}Наши технические специалисты ответят на ваши вопросы{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<h2>Поддержка</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<form action="{{ url_for('support.index_post') }}" method="post">
|
||||||
|
{% if not session['email'] %}
|
||||||
|
<label for="email">Адрес электронной почты</label>
|
||||||
|
<input type="text" name="email" id="email" />
|
||||||
|
{% else %}
|
||||||
|
<input type="hidden" name="email" value="{{ session['email'] }}" />
|
||||||
|
{% endif %}
|
||||||
|
<label for="subject">Заголовок</label>
|
||||||
|
<input type="text" name="subject" id="subject" />
|
||||||
|
<label for="message">Сообщение</label>
|
||||||
|
<textarea name="message" id="message" rows="7"></textarea>
|
||||||
|
<input type="submit" class="button success large" value="Отправить сообщение" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
21
SWSCloudWeb/templates/gocloud2016/pages/support/thanks.html
Normal file
21
SWSCloudWeb/templates/gocloud2016/pages/support/thanks.html
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{% extends "gocloud2016/layouts/default.html" %}
|
||||||
|
|
||||||
|
{% block title %}Поддержка онлайн виртуального сервера - GoCloud{% endblock %}
|
||||||
|
|
||||||
|
{% block description %}Наши технические специалисты ответят на ваши вопросы{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<h2>Поддержка</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<h3>Спасибо!</h3>
|
||||||
|
</div>
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<p>Спасибо за обращение в техническую поддержку. Мы ответим вам в кратчайшее время.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
|
@ -1,42 +1,38 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
|
import validators
|
||||||
|
from flask import Blueprint, g, redirect, render_template, request, url_for, flash
|
||||||
from SWSCloudCore.controllers.common import ControllerMessagesEmail
|
from SWSCloudCore.controllers.common import ControllerMessagesEmail
|
||||||
from flask import Blueprint
|
|
||||||
from flask import g
|
|
||||||
from flask import redirect
|
|
||||||
from flask import render_template
|
|
||||||
from flask import request
|
|
||||||
from flask import url_for
|
|
||||||
|
|
||||||
viewSupport = Blueprint('support', __name__, url_prefix='/support')
|
viewSupport = Blueprint('support', __name__, url_prefix='/support')
|
||||||
|
|
||||||
|
|
||||||
@viewSupport.route('/', methods=['GET', 'POST'])
|
@viewSupport.route('/', methods=['GET'])
|
||||||
def index():
|
def index():
|
||||||
# ControllerMessagesEmail().send()
|
return render_template('gocloud2016/pages/support/index.html')
|
||||||
# print session
|
|
||||||
|
|
||||||
if request.method == "POST":
|
|
||||||
print request.form
|
|
||||||
# TODO: validate
|
|
||||||
ticket_title = request.form['title']
|
|
||||||
ticket_message = request.form['message']
|
|
||||||
ticket_email = request.form['email']
|
|
||||||
|
|
||||||
# send mail message with recovery code
|
|
||||||
subject = ticket_title
|
|
||||||
message = ticket_message
|
|
||||||
lead = u'Отправитель: %s' % ticket_email
|
|
||||||
callout = u''
|
|
||||||
|
|
||||||
email = ControllerMessagesEmail()
|
|
||||||
# email.send(title=subject, to=ticket_email, lead=lead, message=message, callout=callout)
|
|
||||||
email.send(title=subject, to=g.settings['contacts.email'], lead=lead, message=message, callout=callout)
|
|
||||||
|
|
||||||
return redirect(url_for('support.thank'))
|
|
||||||
return render_template('default/support/index.html')
|
|
||||||
|
|
||||||
|
|
||||||
@viewSupport.route('/thank')
|
@viewSupport.route('/', methods=['POST'])
|
||||||
|
def index_post():
|
||||||
|
ticket_subject = request.form.get('subject')
|
||||||
|
ticket_message = request.form.get('message')
|
||||||
|
ticket_email = request.form.get('email')
|
||||||
|
|
||||||
|
if not validators.email(ticket_email):
|
||||||
|
flash('Некорректный адрес электронной почты', category='error')
|
||||||
|
return redirect(url_for('support.index'))
|
||||||
|
|
||||||
|
# send mail message with recovery code
|
||||||
|
lead = u'Отправитель: %s' % ticket_email
|
||||||
|
callout = u''
|
||||||
|
|
||||||
|
email = ControllerMessagesEmail()
|
||||||
|
# email.send(title=subject, to=ticket_email, lead=lead, message=message, callout=callout)
|
||||||
|
email.send(
|
||||||
|
title=ticket_subject, to=g.settings['contacts.email'], lead=lead, message=ticket_message, callout=callout)
|
||||||
|
return redirect(url_for('support.thank'))
|
||||||
|
|
||||||
|
|
||||||
|
@viewSupport.route('/thank.html')
|
||||||
def thank():
|
def thank():
|
||||||
return render_template('default/support/thank.html')
|
return render_template('gocloud2016/pages/support/thanks.html')
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='SWSCloudCore',
|
name='SWSCloudCore',
|
||||||
version='2.7.9',
|
version='2.7.10',
|
||||||
author='Vyacheslav Anzhiganov',
|
author='Vyacheslav Anzhiganov',
|
||||||
author_email='hello@anzhiganov.com',
|
author_email='hello@anzhiganov.com',
|
||||||
packages=[
|
packages=[
|
||||||
|
@ -90,6 +90,7 @@ setup(
|
||||||
'templates/gocloud2016/layouts/*.html',
|
'templates/gocloud2016/layouts/*.html',
|
||||||
'templates/gocloud2016/macros/*.html',
|
'templates/gocloud2016/macros/*.html',
|
||||||
'templates/gocloud2016/pages/*.html',
|
'templates/gocloud2016/pages/*.html',
|
||||||
|
'templates/gocloud2016/pages/*/*.html',
|
||||||
# Errors
|
# Errors
|
||||||
'templates/errors/*.html',
|
'templates/errors/*.html',
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Reference in a new issue