cryptonas-branches/pythonrewrite/plugins/volume_props/volume_properties.cs

76 lines
3.0 KiB
C#

<?cs # $Id$ ?>
<?cs include:Settings.TemplateDir + "/show_volume_header.cs" ?>
<h2><?cs var:html_escape(Lang.Plugins.volume_props.Title.Properties) ?></h2>
<?cs call:handle_messages() ?>
<?cs if:Data.CurrentDisk.active ?>
<?cs call:hint("Plugins.volume_props.UmountBeforeProps") ?>
<?cs else ?>
<table>
<?cs # name change is only possible if the volume is not mounted ?>
<tr><td colspan="3">
<h3><?cs var:html_escape(Lang.Plugins.volume_props.Title.ChangeVolumeName) ?></h3>
</td></tr>
<?cs call:print_form_header("set_name", "volume_props") ?><tr>
<td align="right"><label for="vol_name"><?cs var:html_escape(Lang.Text.ContainerName) ?>: </label></td>
<td><input type="text" name="vol_name" tabindex="10" size="15" id="vol_name" value="<?cs var:html_escape(Data.CurrentDisk.name) ?>" /></td>
<td>
<input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="store" value="set_name" />
<button type="submit" tabindex="11"><?cs var:html_escape(Lang.Plugins.volume_props.Button.ContainerNameSet) ?></button>
</td>
</tr></form>
<tr><td></td><td></td><td></td></tr>
<?cs # show password change form only for encrypted volumes ?>
<?cs if:Data.CurrentDisk.encryption ?>
<?cs # password change is only possible if the volume is not mounted ?>
<tr><td colspan="3">
<h3><?cs var:html_escape(Lang.Plugins.volume_props.Title.ChangePassword) ?></h3>
</td></tr>
<?cs call:print_form_header("set_password", "volume_props") ?>
<tr>
<td align="right"><label for="old_pw"><?cs var:html_escape(Lang.Text.EnterCurrentPassword) ?>: </label></td>
<td><input type="password" name="old_pw" tabindex="20" size="15" id="old_pw" /></td>
<td></td>
</tr>
<tr>
<td align="right"><label for="new_pw"><?cs var:html_escape(Lang.Text.EnterNewPassword) ?>: </label></td>
<td><input type="password" name="new_pw" tabindex="21" size="15" id="new_pw" /></td>
<td></td>
</tr>
<tr>
<td align="right"><label for="new_pw2"><?cs var:html_escape(Lang.Text.EnterSamePassword) ?>: </label></td>
<td><input type="password" name="new_pw2" tabindex="22" size="15" id="new_pw2" /></td>
<td>
<input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="store" value="change_pw" />
<button type="submit" tabindex="23"><?cs var:html_escape(Lang.Plugins.volume_props.Button.ChangePassword) ?></button>
</td>
</tr>
</form>
<?cs else ?>
<tr><td colspan="3">
<h3><?cs var:html_escape(Lang.Plugins.volume_props.Title.Encryption) ?></h3>
</td></tr>
<tr><td colspan="2" align="left"><?cs var:html_escape(Lang.Plugins.volume_props.Text.FormatForEncryptionSupport) ?></td>
<td>
<?cs call:print_form_header("enable_encryption", "format_fs") ?>
<button type="submit" tabindex="30"><?cs var:html_escape(Lang.Plugins.volume_props.Button.FormatContainer) ?></button>
</td></tr>
<?cs /if ?>
</table>
<?cs /if ?>
<?cs include:Settings.TemplateDir + "/show_volume_footer.cs" ?>