1 | {combine_script id="farbtastic" require="jquery" path=$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.js"} |
---|
2 | {combine_css path=$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.css"} |
---|
3 | |
---|
4 | {footer_script} |
---|
5 | {literal} |
---|
6 | $(document).ready(function(){ |
---|
7 | $('#colorpicker').farbtastic('#hexval'); |
---|
8 | }); |
---|
9 | {/literal} |
---|
10 | {/footer_script} |
---|
11 | |
---|
12 | <div class="titrePage"> |
---|
13 | <h2>TypeT@gs</h2> |
---|
14 | </div> |
---|
15 | |
---|
16 | <form action="" method="post" name="form"> |
---|
17 | {if isset($edit_tags)} |
---|
18 | <input type="hidden" name="edit_list" value="{$edit_tags}" /> |
---|
19 | {/if} |
---|
20 | |
---|
21 | <fieldset> |
---|
22 | {if isset($edited_typetag)} |
---|
23 | <legend>{'Edit typetags'|translate}</legend> |
---|
24 | <input type="hidden" name="edited_typetag" value="{$edited_typetag}" /> |
---|
25 | |
---|
26 | <div style="width: 500px; margin: auto;"> |
---|
27 | <div id="colorpicker" style="float: right;"></div> |
---|
28 | <p><b>{'Edited TypeTag'|translate} : <input type="text" readonly="readonly" size="20" style="background-color: {$typetag.OLD_COLOR}; color: {$typetag.COLOR_TEXT};" value="{$typetag.OLD_NAME}"></b> |
---|
29 | <p> </p> |
---|
30 | <p>{'New name'|translate} <input type="text" size="20" maxlength="15" name="typetag_name" value="{$typetag.NAME}"/></p> |
---|
31 | <p>{'New color'|translate} <input type="text" id="hexval" name="typetag_color" size="9" maxlength="7" value="{$typetag.COLOR}"/></p> |
---|
32 | <p> </p> |
---|
33 | <p><input class="submit" type="submit" name="submit" value="{'Modify'|translate}"/> |
---|
34 | <input class="submit" type="submit" name="cancel" value="{'Reset'|translate}" /></p> |
---|
35 | </div> |
---|
36 | {else} |
---|
37 | <legend>{'Create a Typetag'|translate}</legend> |
---|
38 | <div style="width: 500px; margin: auto;"> |
---|
39 | <div id="colorpicker" style="float: right;"></div> |
---|
40 | <p> </p> |
---|
41 | <p>{'New TypeTag'|translate} <input type="text" size="20" maxlength="15" name="add_typetag" value="{if isset($typetag.NAME)}{$typetag.NAME}{/if}"/></p> |
---|
42 | <p>{'ColorTypeTag'|translate} <input type="text" id="hexval" name="hexval" size="9" value="{if isset($typetag.COLOR)}{$typetag.COLOR}{else}#444444{/if}"/></p> |
---|
43 | <p> </p> |
---|
44 | <p><input class="submit" type="submit" name="addtypetag" value="{'Create a Typetag'|translate}"/></p> |
---|
45 | </div> |
---|
46 | {/if} |
---|
47 | </fieldset> |
---|
48 | |
---|
49 | {if !empty($typetags_selection)} |
---|
50 | <fieldset> |
---|
51 | <legend>{'TypeTag selection'|translate}</legend> |
---|
52 | <ul class="tagSelection"> |
---|
53 | {foreach from=$typetags_selection item=typetag} |
---|
54 | <li> |
---|
55 | <label><input type="checkbox" name="typetags[]" value="{$typetag.id}" style="margin: 5px 0;"/> |
---|
56 | <input type="text" readonly="readonly" size="18" style="background-color: {$typetag.color}; color: {$typetag.color_text}; margin: 5px 0;" value="{$typetag.name}"></label></li> |
---|
57 | {/foreach} |
---|
58 | </ul> |
---|
59 | <p><br> |
---|
60 | <input class="submit" type="submit" name="edittypetag" value="{'Edit selected typetags'|translate}"/> |
---|
61 | <input class="submit" type="submit" name="deletetypetag" value="{'Delete selected typetags'|translate}" onclick="return confirm('{'Are you sure?'|translate}');"/> |
---|
62 | </p> |
---|
63 | </fieldset> |
---|
64 | {/if} |
---|
65 | |
---|
66 | {if !empty($typetags_association) and !empty($typetags_selection)} |
---|
67 | <fieldset> |
---|
68 | <legend>{'TypeTag association'|translate}</legend> |
---|
69 | <ul class="tagSelection"> |
---|
70 | {foreach from=$typetags_association item=tag} |
---|
71 | <li style="margin: 10px 0;"> |
---|
72 | <label><input type="checkbox" name="assoc_tags[]" value="{$tag.id}" /><span style="color: {$tag.color}; font-weight: bold;"> {$tag.name}</span></label></li> |
---|
73 | {/foreach} |
---|
74 | </ul> |
---|
75 | <p><br>{'existing_typetag_list'|translate} |
---|
76 | <select class="categoryDropDown" name="typetaglist"> |
---|
77 | <option value=""> {'choose_typetag'|@translate}</option> |
---|
78 | {foreach from=$typetags_selection item=typetag} |
---|
79 | <option value="{$typetag.id}"> {$typetag.name}</option> |
---|
80 | {/foreach} |
---|
81 | </select> |
---|
82 | <input class="submit" type="submit" name="associate" value="{'associate'|translate}" onclick="return confirm('{'Are you sure?'|translate}');"/></p> |
---|
83 | </fieldset> |
---|
84 | {/if} |
---|
85 | |
---|
86 | {if !empty($typetags_dissociation)} |
---|
87 | <fieldset> |
---|
88 | <legend>{'TypeTag dissociation'|translate}</legend> |
---|
89 | <ul class="tagSelection"> |
---|
90 | {foreach from=$typetags_dissociation item=tag} |
---|
91 | <li style="margin: 10px 0;"> |
---|
92 | <label><input type="checkbox" name="dissoc_tags[]" value="{$tag.id}" /><span style="color: {$tag.color}; font-weight: bold;"> {$tag.name}</span></label></li> |
---|
93 | {/foreach} |
---|
94 | </ul> |
---|
95 | <p><br><input class="submit" type="submit" name="dissociate" value="{'dissociate'|translate}"onclick="return confirm('{'Are you sure?'|translate}');"/></p> |
---|
96 | </fieldset> |
---|
97 | {/if} |
---|
98 | </form> |
---|