-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariable-edit.html
More file actions
130 lines (99 loc) · 5.26 KB
/
Copy pathvariable-edit.html
File metadata and controls
130 lines (99 loc) · 5.26 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
118
119
120
121
122
123
124
125
126
127
128
129
130
{extends file="admin-layout.tpl"}
{block name="no-return-functions"}
{$admin_current_location = 'configuration'}
{/block}
{block name="page-title"}{intl l='Edit a system variable'}{/block}
{block name="check-resource"}admin.configuration.variable{/block}
{block name="check-access"}update{/block}
{block name="main-content"}
<div class="variables edit-variable">
<div id="wrapper" class="container">
{loop name="config_edit" type="config" hidden="*" id="$variable_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/configuration/variables'}">{intl l="System variables"}</a></li>
<li>{intl l='Editing variable "%name"' name={$NAME}}</li>
</ul>
{hook name="variables-edit.top" variable_id=$variable_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="Edit variable %name" name={$NAME}}
</div>
<div class="form-container">
<div class="col-md-12">
{form name="thelia.admin.config.modification"}
<form method="POST" action="{url path='/admin/configuration/variables/save'}" {form_enctype}>
<fieldset>
{* Be sure to get the variable ID, even if the form could not be validated *}
<input type="hidden" name="variable_id" value="{$variable_id}" />
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/configuration/variables'}"}
{form_hidden_fields}
{form_field field='success_url'}
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/variables'}" />
{/form_field}
{* We do not allow creation of hidden variables *}
{form_field field='id'}
<input type="hidden" name="{$name}" value="{$value}" />
{/form_field}
{form_field field='hidden'}
<input type="hidden" name="{$name}" value="{$value}" />
{/form_field}
{form_field field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{form_field field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="form-control">
</div>
{/form_field}
{form_field field='value'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" value="{$value}" title="{intl l='Variable value'}" placeholder="{intl l='Variable value'}" class="form-control">
</div>
{/form_field}
{form_field field='secured'}
<div class="checkbox {if $error}has-error{/if}">
<label>
<input type="checkbox" name="{$name}" value="1" {if $value == 1}checked="checked"{/if}>
{$label}
</label>
</div>
{/form_field}
{include file="includes/standard-description-form-fields.html"}
<div class="control-group">
<div class="controls">
<p>{intl l='Variable created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
</div>
</div>
</fieldset>
</form>
{/form}
</div>
</div>
</div>
</div>
</div>
{hook name="variables-edit.bottom" variable_id=$variable_id}
{/loop}
{elseloop rel="config_edit"}
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, variable ID=%id was not found." id={$variable_id}}
</div>
</div>
</div>
{/elseloop}
</div>
</div>
{/block}
{block name="javascript-last-call"}
{hook name="variable.edit-js" location="variable-edit-js" }
{hook name="wysiwyg.js" location="wysiwyg-variable-edit-js" }
{/block}