Add Type to Storage Editing
This commit is contained in:
parent
345d9749ce
commit
ed92abfc76
|
@ -24,7 +24,7 @@ if ( !canEdit( 'System' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $_REQUEST['id'] ) {
|
if ( $_REQUEST['id'] ) {
|
||||||
if ( !($newStorage = dbFetchOne( 'SELECT * FROM Storage WHERE Id = ?', NULL, ARRAY($_REQUEST['id'])) ) ) {
|
if ( !($newStorage = dbFetchOne('SELECT * FROM Storage WHERE Id=?', NULL, ARRAY($_REQUEST['id'])) ) ) {
|
||||||
$view = 'error';
|
$view = 'error';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,11 @@ if ( $_REQUEST['id'] ) {
|
||||||
$newStorage = array();
|
$newStorage = array();
|
||||||
$newStorage['Name'] = translate('NewStorage');
|
$newStorage['Name'] = translate('NewStorage');
|
||||||
$newStorage['Path'] = '';
|
$newStorage['Path'] = '';
|
||||||
|
$newStorage['Type'] = 'local';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$type_options = array( 'local' => translate('Local'), 's3fs' => translate('s3fs') );
|
||||||
|
|
||||||
$focusWindow = true;
|
$focusWindow = true;
|
||||||
|
|
||||||
xhtmlHeaders(__FILE__, translate('Storage')." - ".$newStorage['Name'] );
|
xhtmlHeaders(__FILE__, translate('Storage')." - ".$newStorage['Name'] );
|
||||||
|
@ -48,7 +51,7 @@ xhtmlHeaders(__FILE__, translate('Storage')." - ".$newStorage['Name'] );
|
||||||
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
||||||
<input type="hidden" name="object" value="storage"/>
|
<input type="hidden" name="object" value="storage"/>
|
||||||
<input type="hidden" name="id" value="<?php echo validHtmlStr($_REQUEST['id']) ?>"/>
|
<input type="hidden" name="id" value="<?php echo validHtmlStr($_REQUEST['id']) ?>"/>
|
||||||
<table id="contentTable" class="major" cellspacing="0">
|
<table id="contentTable" class="major">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php echo translate('Name') ?></th>
|
<th scope="row"><?php echo translate('Name') ?></th>
|
||||||
|
@ -58,6 +61,10 @@ xhtmlHeaders(__FILE__, translate('Storage')." - ".$newStorage['Name'] );
|
||||||
<th scope="row"><?php echo translate('Path') ?></th>
|
<th scope="row"><?php echo translate('Path') ?></th>
|
||||||
<td><input type="text" name="newStorage[Path]" value="<?php echo $newStorage['Path'] ?>"/></td>
|
<td><input type="text" name="newStorage[Path]" value="<?php echo $newStorage['Path'] ?>"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?php echo translate('Type') ?></th>
|
||||||
|
<td><?php echo htmlSelect( 'newStorage[Type]', $type_options, $newStorage['Type'] ); ?></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div id="contentButtons">
|
<div id="contentButtons">
|
||||||
|
|
Loading…
Reference in New Issue