limit => $arg->{limit});
print "</td></tr></table></div>";
-} elsif ($action eq 'medias') {
- $bweb->display_medias();
+} elsif ($action eq 'allmedia') {
+ $bweb->display_allmedia();
} elsif ($action eq 'eject') {
my $arg = $bweb->get_form("ach");
$bweb->update_slots();
}
print "</div><div style='float: left;margin-left: 20px;'>";
- $bweb->move_media();
+ $bweb->move_media('no'); # enabled = no
print "</div>";
} elsif ($action eq 'move_email') {
$bweb->display($bweb, 'about.tpl');
} elsif ($action eq 'intern') {
- $bweb->move_media(); # TODO : remove that
+ $bweb->move_media('yes'); # TODO : remove that
} elsif ($action eq 'move_media') {
- $bweb->move_media();
+ my $a = $bweb->get_form('enabled');
+ $bweb->move_media($a->{enabled});
} elsif ($action eq 'save_location') {
$bweb->save_location();
<div id="div-file-selection" ></div>
<div id="div-tree" ></div>
</div>
+
+<div id="div-resto-dlg" style="visibility:hidden;">
+<div id="div-resto-form" >
+<div id="div-resto-form-bp1"></div> <div id="div-resto-form-bp2"></div>
+</div>
+</div>
</body>
</html>
copy:false,
notifyDrop : function(dd, e, data){
var r;
- //TODO: gerer la multi-selection
if (data.selections) {
if (data.grid.id == 'div-files') {
for(var i=0;i<data.selections.length;i++) {
});
job_combo.on('select', function(e,c) {
- // TODO: choose between date and jobid here (with a toolbar bp ?)
Ext.brestore.jobid = c.json[0];
Ext.brestore.jobdate = c.json[1];
Ext.brestore.root_path='';
cls: 'x-btn-text-icon bmenu', // icon and text class
text:'Options',
menu: menu // assign menu by instance
- }
+ },
+ {
+ icon: '/bweb/remove.png', // icons can also be specified inline
+ cls: 'x-btn-icon',
+ text: 'restore',
+ handler: function() {
+ var dialog = new Ext.LayoutDialog("div-resto-dlg", {
+// modal:true,
+ width:600,
+ height:400,
+ shadow:true,
+ minWidth:300,
+ minHeight:300,
+ proxyDrag: true,
+// west: {
+// split:true,
+// initialSize: 150,
+// minSize: 100,
+// maxSize: 250,
+// titlebar: true,
+// collapsible: true,
+// animate: true
+// },
+ center: {
+ autoScroll:true,
+// tabPosition: 'top',
+// closeOnTab: true,
+// alwaysShowTabs: true
+ }
+ });
+ dialog.addKeyListener(27, dialog.hide, dialog);
+ dialog.addButton('Submit', dialog.hide, dialog);
+ dialog.addButton('Close', dialog.hide, dialog);
+
+ var fs = new Ext.form.Form({
+ labelAlign: 'right',
+ labelWidth: 80
+ });
+
+ fs.fieldset(
+ {legend:'Restore job'},
+ new Ext.form.ComboBox({
+ fieldLabel: 'Replace',
+ hiddenName:'replace',
+ store: new Ext.data.SimpleStore({
+ fields: ['replace'],
+ data : [['always'],['never'],['if newer']]
+ }),
+ displayField:'replace',
+ typeAhead: true,
+ mode: 'local',
+ triggerAction: 'all',
+ emptyText:'never',
+ selectOnFocus:true,
+ width:190
+ }),
+
+ new Ext.form.ComboBox({
+ fieldLabel: 'job',
+ hiddenName:'job',
+ store: client_store,
+ displayField:'name',
+ typeAhead: true,
+ mode: 'local',
+ triggerAction: 'all',
+ emptyText:'Select a job...',
+ selectOnFocus:true,
+ width:190
+ })
+// ,
+// new Ext.form.TextField({
+// fieldLabel: 'Where',
+// name: 'where',
+// width:190
+// }),
+//
+// new Ext.form.ComboBox({
+// fieldLabel: 'client',
+// hiddenName:'client',
+// store: client_store,
+// displayField:'name',
+// typeAhead: true,
+// mode: 'local',
+// triggerAction: 'all',
+// emptyText:'Select a client...',
+// selectOnFocus:true,
+// width:190
+// }),
+// new Ext.form.ComboBox({
+// fieldLabel: 'storage',
+// hiddenName:'storage',
+// store: client_store,
+// displayField:'name',
+// typeAhead: true,
+// mode: 'local',
+// triggerAction: 'all',
+// emptyText:'Select a storage...',
+// selectOnFocus:true,
+// width:190
+// })
+ );
+
+ fs.render('div-resto-form');
+
+// var f = new Ext.form.BasicForm('div-resto-form', {url: '/bweb/test', method: 'GET',
+// baseParams: {init: 1}
+// }
+// );
+
+ var layout = dialog.getLayout();
+ layout.beginUpdate();
+ layout.add('center', new Ext.ContentPanel('div-resto-form', {
+ autoCreate:true, title: 'Third Tab', closable:true, background:true}));
+ layout.endUpdate();
+ dialog.show();
+ }
+ }
]);
////////////////////////////////////////////////////////////////
return val.toFixed(format) + ' ' + unit[i];
}
+function human_enabled(val)
+{
+ if (!val) {
+ return 'no';
+ }
+
+ if (val == 'yes' || val == '1') {
+ return 'yes';
+
+ } else if (val == 'archived' || val == '2') {
+ return 'archived';
+ } else {
+ return 'no';
+ }
+}
+
function human_sec(val)
{
if (!val) {
Puede mover este medio a <TMPL_VAR newlocation>
Medio :
-<TMPL_LOOP Medias>
+<TMPL_LOOP media>
- <TMPL_VAR VolumeName> (<TMPL_VAR location>)
</TMPL_LOOP>
var chkbox;
var d;
-<TMPL_LOOP Medias>
+<TMPL_LOOP media>
d = percent_usage(<TMPL_VAR volusage>);
img = document.createElement('IMG');
</table>
<script type="text/javascript" language="JavaScript">
-var header = new Array("Pool","Online","Location","Vol Status", "Vol Bytes", "Expire",
+var header = new Array("Pool","Online","Enabled","Location","Vol Status", "Vol Bytes", "Expire",
"Retention","Max use duration", "Max jobs" );
var data = new Array();
data.push( new Array(
"<TMPL_VAR poolname>",
img,
+human_enabled("<TMPL_VAR enabled>"),
"<TMPL_VAR location>",
"<TMPL_VAR volstatus>",
human_size(<TMPL_VAR nb_bytes>),
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=Medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR NAME=volumename>';
<td style='align: left;'>
<input type="image" onclick='javascript:window.history.go(-2);' title='Volver' src='/bweb/prev.png'>
</td><td style='align: right;'>
+ <input type="hidden" name='enabled' value="yes">
<input type="image" name='action' value='move_media' title='Cargar selección' src='/bweb/intern.png'>
</td></tr>
</form>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=Medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.name = 'media';
<h1 class='newstitle'>Mover Medio</h1>
</div>
<div class="bodydiv">
- <form action='?' method='get'>
+ <form name='form1' action='?' method='get'>
<table id='id<TMPL_VAR NAME=ID>'></table>
<table border='0'>
<tr><td> Nueva Ubicación: </td><td>
<option value='<TMPL_VAR NAME=location>'><TMPL_VAR NAME=location></option>
</TMPL_LOOP>
</select>
- </td></tr><tr><td> Estado: </td><td>
-<select name='volstatus' class='formulaire'>
- <option value=''>No Actualizar</option>
- <option value='Append'>Listo</option>
- <option value='Archive'>Archivado</option>
- <option value='Disabled'>Desactivado</option>
- <option value='Cleaning'>Limpieza</option>
- <option value='Error'>Error</option>
- <option value='Full'>Lleno</option>
- <option value='Purged'>Purgado</option>
- <option value='Read-Only'>ectura</option>
- <option value='Recycle'>Reciclado</option>
- <option value='Used'>Usado</option>
+ </td></tr><tr><td> Enabled: </td><td>
+<select name='enabled' class='formulaire'>
+ <option value='no'>no</option>
+ <option value='yes'>yes</option>
+ <option value='archived'>archived</option>
</select>
</td><tr><td> Usuario: </td><td>
<input type='text' name='user' value='<TMPL_VAR loginname>' class='formulaire'>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR name=volumename>';
rows_per_page: rows_per_page
}
);
+<TMPL_IF enabled>
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+ if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+ document.form1.enabled[i].selected = true;
+ ok=0;
+ }
+}
+</TMPL_IF>
</script>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR name=volumename>';
</td>
</tr>
+ <tr><td>Enabled:</td>
+ <td> <select name='enabled' class='formulaire'>
+ <option value='yes'>yes</option>
+ <option value='no'>no</option>
+ <option value='archived'>archived</option>
+ </select>
+ </td>
+ </tr>
+
<tr><td> Ubicación : </td>
<td><select name='location' class='formulaire'>
<option value=''></option>
ok=0;
}
}
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+ if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+ document.form1.enabled[i].selected = true;
+ ok=0;
+ }
+}
</script>
Pouvez vous déplacer ces médias vers <TMPL_VAR newlocation> ?
Média :
-<TMPL_LOOP Medias>
+<TMPL_LOOP media>
- <TMPL_VAR VolumeName> (<TMPL_VAR location>)
</TMPL_LOOP>
var chkbox;
var d;
-<TMPL_LOOP Medias>
+<TMPL_LOOP media>
d = percent_usage(<TMPL_VAR volusage>);
img = document.createElement('IMG');
</table>
<script type="text/javascript" language="JavaScript">
-var header = new Array("Pool","En ligne","Localisation","Statut", "Taille", "Expiration",
+var header = new Array("Pool","En ligne","Enabled","Localisation","Statut", "Taille", "Expiration",
"Rétention","Temps maxi d'utilisation", "Nb de job maxi" );
var data = new Array();
data.push( new Array(
"<TMPL_VAR poolname>",
img,
+human_enabled("<TMPL_VAR enabled>"),
"<TMPL_VAR location>",
"<TMPL_VAR volstatus>",
human_size(<TMPL_VAR nb_bytes>),
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=Medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR NAME=volumename>';
<td style='align: left;'>
<input type="image" onclick='javascript:window.history.go(-2);' title='Précédent' src='/bweb/prev.png'>
</td><td style='align: right;'>
+ <input type="hidden" name='enabled' value="yes">
<input type="image" name='action' value='move_media'
src='/bweb/intern.png'>
</td></tr>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=Medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.name = 'media';
<h1 class='newstitle'>Déplacer un média</h1>
</div>
<div class="bodydiv">
- <form action='?' method='get'>
+ <form name='form1' action='?' method='get'>
<table id='id<TMPL_VAR NAME=ID>'></table>
<table border='0'>
<tr><td> Nouvelle localisation : </td><td>
<option value='<TMPL_VAR NAME=location>'><TMPL_VAR NAME=location></option>
</TMPL_LOOP>
</select>
- </td></tr><tr><td> Statut : </td><td>
-<select name='volstatus' class='formulaire'>
- <option value=''>Ne pas modifier</option>
- <option value='Append'>Append</option>
- <option value='Archive'>Archive</option>
- <option value='Disabled'>Disabled</option>
- <option value='Cleaning'>Cleaning</option>
- <option value='Error'>Error</option>
- <option value='Full'>Full</option>
- <option value='Purged'>Purged</option>
- <option value='Read-Only'>Read-Only</option>
- <option value='Recycle'>Recycle</option>
- <option value='Used'>Used</option>
+ </td></tr><tr><td> Enabled: </td><td>
+<select name='enabled' class='formulaire'>
+ <option value='no'>non</option>
+ <option value='yes'>oui</option>
+ <option value='archived'>archive</option>
</select>
</td><tr><td> Utilisateur : </td><td>
<input type='text' name='user' value='<TMPL_VAR loginname>' class='formulaire'>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR name=volumename>';
rows_per_page: rows_per_page
}
);
+
+<TMPL_IF enabled>
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+ if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+ document.form1.enabled[i].selected = true;
+ ok=0;
+ }
+}
+</TMPL_IF>
</script>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR name=volumename>';
</td>
</tr>
+ <tr><td>Enabled :</td>
+ <td> <select name='enabled' class='formulaire'>
+ <option value='yes'>oui</option>
+ <option value='no'>non</option>
+ <option value='archived'>archive</option>
+ </select>
+ </td>
+ </tr>
+
<tr><td> Localisation : </td>
<td><select name='location' class='formulaire'>
<option value=''></option>
ok=0;
}
}
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+ if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+ document.form1.enabled[i].selected = true;
+ ok=0;
+ }
+}
</script>
return "$val years";
}
+# display Enabled
+sub human_enabled
+{
+ my $val = shift || 0;
+
+ if ($val == 1 or $val eq "yes") {
+ return "yes";
+ } elsif ($val == 2 or $val eq "archived") {
+ return "archived";
+ } else {
+ return "no";
+ }
+}
+
# get Day, Hour, Year
sub from_human_sec
{
poolrecycle => 1,
replace => 1,
expired => 1,
+ enabled => 1,
);
my %opt_p = ( # option with path
fileset=> 1,
FROM MediaType
";
- my $medias = $self->dbh_selectall_hashref($query, 'mediatype');
+ my $media = $self->dbh_selectall_hashref($query, 'mediatype');
$ret{db_mediatypes} = [sort {$a->{mediatype} cmp $b->{mediatype} }
- values %$medias] ;
+ values %$media] ;
}
if ($what{db_locations}) {
{
my ($self) = @_ ;
- my $medias = $self->get_form('jmedias');
+ my $media = $self->get_form('jmedias');
- unless ($medias->{jmedias}) {
+ unless ($media->{jmedias}) {
return undef;
}
my $query = "
SELECT Media.VolumeName AS volumename, Location.Location AS location
FROM Media LEFT JOIN Location ON (Media.LocationId = Location.LocationId)
-WHERE Media.VolumeName IN ($medias->{jmedias})
+WHERE Media.VolumeName IN ($media->{jmedias})
";
my $all = $self->dbh_selectall_hashref($query, 'volumename') ;
sub move_media
{
- my ($self) = @_ ;
+ my ($self, $in) = @_ ;
- my $medias = $self->get_selected_media_location();
+ my $media = $self->get_selected_media_location();
- unless ($medias) {
+ unless ($media) {
return ;
}
-
+
my $elt = $self->get_form('db_locations');
$self->display({ ID => $cur_id++,
+ enabled => human_enabled($in),
%$elt, # db_locations
- medias => [
- sort { $a->{volumename} cmp $b->{volumename} } values %$medias
+ media => [
+ sort { $a->{volumename} cmp $b->{volumename} } values %$media
],
},
"move_media.tpl");
my $all = $self->dbh_selectall_hashref($query, 'volumename') ;
- $self->display({ Medias => [ values %$all ] },
+ $self->display({ Media => [ values %$all ] },
"help_extern_compute.tpl");
}
my $all = $self->dbh_selectall_hashref($query, 'volumename') ;
- $self->display({ Medias => [ values %$all ] },
+ $self->display({ Media => [ values %$all ] },
"help_intern_compute.tpl");
}
}
if ($elt{mediatypes}) {
- my @medias = grep { ! /^\s*$/ } CGI::param('mediatype');
- if (@medias) {
- $ret{mediatypes} = \@medias;
- my $str = $self->dbh_join(@medias);
+ my @media = grep { ! /^\s*$/ } CGI::param('mediatype');
+ if (@media) {
+ $ret{mediatypes} = \@media;
+ my $str = $self->dbh_join(@media);
$limit .= "AND Media.MediaType IN ($str) ";
}
}
$self->display({ ID => $cur_id++,
Pool => $elt{pool},
Location => $elt{location},
- Medias => [ values %$all ],
+ Media => [ values %$all ],
},
"display_media.tpl");
}
-sub display_medias
+sub display_allmedia
{
my ($self) = @_ ;
{
my ($self) = @_ ;
- my $medias = $self->get_form('jmedias');
+ my $media = $self->get_form('jmedias');
- unless ($medias->{jmedias}) {
+ unless ($media->{jmedias}) {
return $self->error("Can't get media selection");
}
my $query="
SELECT InChanger AS online,
+ Media.Enabled AS enabled,
VolBytes AS nb_bytes,
VolumeName AS volumename,
VolStatus AS volstatus,
FROM Pool,
Media LEFT JOIN Location ON (Media.LocationId = Location.LocationId)
WHERE Pool.PoolId = Media.PoolId
- AND VolumeName IN ($medias->{jmedias})
+ AND VolumeName IN ($media->{jmedias})
";
my $all = $self->dbh_selectall_hashref($query, 'volumename') ;
{
my ($self) = @_ ;
- my $medias = $self->get_selected_media_location();
- unless ($medias) {
+ my $media = $self->get_selected_media_location();
+ unless ($media) {
return ;
}
$self->display({ email => $self->{info}->{email_media},
%$arg,
- medias => [ values %$medias ],
+ media => [ values %$media ],
},
"update_location.tpl");
}
Media.VolUseDuration AS voluseduration,
Media.VolRetention AS volretention,
Media.Comment AS comment,
- PoolRecycle.Name AS poolrecycle
+ PoolRecycle.Name AS poolrecycle,
+ Media.Enabled AS enabled
FROM Media INNER JOIN Pool AS PoolMedia ON (Media.PoolId = PoolMedia.PoolId)
LEFT JOIN Pool AS PoolRecycle ON (Media.RecyclePoolId = PoolRecycle.PoolId)
my $row = $self->dbh_selectrow_hashref($query);
$row->{volretention} = human_sec($row->{volretention});
$row->{voluseduration} = human_sec($row->{voluseduration});
+ $row->{enabled} = human_enabled($row->{enabled});
my $elt = $self->get_form(qw/db_pools db_locations/);
{
my ($self) = @_ ;
- my $medias = $self->get_selected_media_location();
- unless ($medias) {
+ my $media = $self->get_selected_media_location();
+ unless ($media) {
return $self->error("Can't get media selection");
}
my $newloc = CGI::param('newlocation');
my $comm = CGI::param('comment') || '';
$comm = $self->dbh_quote("$user: $comm");
- my $query;
+ my $arg = $self->get_form('enabled');
+ my $en = human_enabled($arg->{enabled});
+ my $b = $self->get_bconsole();
- foreach my $media (keys %$medias) {
+ my $query;
+ foreach my $vol (keys %$media) {
$query = "
INSERT LocationLog (Date, Comment, MediaId, LocationId, NewVolStatus)
VALUES(
- NOW(), $comm, (SELECT MediaId FROM Media WHERE VolumeName = '$media'),
- (SELECT LocationId FROM Location WHERE Location = '$medias->{$media}->{location}'),
- (SELECT VolStatus FROM Media WHERE VolumeName = '$media')
+ NOW(), $comm, (SELECT MediaId FROM Media WHERE VolumeName = '$vol'),
+ (SELECT LocationId FROM Location WHERE Location = '$media->{$vol}->{location}'),
+ (SELECT VolStatus FROM Media WHERE VolumeName = '$vol')
)
";
$self->dbh_do($query);
$self->debug($query);
+ $b->send_cmd("update volume=\"$vol\" enabled=$en");
}
+ $b->close();
my $q = new CGI;
$q->param('action', 'update_location');
$self->display({ email => $self->{info}->{email_media},
url => $url,
newlocation => $newloc,
- # [ { volumename => 'vol1' }, { volumename => 'vol2'Â\81Â\81Â },..]
- medias => [ values %$medias ],
+ # [ { volumename => 'vol1' }, { volumename => 'vol2' },..]
+ media => [ values %$media ],
},
"change_location.tpl");
$a->status();
$a->{have_status} = 1;
}
-
+ # TODO: set enabled
print "eject $vol->{volumename} from $vol->{storage} : ";
if ($a->send_to_io($vol->{slot})) {
print "<img src='/bweb/T.png' alt='ok'><br/>";
my $arg = $self->get_form(qw/media volstatus inchanger pool
slot volretention voluseduration
maxvoljobs maxvolfiles maxvolbytes
- qcomment poolrecycle
+ qcomment poolrecycle enabled
/);
unless ($arg->{media}) {
$update .= " slot=0 inchanger=no ";
}
+ if ($arg->{enabled}) {
+ $update .= " enabled=$arg->{enabled} ";
+ }
+
if ($arg->{pool}) {
$update .= " pool=$arg->{pool} " ;
}
Could you move these media to <TMPL_VAR newlocation>
Media :
-<TMPL_LOOP Medias>
+<TMPL_LOOP media>
- <TMPL_VAR VolumeName> (<TMPL_VAR location>)
</TMPL_LOOP>
var chkbox;
var d;
-<TMPL_LOOP Medias>
+<TMPL_LOOP media>
d = percent_usage(<TMPL_VAR volusage>);
img = document.createElement('IMG');
</table>
<script type="text/javascript" language="JavaScript">
-var header = new Array("Pool","Online","Location","Vol Status", "Vol Bytes", "Expire",
+var header = new Array("Pool","Online","Enabled", "Location","Vol Status", "Vol Bytes", "Expire",
"Retention","Max use duration", "Max jobs" );
var data = new Array();
data.push( new Array(
"<TMPL_VAR poolname>",
img,
+human_enabled("<TMPL_VAR enabled>"),
"<TMPL_VAR location>",
"<TMPL_VAR volstatus>",
human_size(<TMPL_VAR nb_bytes>),
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=Medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR NAME=volumename>';
<td style='align: left;'>
<input type="image" onclick='javascript:window.history.go(-2);' title='Back' src='/bweb/prev.png'>
</td><td style='align: right;'>
+ <input type="hidden" name='enabled' value="yes">
<input type="image" name='action' value='move_media'
src='/bweb/intern.png'>
</td></tr>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=Medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.name = 'media';
<h1 class='newstitle'>Move media</h1>
</div>
<div class="bodydiv">
- <form action='?' method='get'>
+ <form name='form1' action='?' method='get'>
<table id='id<TMPL_VAR NAME=ID>'></table>
<table border='0'>
<tr><td> New location: </td><td>
<option value='<TMPL_VAR NAME=location>'><TMPL_VAR NAME=location></option>
</TMPL_LOOP>
</select>
- </td></tr><tr><td> Status: </td><td>
-<select name='volstatus' class='formulaire'>
- <option value=''>Don't update</option>
- <option value='Append'>Append</option>
- <option value='Archive'>Archive</option>
- <option value='Disabled'>Disabled</option>
- <option value='Cleaning'>Cleaning</option>
- <option value='Error'>Error</option>
- <option value='Full'>Full</option>
- <option value='Purged'>Purged</option>
- <option value='Read-Only'>Read-Only</option>
- <option value='Recycle'>Recycle</option>
- <option value='Used'>Used</option>
+ </td></tr><tr><td> Enabled: </td><td>
+<select name='enabled' class='formulaire'>
+ <option value='no'>no</option>
+ <option value='yes'>yes</option>
+ <option value='archived'>archived</option>
</select>
</td><tr><td> User: </td><td>
<input type='text' name='user' value='<TMPL_VAR loginname>' class='formulaire'>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR name=volumename>';
rows_per_page: rows_per_page
}
);
+<TMPL_IF enabled>
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+ if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+ document.form1.enabled[i].selected = true;
+ ok=0;
+ }
+}
+</TMPL_IF>
</script>
var data = new Array();
var chkbox;
-<TMPL_LOOP NAME=medias>
+<TMPL_LOOP NAME=media>
chkbox = document.createElement('INPUT');
chkbox.type = 'checkbox';
chkbox.value = '<TMPL_VAR name=volumename>';
</td>
</tr>
+ <tr><td>Enabled:</td>
+ <td> <select name='enabled' class='formulaire'>
+ <option value='yes'>yes</option>
+ <option value='no'>no</option>
+ <option value='archived'>archived</option>
+ </select>
+ </td>
+ </tr>
+
<tr><td> Location : </td>
<td><select name='location' class='formulaire'>
<option value=''></option>
ok=0;
}
}
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+ if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+ document.form1.enabled[i].selected = true;
+ ok=0;
+ }
+}
</script>