PageRenderTime 14ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_admin_category/templates/_action_dialog_category_add.tpl

https://code.google.com/p/zotonic/
Smarty Template | 40 lines | 31 code | 9 blank | 0 comment | 1 complexity | a208f140dee0ae1d8f8cb27e74bec876 MD5 | raw file
 1
 2<p>Please specify the title, unique name and optional parent of the new category.</p>
 3
 4{% wire id=#form type="submit" postback={category_add on_success=on_success} delegate=delegate %}
 5<form id="{{ #form }}" method="POST" action="postback">
 6
 7	<div class="new-category-wrapper">
 8
 9		<div class="form-item clearfix">
10			<label for="{{ #title }}">Title</label>
11			<input id="{{ #title }}" type="text" name="title" value="" />
12		</div>
13		{% validate id=#title name="title" type={presence} %}
14
15		<div class="form-item clearfix">
16			<label for="{{ #name }}">Name</label>
17			<input id="{{ #name }}" type="text" name="name" value="" />
18		</div>
19		{% validate id=#name name="name" type={presence} %}
20
21		<div class="form-item clearfix">
22			<label for="{{ #category }}">Below category</label>
23			<select id="{{ #category }}" name="category_id">
24				<option value=""></option>
25			{% for cat_id, level, indent, name in m.category.all_flat %}
26				<option value="{{cat_id}}">
27					{{ indent }}{{ m.rsc[cat_id].title|default:name }}
28				</option>
29			{% endfor %}
30			</select>
31		</div>
32
33		<div class="form-item clearfix">
34			<button type="submit">Make category</button>
35			{% button text="Cancel" action={dialog_close} %}
36		</div>
37
38	</div>
39</form>
40