97 lines
4.8 KiB
Twig
97 lines
4.8 KiB
Twig
{% extends 'superadmin/layout.twig' %}
|
||
|
||
{% block content %}
|
||
<div class="sa-header">
|
||
<h1>Редактирование тарифа: {{ plan.name }}</h1>
|
||
<a href="{{ base_url('/superadmin/plans') }}" class="btn btn-primary">← Назад</a>
|
||
</div>
|
||
|
||
<div class="sa-card">
|
||
<div class="sa-card-body">
|
||
<form action="{{ base_url('/superadmin/plans/update/' ~ plan.id) }}" method="post">
|
||
{{ csrf_field()|raw }}
|
||
|
||
<div class="grid-2">
|
||
<div class="form-group">
|
||
<label for="name">Название тарифа *</label>
|
||
<input type="text" name="name" id="name" class="form-control" value="{{ plan.name }}" required>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="price">Цена *</label>
|
||
<input type="number" name="price" id="price" class="form-control" value="{{ plan.price }}" step="0.01" min="0" required>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="description">Описание</label>
|
||
<textarea name="description" id="description" class="form-control" rows="3">{{ plan.description|default('') }}</textarea>
|
||
</div>
|
||
|
||
<div class="grid-2">
|
||
<div class="form-group">
|
||
<label for="currency">Валюта</label>
|
||
<select name="currency" id="currency" class="form-control">
|
||
<option value="RUB" {{ plan.currency == 'RUB' ? 'selected' : '' }}>Рубль (RUB)</option>
|
||
<option value="USD" {{ plan.currency == 'USD' ? 'selected' : '' }}>Доллар (USD)</option>
|
||
<option value="EUR" {{ plan.currency == 'EUR' ? 'selected' : '' }}>Евро (EUR)</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="billing_period">Период оплаты</label>
|
||
<select name="billing_period" id="billing_period" class="form-control">
|
||
<option value="monthly" {{ plan.billing_period == 'monthly' ? 'selected' : '' }}>Ежемесячно</option>
|
||
<option value="yearly" {{ plan.billing_period == 'yearly' ? 'selected' : '' }}>Ежегодно</option>
|
||
<option value="quarterly" {{ plan.billing_period == 'quarterly' ? 'selected' : '' }}>Ежеквартально</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="grid-2">
|
||
<div class="form-group">
|
||
<label for="max_users">Максимум пользователей *</label>
|
||
<input type="number" name="max_users" id="max_users" class="form-control" value="{{ plan.max_users }}" min="1" required>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="max_clients">Максимум клиентов *</label>
|
||
<input type="number" name="max_clients" id="max_clients" class="form-control" value="{{ plan.max_clients }}" min="1" required>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="max_storage">Максимум хранилища (ГБ) *</label>
|
||
<input type="number" name="max_storage" id="max_storage" class="form-control" value="{{ plan.max_storage }}" min="1" required>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="features">Возможности (каждая с новой строки)</label>
|
||
<textarea name="features_list" id="features" class="form-control" rows="5" placeholder="Неограниченные проекты Приоритетная поддержка Экспорт в PDF">{% if plan.features is iterable %}{% for feature in plan.features %}
|
||
{{ feature }}{% endfor %}{% endif %}</textarea>
|
||
</div>
|
||
|
||
<div class="grid-2">
|
||
<div class="form-group">
|
||
<label>
|
||
<input type="checkbox" name="is_active" value="1" {{ plan.is_active ? 'checked' : '' }}>
|
||
Активен (доступен для выбора)
|
||
</label>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label>
|
||
<input type="checkbox" name="is_default" value="1" {{ plan.is_default ? 'checked' : '' }}>
|
||
Тариф по умолчанию
|
||
</label>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<button type="submit" class="btn btn-success btn-block">Сохранить изменения</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
{% endblock %}
|