aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template
diff options
context:
space:
mode:
Diffstat (limited to 'admin/themes/default/template')
-rw-r--r--admin/themes/default/template/cat_modify.tpl6
-rw-r--r--admin/themes/default/template/cat_perm.tpl60
2 files changed, 60 insertions, 6 deletions
diff --git a/admin/themes/default/template/cat_modify.tpl b/admin/themes/default/template/cat_modify.tpl
index 31a9e6ef9..47272ec3e 100644
--- a/admin/themes/default/template/cat_modify.tpl
+++ b/admin/themes/default/template/cat_modify.tpl
@@ -81,12 +81,6 @@
{/if}
<p>
- <strong>{'Access type'|@translate}</strong>
- <br>
- {html_radios name='status' values=$status_values output=$status_values|translate selected=$CAT_STATUS}
- </p>
-
- <p>
<strong>{'Lock'|@translate}</strong>
<br>
{html_radios name='visible' values='true,false'|@explode output='No,Yes'|@explode|translate selected=$CAT_VISIBLE}
diff --git a/admin/themes/default/template/cat_perm.tpl b/admin/themes/default/template/cat_perm.tpl
index c44d918ae..728669894 100644
--- a/admin/themes/default/template/cat_perm.tpl
+++ b/admin/themes/default/template/cat_perm.tpl
@@ -1,9 +1,62 @@
+{combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'}
+{combine_css path="themes/default/js/plugins/chosen.css"}
+
+{footer_script}{literal}
+jQuery(document).ready(function() {
+ jQuery(".chzn-select").chosen();
+
+ function checkStatusOptions() {
+ if (jQuery("input[name=status]:checked").val() == "private") {
+ jQuery("#privateOptions, #applytoSubAction").show();
+ }
+ else {
+ jQuery("#privateOptions, #applytoSubAction").hide();
+ }
+ }
+
+ checkStatusOptions();
+ jQuery("#selectStatus").change(function() {
+ checkStatusOptions();
+ });
+});
+{/literal}{/footer_script}
+
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form action="{$F_ACTION}" method="post" id="categoryPermissions">
+<fieldset>
+ <legend>{'Access type'|@translate}</legend>
+
+ <p id="selectStatus">
+ <label><input type="radio" name="status" value="public" {if not $private}checked="checked"{/if}> <strong>{'public'|@translate}</strong> : <em>{'any visitor can see this album'|@translate}</em></label>
+ <br>
+ <label><input type="radio" name="status" value="private" {if $private}checked="checked"{/if}> <strong>{'private'|@translate}</strong> : <em>{'visitors need to login and have the appropriate permissions to see this album'|@translate}</em></label>
+ </p>
+</fieldset>
+
+<fieldset id="privateOptions">
+ <legend>{'Groups and users'|@translate}</legend>
+
+ <p>
+ <strong>{'Permission granted for groups'|@translate}</strong>
+ <br>
+ <select data-placeholder="{'Select groups...'|@translate}" class="chzn-select" multiple style="width:700px;" name="groups[]">
+ {html_options options=$groups selected=$groups_selected}
+ </select>
+ </p>
+
+ <p>
+ <strong>{'Permission granted for users'|@translate}</strong>
+ <br>
+ <select data-placeholder="{'Select users...'|@translate}" class="chzn-select" multiple style="width:700px;" name="users[]">
+ {html_options options=$users selected=$users_selected}
+ </select>
+ </p>
+
+{*
<h4>{'Groups'|@translate}</h4>
<fieldset>
@@ -60,6 +113,13 @@
<input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}">
<label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
</fieldset>
+*}
+</fieldset>
+
+ <p style="margin:12px;text-align:left;">
+ <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
+ <label id="applytoSubAction" style="display:none;"><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
+ </p>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
</form>