2018-01-22 15:22:19 +00:00
|
|
|
{% extends "base.html" %}
|
2018-08-18 11:41:59 +00:00
|
|
|
{% set active_page = "admin_domain_template" %}
|
2023-02-18 14:04:37 +00:00
|
|
|
{% block title %}<title>Create Template - {{ SITE_NAME }}</title>{% endblock %}
|
2018-01-22 15:22:19 +00:00
|
|
|
|
|
|
|
{% block dashboard_stat %}
|
2023-02-18 14:04:37 +00:00
|
|
|
<!-- Content Header (Page header) -->
|
|
|
|
<section class="content-header">
|
|
|
|
<h1>
|
|
|
|
Template
|
|
|
|
<small>Create</small>
|
|
|
|
</h1>
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li><a href="{{ url_for('admin.templates') }}"><i class="fa fa-dashboard"></i> Templates</a></li>
|
|
|
|
<li class="active">Create</li>
|
|
|
|
</ol>
|
|
|
|
</section>
|
2018-01-22 15:22:19 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<section class="content">
|
2023-02-18 14:04:37 +00:00
|
|
|
{% with errors = get_flashed_messages(category_filter=["error"]) %} {%
|
|
|
|
if errors %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="alert alert-danger alert-dismissible">
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
|
|
<h4>
|
|
|
|
<i class="icon fa fa-ban"></i> Error!
|
|
|
|
</h4>
|
|
|
|
<div class="alert-message block-message error">
|
|
|
|
<a class="close" href="#">x</a>
|
|
|
|
<ul>
|
|
|
|
{%- for msg in errors %}
|
|
|
|
<li>{{ msg }}</li> {% endfor -%}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %} {% endwith %}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<h3 class="box-title">Create new template</h3>
|
|
|
|
</div>
|
|
|
|
<!-- /.box-header -->
|
|
|
|
<!-- form start -->
|
|
|
|
<form role="form" method="post" action="{{ url_for('admin.create_template') }}">
|
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
|
|
|
<div class="box-body">
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="text" class="form-control" name="name" id="name"
|
|
|
|
placeholder="Enter a valid template name (required)">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="text" class="form-control" name="description" id="description"
|
|
|
|
placeholder="Enter a template description (optional)">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box-footer">
|
|
|
|
<button type="submit" class="btn btn-flat btn-primary">Submit</button>
|
|
|
|
<button type="button" class="btn btn-flat btn-default"
|
|
|
|
onclick="window.location.href='{{ url_for('admin.templates') }}'">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<!-- /.box -->
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<h3 class="box-title">Help with creating a new template</h3>
|
|
|
|
</div>
|
|
|
|
<div class="box-body">
|
|
|
|
<dl class="dl-horizontal">
|
|
|
|
<dt>Template name</dt>
|
|
|
|
<dd>Enter your template name, this is the name of the template that
|
|
|
|
will be shown to users. The name should not have any spaces but
|
|
|
|
can have symbols.</dd>
|
|
|
|
<dt>Template description</dt>
|
|
|
|
<dd>Enter your template description, this is to help better
|
|
|
|
identify the template.</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-22 15:22:19 +00:00
|
|
|
</section>
|
|
|
|
{% endblock %}
|
|
|
|
{% block extrascripts %}
|
|
|
|
<script>
|
2023-02-18 14:04:37 +00:00
|
|
|
$("input[name=radio_type]").change(function () {
|
|
|
|
var type = $(this).val();
|
|
|
|
if (type == "slave") {
|
|
|
|
$("#domain_master_address_div").show();
|
|
|
|
} else {
|
|
|
|
$("#domain_master_address_div").hide();
|
|
|
|
}
|
|
|
|
});
|
2018-01-22 15:22:19 +00:00
|
|
|
</script>
|
|
|
|
{% endblock %}
|