summaryrefslogtreecommitdiff
path: root/templates/edit_pigeonholes.tpl
blob: df306700a8846617c0f2d74f703153e13d4549ea (plain)
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
<div class="floaticon">{bithelp}</div>

<div class="edit pigeonholes">
	<div class="header">
		<h1>{tr}Edit Categories{/tr}</h1>
	</div>

	<div class="body">
		{formfeedback hash=$feedback}
		{form legend="Create / Edit Category"}
			{if $gPigeonholes->mStructureId}
				<input type="hidden" name="structure_id" value="{$gPigeonholes->mStructureId}" />
				<input type="hidden" name="content_id" value="{$pigeonInfo.content_id}" />
				<input type="hidden" name="action" value="{$smarty.request.action}" />

				<div class="row">
					{formlabel label="Parent" for="pigeonhole-parent"}
					{forminput}
						{* we need to disable dropdown when editing since it might confus users when nothing happens *}
						{if $pigeonInfo.content_id}
							{html_options id="pigeonhole-parent" name="pigeonhole[parent_id]" values=$pigeonStructure options=$pigeonStructure selected=$pigeonInfo.parent_id disabled=disabled}
						{else}
							{html_options id="pigeonhole-parent" name="pigeonhole[parent_id]" values=$pigeonStructure options=$pigeonStructure selected=$pigeonInfo.parent_id}
						{/if}
						{formhelp note="Pick where you would like to create a new sub-category. To change the hierarchy of the categories, please visit the change structure page."}
					{/forminput}
				</div>
			{/if}

			<div class="row">
				{formlabel label="Title" for="pigeonhole-title"}
				{forminput}
					<input type="text" size="50" id="pigeonhole-title" name="pigeonhole[title]" value="{$pigeonInfo.title}" />
				{/forminput}
			</div>

			<div class="row">
				{formlabel label="Description" for="pigeonhole-desc"}
				{forminput}
					<textarea id="pigeonhole-desc" name="pigeonhole[edit]" rows="3" cols="50">{$pigeonInfo.data|escape}</textarea>
					{formhelp note="A description of the category. This will be visible when users view this particular category."}
				{/forminput}
			</div>

			<div class="row">
				{formlabel label="Theme" for="pigeonhole-style"}
				{forminput}
					{html_options id="pigeonhole-style" name="pigeonhole[settings][style]" output=$styles values=$styles selected=$pigeonInfo.settings.style}
					{formhelp note="This theme will be applied when viewing any page belonging to this category."}
				{/forminput}
			</div>

			<div class="row">
				{formlabel label="Content" for="pigeonhole-content"}
				{forminput}
					{html_options values=$contentTypes options=$contentTypes name=content_type_guid selected=$contentSelect}
				{/forminput}

				{forminput}
					{html_options multiple="multiple" size="12" name="pigeonhole[members][]" id="pigeonhole-content" values=$contentList options=$contentList selected=$pigeonInfo.selected_members}
				{/forminput}

				{forminput}
					<input type="text" size="30" name="find_objects" value="{$smarty.request.find_objects}" /> 
					<input type="submit" value="{tr}Apply filter{/tr}" name="search_objects" />
				{/forminput}
			</div>

			<div class="row submit">
				<input type="submit" name="pigeonhole_store" value="{tr}Save Category{/tr}" />
				<input type="submit" name="pigeonhole_store_and_create" value="{tr}Save and Insert a new Category{/tr}" />
			</div>
		{/form}

		{include file="bitpackage:pigeonholes/view_structure_inc.tpl"}
	</div><!-- end .body -->
</div><!-- end .edit -->