cryptonas-branches/pythonrewrite/plugins/partition/set_partitions.cs
lars 1dc0da0382 unittests added to some plugins
added "name" tag to all form elements
2006-10-26 12:25:12 +00:00

64 lines
2.4 KiB
C#

<?cs # $Id$ ?>
<style type="text/css"><?cs include:Data.Plugins.partition.StyleSheetFile ?></style>
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
<div align="center">
<table class="partition">
<tr>
<th><?cs var:html_escape(Lang.Plugins.partition.Text.PartNum) ?></th>
<th><?cs var:html_escape(Lang.Plugins.partition.Text.Size) ?></th>
<th><?cs var:html_escape(Lang.Plugins.partition.Text.PartType) ?></th>
<th></th>
</tr>
<?cs loop: x = #0, subcount(Data.Plugins.partition.Parts)-1, #1 ?>
<tr>
<td><?cs var:x ?></td>
<td><?cs var:Data.Plugins.partition.Parts[x].Size ?></td>
<td><?cs var:Data.Plugins.partition.Parts[x].Type ?></td>
<td>
<?cs call:print_form_header("part_del_" + x, "plugins/partition") ?>
<?cs include:Settings.PluginDir + "/partition/current_partition_info.cs" ?>
<input type="hidden" name="step" value="del_partition" />
<input type="hidden" name="del_num" value="<?cs var:x ?>" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.partition.Button.DelPartition) ?></button>
</form>
</td>
</tr>
<?cs /loop ?></p>
<?cs # new partition input if space is available ?>
<?cs if:Data.Plugins.partition.availSize > 0 ?>
<tr>
<?cs call:print_form_header("part_add", "plugins/partition") ?>
<?cs include:Settings.PluginDir + "/partition/current_partition_info.cs" ?>
<input type="hidden" name="step" value="add_partition" />
<?cs set: x = subcount(Data.Plugins.partition.Parts) ?>
<td><?cs var:x ?></td>
<td><input type="text" name="part<?cs var:x ?>_size" size="8" value="<?cs var:Data.Plugins.partition.availSize ?>" tabindex="1" /></td>
<td><select name="part<?cs var:x ?>_type" tabindex="2" size="0"><?cs each: t = Data.Plugins.partition.Types ?><option <?cs if:t == "windows" ?>selected="selected"<?cs /if ?>><?cs var:t ?></option>
<?cs /each ?></select></td>
<td>
<button type="submit" tabindex="3"><?cs var:html_escape(Lang.Plugins.partition.Button.AddPartition) ?></button>
</td>
</form>
</tr>
<?cs /if ?>
</table>
</div>
<?cs if:subcount(Data.Plugins.partition.Parts) > 0 ?>
<p class="note">
<?cs var:html_escape(Lang.Plugins.partition.Text.WarningMessage) ?>
</p>
<?cs call:print_form_header("part_finish", "plugins/partition") ?>
<?cs include:Settings.PluginDir + "/partition/current_partition_info.cs" ?>
<input type="hidden" name="step" value="finish" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.partition.Button.SavePartitions) ?></button>
</form>
<?cs /if ?>