Stable
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
{% extends 'layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<form method="post" action="{{ path('urbackup_server_save') }}">
|
||||
<table class="tab_cadre_fixe">
|
||||
<tr>
|
||||
<th colspan="4">{{ __('UrBackup server', 'urbackup') }}</th>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Name') }}</td>
|
||||
<td>
|
||||
<input type="text" name="name" value="{{ server.name ?? '' }}" size="40">
|
||||
</td>
|
||||
<td>{{ __('Active') }}</td>
|
||||
<td>
|
||||
<select name="is_active">
|
||||
<option value="1"{% if server.is_active ?? true %} selected{% endif %}>{{ __('Yes') }}</option>
|
||||
<option value="0"{% if not (server.is_active ?? true) %} selected{% endif %}>{{ __('No') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Entity') }}</td>
|
||||
<td>
|
||||
{{ render_entity_dropdown('entities_id', server.entities_id ?? 0) }}
|
||||
</td>
|
||||
<td>{{ __('Recursive') }}</td>
|
||||
<td>
|
||||
<select name="is_recursive">
|
||||
<option value="1"{% if server.is_recursive ?? false %} selected{% endif %}>{{ __('Yes') }}</option>
|
||||
<option value="0"{% if not (server.is_recursive ?? false) %} selected{% endif %}>{{ __('No') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Location') }}</td>
|
||||
<td>
|
||||
{{ render_location_dropdown('locations_id', server.locations_id ?? 0) }}
|
||||
<br><small>{{ __('Associate the server with the main/root location. Assets in sub-locations will use this root location server.', 'urbackup') }}</small>
|
||||
</td>
|
||||
<td>{{ __('Protocol', 'urbackup') }}</td>
|
||||
<td>
|
||||
<select name="protocol">
|
||||
<option value="http"{% if server.protocol == 'http' %} selected{% endif %}>HTTP</option>
|
||||
<option value="https"{% if server.protocol == 'https' %} selected{% endif %}>HTTPS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('IP address', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="text" name="ip_address" value="{{ server.ip_address ?? '' }}" size="40">
|
||||
</td>
|
||||
<td>{{ __('Network port', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="number" name="port" value="{{ server.port ?? 55414 }}" min="1" max="65535">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('UrBackup server version', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="text" name="server_version" value="{{ server.server_version ?? '' }}" size="30">
|
||||
</td>
|
||||
<td>{{ __('Ignore SSL verification', 'urbackup') }}</td>
|
||||
<td>
|
||||
<select name="ignore_ssl">
|
||||
<option value="1"{% if server.ignore_ssl ?? false %} selected{% endif %}>{{ __('Yes') }}</option>
|
||||
<option value="0"{% if not (server.ignore_ssl ?? false) %} selected{% endif %}>{{ __('No') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('API username', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="text" name="api_username" value="{{ server.api_username ?? '' }}" size="40" autocomplete="off">
|
||||
</td>
|
||||
<td>{{ __('API password', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="password" name="api_password" value="{{ server.api_password ?? '' }}" autocomplete="new-password">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Comments') }}</td>
|
||||
<td colspan="3">
|
||||
<textarea name="comment" rows="5" cols="100">{{ server.comment ?? '' }}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
{% if server.id > 0 %}
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('UrBackup web interface', 'urbackup') }}</td>
|
||||
<td colspan="3">
|
||||
{% if server.url %}
|
||||
<a href="{{ server.url }}" target="_blank" rel="noopener" class="btn btn-secondary">
|
||||
{{ __('Open UrBackup interface', 'urbackup') }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ __('No URL available', 'urbackup') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('API test', 'urbackup') }}</td>
|
||||
<td colspan="3">
|
||||
<button type="button" class="btn btn-primary plugin-urbackup-test-api" data-server-id="{{ server.id }}">
|
||||
{{ __('Test API connection', 'urbackup') }}
|
||||
</button>
|
||||
<span id="plugin-urbackup-api-test-result"></span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
<input type="hidden" name="id" value="{{ server.id ?? 0 }}">
|
||||
<input type="hidden" name="_glpi_csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" name="save" class="btn btn-primary">{{ __('Save') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user