{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"} {footer_script} {* *} var categoriesCache = new LocalStorageCache({ key: 'categoriesAdminList', serverKey: '{$CACHE_KEYS.categories}', serverId: '{$CACHE_KEYS._hash}', loader: function(callback) { jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.categories.getAdminList', function(data) { callback(data.result.categories); }); } }); jQuery('[data-selectize=categories]').selectize({ valueField: 'id', labelField: 'fullname', sortField: 'global_rank', searchField: ['fullname'], plugins: ['remove_button'] }); categoriesCache.get(function(categories) { categories.push({ id: 0, fullname: '------------', global_rank: 0 }); // remove itself and children categories = jQuery.grep(categories, function(cat) { return !(/\b{$CAT_ID}\b/.test(cat.uppercats)); }); jQuery('[data-selectize=categories]').each(function() { this.selectize.load(function(callback) { callback(categories); }); if (jQuery(this).data('value')) { this.selectize.setValue(jQuery(this).data('value')[0]); } // prevent empty value if (this.selectize.getValue() == '') { this.selectize.setValue(0); } this.selectize.on('dropdown_close', function() { if (this.getValue() == '') { this.setValue(0); } }); }); }); {/footer_script}

{$CATEGORIES_NAV} › {'Edit album'|@translate} {$TABSHEET_TITLE}

{'Informations'|@translate}
{if isset($representant) } {if isset($representant.picture) } {else} {'Random photo'|@translate} {/if} {if $representant.ALLOW_SET_RANDOM }

{/if} {if isset($representant.ALLOW_DELETE) }

{/if} {/if}
{'Properties'|@translate}

{'Name'|@translate}

{'Description'|@translate}

{if isset($parent_category) }

{'Parent album'|@translate}

{/if}

{'Lock'|@translate}
{html_radios name='visible' values=['true','false'] output=['No'|translate,'Yes'|translate] selected=$CAT_VISIBLE}

{if isset($CAT_COMMENTABLE)}

{'Comments'|@translate}
{html_radios name='commentable' values=['false','true'] output=['No'|translate,'Yes'|translate] selected=$CAT_COMMENTABLE}

{/if}