1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{#
/*
* Spring Signage Ltd - http://www.springsignage.com
* Copyright (C) 2015 Spring Signage Ltd
* (${FILE_NAME})
*/
Theme::Set('form_id', 'RetireForm');
Theme::Set('form_meta', '<input type="hidden" name="layoutId" value="' . $layoutId . '">');
// Retire the layout
Theme::Set('form_action', 'index.php?p=layout&q=Retire');
Theme::Set('form_fields', array(Form::AddMessage(__('Are you sure you want to retire this layout ?'))));
$form = Theme::RenderReturn('form_render');
$this->getState()->SetFormRequestResponse($form, sprintf(__('Retire %s'), $layout->layout), '300px', '200px');
$this->getState()->AddButton(__('Help'), 'XiboHelpRender("' . Help::Link('Layout', 'Retire') . '")');
$this->getState()->AddButton(__('Delete'), 'XiboSwapDialog("index.php?p=layout&q=DeleteLayoutForm&layoutid=' . $layoutId . '")');
$this->getState()->AddButton(__('No'), 'XiboDialogClose()');
$this->getState()->AddButton(__('Yes'), '$("#RetireForm").submit()');
#}
{% extends "form-base.twig" %}
{% import "forms.twig" as forms %}
{% block formTitle %}
{% set layout = layout.layout %}
{% trans %}Retire {{ layout }}{% endtrans %}
{% endblock %}
{% block formButtons %}
{% trans "Help" %}, XiboHelpRender("{{ help.retire }}")
{% trans "Delete" %}, XiboSwapDialog("{{ urlFor("layout.delete.form", {id: layout.layoutId}) }}")
{% trans "No" %}, XiboDialogClose()
{% trans "Yes" %}, $("#layoutRetireForm").submit()
{% endblock %}
{% block formHtml %}
<div class="row">
<div class="col-md-12">
<form id="layoutRetireForm" class="XiboForm form-horizontal" method="put" action="{{ urlFor("layout.retire", {id: layout.layoutId}) }}">
{{ forms.message("Are you sure you want to retire this layout?") }}
{# it is missing few things obviously #}
</form>
</div>
</div>
{% endblock %}
|