aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/style/permission_mask.html
blob: 263ff3fffa8ead8e55cf1667e2cf0530e352c97c (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179

<script type="text/javascript">
<!--
	var active_pmask = '0';
	var active_fmask = '0';
	var active_cat = '0';

	// Show/hide option panels
	// value = suffix for ID to show
	function swap_options(pmask, fmask, cat)
	{
		id = pmask + fmask + cat;
		active_option = active_pmask + active_fmask + active_cat;

		if (id == active_option)
		{
			return;
		}
		
		// Hide active options
		dE('options' + active_option, -1);
		dE('head' + active_pmask + active_fmask, 1, 'inline');
		dE('apply' + active_pmask + active_fmask, -1);

		// Display container
		dE('options' + id, 1);
		dE('head' + pmask + fmask, -1, 'inline');
		dE('apply' + pmask + fmask, 1);

		active_pmask = pmask;
		active_fmask = fmask;
		active_cat = cat;
	}

	// Mark all radio buttons in one panel
	// id = table ID container, s = status [1/-1/0]
	function mark_options(id, s)
	{
		var t = document.getElementById(id);
		
		if (!t)
		{
			return;
		}
	
		var rb = t.getElementsByTagName('input');
	
		for (var r = 0; r < rb.length; r++ )
		{
			if (rb[r].id.substr(rb[r].id.length-1) == s)
			{
				rb[r].checked = true;
			}
		}
	}

//-->
</script>

<!-- BEGIN p_mask -->

<fieldset class="permissions">
	<!-- IF p_mask.USER_GROUPS_DEFAULT or p_mask.USER_GROUPS_CUSTOM -->
		<br />
		<p>
		<!-- IF p_mask.USER_GROUPS_DEFAULT --><b>{p_mask.NAME}</b> {L_USER_IS_MEMBER_OF_DEFAULT}: <b>{p_mask.USER_GROUPS_DEFAULT}</b><br /><!-- ENDIF -->
		<!-- IF p_mask.USER_GROUPS_CUSTOM --><b>{p_mask.NAME}</b> {L_USER_IS_MEMBER_OF_CUSTOM}: <b>{p_mask.USER_GROUPS_CUSTOM}</b><!-- ENDIF -->
		</p>
	<!-- ENDIF -->

	<table cellspacing="1" class="pmask">
	<thead>
	<tr>
		<th style="text-align: left; width: 70%">{p_mask.NAME}<!-- IF p_mask.S_LOCAL --><span class="small" style="text-transform: none;"> [{p_mask.L_ACL_TYPE}]</span><!-- ENDIF --></th>
		<th>{p_mask.CATEGORIES}</th>
	</tr>
	</thead>
	<tbody>

	<!-- BEGIN f_mask -->
		<!-- IF p_mask.f_mask.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
		<td class="name">
			<table cellspacing="0" cellpadding="0" class="type2" style="background-color: transparent; border: 0;">
			<tbody>
			<tr>
				<td width="16">
					<span id="head{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}"<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW --> style="display: none;"<!-- ENDIF -->>
						<!-- IF not p_mask.S_VIEW --><input type="checkbox" name="inherit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="1" /><!-- ELSE -->&nbsp;<!-- ENDIF -->
					</span>
				</td>
				<td>{p_mask.f_mask.PADDING}<a href="javascript:swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '0');">{p_mask.f_mask.NAME}</a></span></td>
				<td style="text-align: right;">
				<!-- IF p_mask.S_VIEW -->
					&nbsp;
				<!-- ELSE -->
					<!-- <b>{L_PRESET}:</b>&nbsp; &nbsp;<select name="preset[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]">
							<option value="">Select preset...</option>
							<option value="2">Valued Members</option>
							<option value="3">Restricted Access</option>
							</select> -->
				<!-- ENDIF -->
				</td>
			</tr>
			</tbody>
			</table>
		</td>
		<!-- BEGIN category -->
			<!-- IF p_mask.f_mask.category.S_YES -->
				<td class="preset_yes">
			<!-- ELSEIF p_mask.f_mask.category.S_NO -->
				<td class="preset_no">
			<!-- ELSEIF p_mask.f_mask.category.S_UNSET -->
				<td class="preset_unset">
			<!-- ELSE -->
				<td class="preset_custom">
			<!-- ENDIF -->
				<a href="javascript:swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}');"><span>&nbsp;</span></a></td>
		<!-- END category -->
	</tr>
	<tr class="row3">
		<td style="vertical-align: top;">
			<div id="apply{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" style="text-align: left; width: 98%; margin: 5px;<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW --><!-- ELSE --> display: none;<!-- ENDIF -->">
			<!-- IF not p_mask.S_VIEW -->
				<div style="float: left; width: 60%;">
					<p class="small">{L_APPLY_PERMISSIONS_EXPLAIN}</p>
					<input class="button1" type="submit" name="psubmit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="{L_APPLY_PERMISSIONS}" />
				</div>
				<div style="float: right; text-align: right; width: 35%;">
					<p class="small"><a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'y')">{L_ALL_YES}</a> &bull; <a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'n')">{L_ALL_NO}</a> &bull; <a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'u')">{L_ALL_UNSET}</a></p>
				</div>
			<!-- ELSE -->
				&nbsp;
			<!-- ENDIF -->
			</div>
		</td>
		<td colspan="{p_mask.S_NUM_CATS}" id="a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" style="vertical-align: top; text-align: left;">
			<div style="width: 350px; height: 0; line-height: 0;">&nbsp;</div>
			<!-- BEGIN category -->
				<table cellspacing="1" id="options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" class="type3"<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
				<thead>
				<tr>
					<th scope="col" style="text-align: left; padding-left: 0;"><strong>{L_ACL_SETTING} [{p_mask.f_mask.category.CAT_NAME}]</strong></th>
				<!-- IF p_mask.S_VIEW -->
					<th scope="col">{L_ACL_YES}</th>
					<th scope="col">{L_ACL_NO}</th>
				<!-- ELSE -->
					<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'y')">{L_ACL_YES}</a></th>
					<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'u')">{L_ACL_UNSET}</a></th>
					<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'n')">{L_ACL_NO}</a></th>
				<!-- ENDIF -->
				</tr>
				</thead>
				<tbody>
				<!-- BEGIN mask -->
					<!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
					<th>{p_mask.f_mask.category.mask.PERMISSION}</th>
					<!-- IF p_mask.S_VIEW -->
						<td<!-- IF p_mask.f_mask.category.mask.S_YES --> class="yes"<!-- ELSE --> class="unset"<!-- ENDIF -->>&nbsp;</td>
						<td<!-- IF p_mask.f_mask.category.mask.S_NO --> class="no"<!-- ELSE --> class="unset"<!-- ENDIF -->>&nbsp;</td>
					<!-- ELSE -->
						<td class="unset"><input id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></td>
						<td class="unset"><input id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_UNSET --> checked="checked"<!-- ENDIF --> value="-1" /></td>
						<td class="unset"><input id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NO --> checked="checked"<!-- ENDIF --> value="0" /></td>
					<!-- ENDIF -->
				</tr>
				<!-- END mask -->
				</tbody>
				</table>
			<!-- END category -->
		</td>
	</tr>
	<!-- END f_mask -->
	
	</tbody>
	</table>

</fieldset>

<!-- END p_mask -->