parent
86bff4dbae
commit
ee16078884
|
@ -135,6 +135,12 @@ class ServerController extends AbstractServerController
|
|||
{
|
||||
$back_to = isset($_GET['back_to']) ? $_GET['back_to'] : '';
|
||||
|
||||
$modal = new \psm\Util\Module\Modal($this->twig, 'delete', \psm\Util\Module\Modal::MODAL_TYPE_DANGER);
|
||||
$this->addModal($modal);
|
||||
$modal->setTitle(psm_get_lang('servers', 'delete_title'));
|
||||
$modal->setMessage(psm_get_lang('servers', 'delete_message'));
|
||||
$modal->setOKButtonLabel(psm_get_lang('system', 'delete'));
|
||||
|
||||
$tpl_data = $this->getLabels();
|
||||
$tpl_data['edit_server_id'] = $this->server_id;
|
||||
$tpl_data['url_save'] = psm_build_url(array(
|
||||
|
@ -143,6 +149,11 @@ class ServerController extends AbstractServerController
|
|||
'id' => $this->server_id,
|
||||
'back_to' => $back_to,
|
||||
));
|
||||
$tpl_data['url_delete'] = psm_build_url(array(
|
||||
'mod' => 'server',
|
||||
'action' => 'delete',
|
||||
'id' => $this->server_id,
|
||||
));
|
||||
|
||||
// depending on where the user came from, add the go back url:
|
||||
if ($back_to == 'view' && $this->server_id > 0) {
|
||||
|
|
|
@ -143,13 +143,25 @@
|
|||
<!-- Telegram -->
|
||||
{{ macro.input_select_monitoring("telegram", "telegram", label_send_telegram, edit_telegram_selected, label_yes, label_no, warning_telegram, label_warning_telegram) }}
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ label_fieldset_permissions }}</legend>
|
||||
<!-- Permissions -->
|
||||
{{ macro.input_select_multiple("user_id", "user_id[]", label_permissions, label_search, users, label_please_select) }}
|
||||
{{ macro.button_save(null, label_save) }}
|
||||
<a class="btn" href="{{ url_go_back|raw }}">{{ label_go_back }}</a>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ label_save }}</legend>
|
||||
{{ macro.button_save(null, label_save) }}
|
||||
<a class="btn" href="{{ url_go_back|raw }}">{{ label_go_back }}</a>
|
||||
</fieldset>
|
||||
{% if edit_server_id > 0 %}
|
||||
<fieldset>
|
||||
<legend class="mt-4">{{ label_delete }}</legend>
|
||||
<a class="btn btn-danger show-modal" href="{{ url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete"
|
||||
data-modal-param="{{ edit_value_label }}">
|
||||
<i class="fas fa-trash"></i> {{ label_delete }}
|
||||
</a>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
{{ macro.input_csrf() }}
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue