XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
rmc_block_form.php
Go to the documentation of this file.
1 <div id="block-config-form">
2 <form name="frmBkConfig" id="frm-block-config" method="post" action="blocks.php">
3  <div class="th title"><?php echo sprintf(__('%s settings','rmcommon'), $block->getVar('name')); ?><span class="close" onclick="blocksAjax.close();"></span></div>
4  <div class="content">
5  <div class="bk_tab_titles">
6  <span id="tab-general" class="selected"><?php _e('General Settings','rmcommon'); ?></span>
7  <?php if($block_options || $block->getVar('type')=='custom'): ?><span id="tab-custom"><?php _e('Custom Options','rmcommon'); ?></span><?php endif; ?>
8  <span id="tab-permissions" class=""><?php _e('Permissions','rmcommon'); ?></span>
9  </div>
10  <div class="bk_tab" id="general-content">
11  <label for="bk-name" class="options"><?php _e('Block Title','rmcommon'); ?></label>
12  <input type="text" name="bk_name" size="50" class="big" value="<?php echo $block->getVar('name'); ?>" />
13  <div class="left">
14  <label for="bk-pos" class="options"><?php _e('Block position','rmcommon'); ?></label>
15  <select name="bk_pos" id="bk-pos">
16  <?php foreach($positions as $pos): ?>
17  <option value="<?php echo $pos['id_position']; ?>"<?php echo $block->getVar('canvas')==$pos['id_position']?' selected="selected"' : ''; ?>><?php echo $pos['name']; ?></option>
18  <?php endforeach; ?>
19  </select>
20  </div>
21  <div class="right">
22  <label for="bk-weight" class="options"><?php _e('Block weight','rmcommon'); ?></label>
23  <input type="text" name="bk_weight" id="bk-weight" value="<?php echo $block->getVar('weight'); ?>" />
24  </div>
25  <div class="clearer"></div>
26  <div class="left">
27  <label for="bk-visible" class="options"><?php _e('Visible','rmcommon'); ?></label>
28  <label style="display: inline;"><input type="radio" value="1" name="bk_visible" id="bk-visible" <?php echo $block->getVar('visible')==1?'checked="checked"':''; ?>/> <?php _e('Yes','rmcommon'); ?></label>
29  <label style="display: inline;"><input type="radio" value="0" name="bk_visible" <?php echo $block->getVar('visible')==0?'checked="checked"':''; ?>/> <?php _e('No','rmcommon'); ?></label>
30  </div>
31  <div class="right">
32  <label for="bk-cache" class="options"><?php _e('Cache lifetime','rmcommon'); ?></label>
33  <select size="1" name="bk_cache" id="bk-cache">
34  <option value="0" selected="selected"><?php _e('No Cache','rmcommon'); ?></option>
35  <option value="30"><?php _e('30 seconds','rmcommon'); ?></option>
36  <option value="60"><?php _e('1 minute','rmcommon'); ?></option>
37  <option value="300"><?php _e('5 minutes','rmcommon'); ?></option>
38  <option value="1800"><?php _e('30 minutes','rmcommon'); ?></option>
39  <option value="3600"><?php _e('1 hour','rmcommon'); ?></option>
40  <option value="18000"><?php _e('5 hours','rmcommon'); ?></option>
41  <option value="86400"><?php _e('1 day','rmcommon'); ?></option>
42  <option value="259200"><?php _e('3 days','rmcommon'); ?></option>
43  <option value="604800"><?php _e('1 week','rmcommon'); ?></option>
44  <option value="2592000"><?php _e('1 month','rmcommon'); ?></option>
45  </select>
46  </div>
47  <div class="clearer"></div>
48  <label for="bk-canvas" class="options"><?php _e('Visible in','rmcommon'); ?></label>
49  <?php echo $canvas->render(); ?>
50  <div class="clear">&nbsp;</div>
51  </div>
52  <?php if($block_options || $block->getVar('type')=='custom'): ?>
53  <div class="bk_tab" id="custom-content">
54  <?php echo $block_options; ?>
55  <?php if($block->getVar('type')=='custom'): ?>
56  <textarea cols="45" rows="10" name="bk_content" id="bk-content" style="width: 97%; height: 300px;"><?php echo htmlspecialchars($block->getVar('content')); ?></textarea>
57  <label for="c-type"><?php _e('Content type:','rmcommon'); ?></label>
58  <select name="bk_ctype" id="c-type">
59  <option value="TEXT"<?php echo $block->getVar('content_type')=='TEXT' ? ' selected="selected"' : ''; ?>><?php _e('Formatted text','rmcommon'); ?></option>
60  <option value="HTML"<?php echo $block->getVar('content_type')=='HTML' ? ' selected="selected"' : ''; ?>><?php _e('HTML block','rmcommon'); ?></option>
61  <option value="PHP"<?php echo $block->getVar('content_type')=='PHP' ? ' selected="selected"' : ''; ?>><?php _e('PHP block','rmcommon'); ?></option>
62  <option value="XOOPS"<?php echo $block->getVar('content_type')=='XOOPS' ? ' selected="selected"' : ''; ?>><?php _e('XOOPS code','rmcommon'); ?></option>
63  </select>
64  <?php endif; ?>
65  </div>
66  <?php endif; ?>
67 
68  <div class="bk_tab" id="block-permissions">
69  <label class="options"><?php _e('Read Permissions','rmcommon'); ?></label>
70  <?php echo $groups->render(); ?>
71  </div>
72 
73  <div class="bk_buttons">
74  <input type="button" value="<?php _e('Cancel','rmcommon'); ?>" onclick="blocksAjax.close();" />
75  <input type="submit" value="<?php _e('Save','rmcommon'); ?>" onclick="blocksAjax.sendConfig(); return false;" />
76  </div>
77  <?php echo $xoopsSecurity->getTokenHTML(); ?>
78  </div>
79  <input type="hidden" name="action" value="saveconfig" />
80  <input type="hidden" name="bid" value="<?php echo $id; ?>" />
81 </form>
82 </div>