$this->SiteConfig->create();
$fields = $this->SiteConfig->fields['add'];
}
+
+ if (
+ $k == 'Upload.imagefile.FileSizeMax' ||
+ $k == 'Upload.imagefile.WidthMax' ||
+ $k == 'Upload.imagefile.HeightMax'
+ ) {
+ $v['value'] = intval($v['value']);
+ if ($v['value'] < 0) {
+ $v['value'] = NULL;
+ }
+ }
+
$data['SiteConfig'] = $v;
if (!$this->SiteConfig->save($data, true, $fields)) {
<fieldset>
<legend><?php __('Edit Site Config');?></legend>
-<table cellpadding="0" cellspacing="0">
-
+<table>
<tr>
<th><?php echo __('Site Name') ?></th>
<td id="Site_siteName">
echo $form->end('Submit');
?>
</p>
+</div>
+
+
+<div class="upload">
+<p>
+<?php echo $form->create('SiteConfig', array('url' => array(
+ 'controller' => 'site_configs',
+ 'action' => 'admin_edit',
+)));?>
+<fieldset>
+<legend><?php __('Edit File Upload Config');?></legend>
+
+<table>
+<tr>
+<th><?php echo __('Upload Imagefile FileSize Max') ?></th>
+<td class="sizeInput" id="Upload_imagefileFileSizeMax">
+<input name="data[SiteConfig][Upload.imagefile.FileSizeMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.FileSizeMax']['value'];?>"> <?php __('kByte') ?>
+<input name="data[SiteConfig][Upload.imagefile.FileSizeMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.FileSizeMax']['id'];?>"><br>
+<?php echo $html->div('caption', __('Zero or NULL means NO LIMIT.', true)); ?>
+</td>
+</tr>
+<tr>
+<th><?php echo __('Upload Imagefile Width Max') ?></th>
+<td class="sizeInput" id="Upload_imagefileWidthMax">
+<input name="data[SiteConfig][Upload.imagefile.WidthMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.WidthMax']['value'];?>"> <?php __('px') ?>
+<input name="data[SiteConfig][Upload.imagefile.WidthMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.WidthMax']['id'];?>"><br>
+<?php echo $html->div('caption', __('Zero or NULL means NO LIMIT.', true)); ?>
+</td>
+</tr>
+<tr>
+<th><?php echo __('Upload Imagefile Height Max') ?></th>
+<td class="sizeInput" id="Upload_imagefileHeightMax">
+<input name="data[SiteConfig][Upload.imagefile.HeightMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.HeightMax']['value'];?>"> <?php __('px') ?>
+<input name="data[SiteConfig][Upload.imagefile.HeightMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.HeightMax']['id'];?>"><br>
+<?php echo $html->div('caption', __('Zero or NULL means NO LIMIT.', true)); ?>
+</td>
+</tr>
+
+</table>
+</fieldset>
+<?php
+ echo $token->create();
+ echo $form->end('Submit');
+?>
+</p>
+</div>
+
+
+</div>
</div>
+