XOOPS RMCommon Utilities
2.1.8.91RC
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
categories_form.php
Go to the documentation of this file.
1
<h1
class
=
"rmc_titles"
><?php
_e
(
'Create New Category'
,
'rmcommon'
); ?></h1>
2
<form name=
"frmcats"
id
=
"img-cat-form"
method=
"post"
accept=
"images.php"
>
3
<div
class
=
"form_container"
>
4
<table
class
=
"table_form"
cellspacing=
"0"
>
5
<tr valign=
"top"
class
=
"cell_fields"
>
6
<td
class
=
"form_captions"
>
7
<label
for
=
"cat-name"
><?php
_e
(
'Category Name:'
,
'rmcommon'
); ?></label>
8
</td>
9
<td><input type=
"text"
name=
"name"
id
=
"cat-name"
value=
"<?php echo $edit ? $cat->getVar('name') : $name; ?>"
class
=
"required"
size
=
"50"
/>
10
</tr>
11
<tr valign=
"top"
class
=
"cell_fields"
>
12
<td
class
=
"form_captions"
>
13
<label
for
=
"cat-status"
><?php
_e
(
'Category Status:'
,
'rmcommon'
); ?></label>
14
</td>
15
<td>
16
<label><input type=
"radio"
name=
"status"
id
=
"cat-status"
value=
"close"
<?php echo $active!=
'open'
?
' checked="checked"'
:
''
; ?> /> <?php
_e
(
'Inactive'
,
'rmcommon'
); ?></label>
17
<label><input type=
"radio"
name=
"status"
id
=
"cat-status"
value=
"open"
<?php echo $active==
'open'
?
' checked="checked"'
: ($edit ?
''
:
' checked="checked"'
); ?> /> <?php
_e
(
'Active'
,
'rmcommon'
); ?></label>
18
</td>
19
</tr>
20
<tr valign=
"top"
class
=
"cell_fields"
>
21
<td
class
=
"form_captions"
>
22
<label
for
=
"write[]"
><?php
_e
(
'Groups that can upload images:'
,
'rmcommon'
); ?></label>
23
</td>
24
<td>
25
<?php echo $fwrite->render(); ?>
26
</td>
27
</tr>
28
<tr valign=
"top"
class
=
"cell_fields"
>
29
<td
class
=
"form_captions"
>
30
<label
for
=
"read[]"
><?php
_e
(
'Groups that can use this category:'
,
'rmcommon'
); ?></label>
31
</td>
32
<td>
33
<?php echo $fread->render(); ?>
34
</td>
35
</tr>
36
<tr
class
=
"cell_fields"
>
37
<td
class
=
"form_captions"
>
38
<label
for
=
"filesize"
><?php
_e
(
'Maximum file size:'
,
'rmcommon'
); ?></label>
39
</td>
40
<td>
41
<input type=
"text"
name=
"filesize"
id
=
"filesize"
size
=
"5"
value=
"<?php echo $edit ? $cat->getVar('filesize') : '50'; ?>"
/>
42
<select name=
"sizeunit"
>
43
<option value=
"1"
<?php echo $edit &&
$cat
->getVar(
'sizeunit'
)==
'1'
?
' selected="selected"'
:
''
; ?>><?php
_e
(
'Bytes'
,
'rmcommon'
); ?></option>
44
<option value=
"1024"
<?php echo $edit &&
$cat
->getVar(
'sizeunit'
)==
'1024'
?
' selected="selected"'
: (!$edit ?
'selected="selected"'
:
''
); ?>><?php
_e
(
'Kilobytes'
,
'rmcommon'
); ?></option>
45
<option value=
"1048576"
<?php echo $edit &&
$cat
->getVar(
'sizeunit'
)==
'1048576'
?
' selected="selected"'
:
''
; ?>><?php
_e
(
'Megabytes'
,
'rmcommon'
); ?></option>
46
</select>
47
</td>
48
</tr>
49
<tr>
50
<td colspan=
"2"
><h1
class
=
""
><?php
_e
(
'Custom Sizes'
,
'rmcommon'
); ?></h1></td>
51
</tr>
52
<tr>
53
<td colspan=
"2"
id
=
"sizes-container-all"
>
54
55
<?php
_e
(
'This configurations stablish the sizes in wich images will be created.'
,
'rmcommon'
); ?>
56
<?php
_e
(
'You can specify all sizes that you wish according to your needs.'
,
'rmcommon'
); ?>
57
58
<?php
if
($edit): ?>
59
<?php
$scounter
= 0 ?>
60
<?php
foreach
(
$cat
->getVar(
'sizes'
) as $size): ?>
61
<table
class
=
"outer sinlge_size"
cellspacing=
"1"
width=
"100%"
id
=
"table-single-size-<?php echo $scounter; ?>"
>
62
<tr
class
=
"head"
>
63
<td width=
"170"
><?php
_e
(
'Size name'
,
'rmcommon'
); ?></td>
64
<td>
65
<a
href
=
"javascript:;"
class
=
"delsize"
id
=
"delete-<?php echo $scounter; ?>"
onclick
=
"delete_size(this);"
><?php
_e
(
'Delete'
,
'rmcommon'
); ?></a>
66
<?php
_e
(
'Images'
,
'rmcommon'
); ?>
67
</td>
68
</tr>
69
<tr
class
=
"even"
>
70
<td rowspan=
"2"
valign=
"top"
><input type=
"text"
name=
"sizes[<?php echo $scounter; ?>][name]"
id
=
"sizes[<?php echo $scounter; ?>][name]"
value=
"<?php echo $size['name']; ?>"
size
=
"20"
class
=
"required"
/></td>
71
<td>
72
<strong><?php
_e
(
'Width:'
,
'rmcommon'
); ?></strong>
73
<input type=
"text"
name=
"sizes[<?php echo $scounter; ?>][width]"
value=
"<?php echo $size['width']; ?>"
size
=
"5"
/>
74
<strong><?php
_e
(
'Height:'
,
'rmcommon'
); ?></strong>
75
<input type=
"text"
name=
"sizes[<?php echo $scounter; ?>][height]"
value=
"<?php echo $size['height']; ?>"
size
=
"5"
/>
76
</td>
77
</tr>
78
<tr
class
=
"even"
>
79
<td colspan=
"2"
>
80
<label><input type=
"radio"
name=
"sizes[<?php echo $scounter; ?>][type]"
value=
"scale"
<?php echo $size[
'type'
]==
'scale'
?
' checked="checked"'
:
''
; ?> /> <?php
_e
(
'Scale'
,
'rmcommon'
); ?></label>
81
<label><input type=
"radio"
name=
"sizes[<?php echo $scounter; ?>][type]"
value=
"crop"
<?php echo $size[
'type'
]==
'crop'
?
' checked="checked"'
:
''
; ?> /> <?php
_e
(
'Crop'
,
'rmcommon'
); ?></label>
82
<label><input type=
"radio"
name=
"sizes[<?php echo $scounter; ?>][type]"
value=
"none"
<?php echo $size[
'type'
]==
'none'
?
' checked="checked"'
:
''
; ?> /> <?php
_e
(
'No Resize'
,
'rmcommon'
); ?></label>
83
</td>
84
</tr>
85
</table>
86
<?php $scounter++; ?>
87
<?php
endforeach
; ?>
88
<?php
else
: ?>
89
<table
class
=
"outer sinlge_size"
cellspacing=
"1"
width=
"100%"
id
=
"table-single-size-0"
>
90
<tr
class
=
"head"
>
91
<td width=
"170"
><?php
_e
(
'Size name'
,
'rmcommon'
); ?></td>
92
<td>
93
<a href=
"javascript:;"
class
=
"delsize"
id
=
"delete-0"
onclick
=
"delete_size(this);"
><?php
_e
(
'Delete'
,
'rmcommon'
); ?></a>
94
<?php
_e
(
'Images'
,
'rmcommon'
); ?>
95
</td>
96
</tr>
97
<tr
class
=
"even"
>
98
<td rowspan=
"2"
valign=
"top"
><input type=
"text"
name=
"sizes[0][name]"
id
=
"sizes[0][name]"
value=
""
size
=
"20"
class
=
"required"
/></td>
99
<td>
100
<strong><?php
_e
(
'Width:'
,
'rmcommon'
); ?></strong>
101
<input type=
"text"
name=
"sizes[0][width]"
value=
""
size
=
"5"
/>
102
<strong><?php
_e
(
'Height:'
,
'rmcommon'
); ?></strong>
103
<input type=
"text"
name=
"sizes[0][height]"
value=
""
size
=
"5"
/>
104
</td>
105
</tr>
106
<tr
class
=
"even"
>
107
<td colspan=
"2"
>
108
<label><input type=
"radio"
name=
"sizes[0][type]"
value=
"scale"
/> <?php
_e
(
'Scale'
,
'rmcommon'
); ?></label>
109
<label><input type=
"radio"
name=
"sizes[0][type]"
value=
"crop"
/> <?php
_e
(
'Crop'
,
'rmcommon'
); ?></label>
110
<label><input type=
"radio"
name=
"sizes[0][type]"
value=
"none"
checked=
"checked"
/> <?php
_e
(
'No Resize'
,
'rmcommon'
); ?></label>
111
</td>
112
</tr>
113
</table>
114
<?php
endif
; ?>
115
<div
class
=
"new_container"
><input type=
"button"
value=
"<?php _e('New Size','rmcommon'); ?>"
id
=
"new-size-button"
/></div>
116
117
</td>
118
</tr>
119
<tr
class
=
"cell_fields"
>
120
<td align=
"left"
colspan=
"2"
>
121
<input type=
"submit"
value=
"<?php _e($edit ? 'Update Category' : 'Create Category','rmcommon'); ?>"
class
=
"button"
/>
122
<input type=
"button"
value=
"<?php _e('Cancel','rmcommon'); ?>"
onclick
=
"window.location = 'images.php?action=showcats';"
/>
123
</td>
124
</tr>
125
</table>
126
<!-- /Form Table -->
127
</div>
128
<input type=
"hidden"
name=
"action"
value=
"<?php echo $edit ? 'saveedit' : 'save'; ?>"
/>
129
<?php
if
($edit): ?><input type=
"hidden"
name=
"id"
value=
"<?php echo $cat->id(); ?>"
/><?php
endif
; ?>
130
</form>
L:
XOOPS_Allure
SVN_XOOPS2
RMC
rmcommon
trunk
rmcommon
templates
categories_form.php
Generated on Sun Mar 17 2013 20:41:07 for XOOPS RMCommon Utilities by
1.8.3.1