-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule-hook-edit.html
More file actions
117 lines (91 loc) · 4.79 KB
/
module-hook-edit.html
File metadata and controls
117 lines (91 loc) · 4.79 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Edit a module hook'}{/block}
{block name="check-resource"}admin.hook{/block}
{block name="check-access"}update{/block}
{block name="main-content"}
<div class="module-hooks edit-module-hook">
<div id="wrapper" class="container">
{loop name="module_hook_edit" type="module_hook" id="$module_hook_id" backend_context="1" lang="$edit_language_id"}
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/module-hooks'}">{intl l="Hook positions"}</a></li>
<li>{intl l='Editing hook for module "%name"' name="{$MODULE_TITLE}"}</li>
</ul>
{hook name="module-hook-edit.top" module_hook_id=$module_hook_id}
<div class="row">
<div class="col-md-12 general-block-decorator">
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l='Editing hook for module "%name"' name="{$MODULE_TITLE}"}
</div>
<div class="form-container">
<div class="col-md-12">
{form name="thelia.admin.module-hook.modification"}
<form method="POST" action="{url path="/admin/module-hook/save/%id" id=$ID}" {form_enctype} class="clearfix">
{include
file = "includes/inner-form-toolbar.html"
hide_submit_buttons = false
page_url = {url path="/admin/module-hook/update/%id" id=$ID}
close_url = {url path="/admin/module-hooks"}
}
<div class="row">
<div class="col-md-6">
{* Be sure to get the hook ID, even if the form could not be validated *}
<input type="hidden" name="module_hook_id" value="{$module_hook_id}" />
{form_hidden_fields}
{render_form_field field="success_url" value={url path="/admin/module-hooks"}}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{render_form_field field="module_id"}
{render_form_field field="hook_id"}
{render_form_field field="active"}
</div>
<div class="col-md-6">
{custom_render_form_field field='classname'}
<select {form_field_attributes field='classname'} >
</select>
{/custom_render_form_field}
{custom_render_form_field field='method'}
<select {form_field_attributes field='method'} >
</select>
{/custom_render_form_field}
{render_form_field field="templates"}
</div>
</div>
</form>
{/form}
</div>
</div>
</div>
</div>
</div>
{hook name="module-hook-edit.bottom" module_hook_id=$module_hook_id}
{/loop}
{elseloop rel="module_hook_edit"}
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, module hook ID=%id was not found." id={$module_hook_id}}
</div>
</div>
</div>
{/elseloop}
</div>
</div>
{/block}
{block name="javascript-initialization"}
<script>
(function($) {
// Declare current values for classname and method selects
{loop name="module_hook_edit" type="module_hook" id="$module_hook_id" backend_context="1" lang="$edit_language_id"}
var currentClassname = "{$CLASSNAME}";
var currentMethod = "{$METHOD}";
{/loop}
{include file="includes/hook-edition.js.inc"}
$('#module_id').change();
})(jQuery);
</script>
{/block}
{block name="javascript-last-call"}
{hook name="module-hook.edit-js" location="module-hook-edit-js" module_hook_id={$module_hook_id} }
{/block}