summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bde16e1)
raw | patch | inline | side by side (parent: bde16e1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 12:16:34 +0000 (12:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 12:16:34 +0000 (12:16 +0000) |
-Added timezone selection
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19755 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19755 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl b/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl
index 7b75e501401d61c4bcd1b0be229da9012f6f841b..b59988f3c53ae456b12b272f33498fc86151e508 100644 (file)
</td>
</tr>
<tr>
- <td><LABEL for="ksTemplate">{t}Kickstart template{/t}</LABEL></td>
+ <td><LABEL for="kickstartTemplateDN">{t}Kickstart template{/t}</LABEL></td>
<td>
- <input type='text' name="ksTemplate" id="ksTemplate" value="{$ksTemplate}">
+ <input type='text' name="kickstartTemplateDN" id="kickstartTemplateDN" value="{$kickstartTemplateDN}">
</td>
</tr>
<tr>
- <td><LABEL for="ksKeyboardlayout">{t}Keyboard layout{/t}</LABEL></td>
+ <td><LABEL for="kickstartKeyboardlayout">{t}Keyboard layout{/t}</LABEL></td>
<td>
- <input type='text' name="ksKeyboardlayout" id="ksKeyboardlayout" value="{$ksKeyboardlayout}">
+ <input type='text' name="kickstartKeyboardlayout" id="kickstartKeyboardlayout" value="{$kickstartKeyboardlayout}">
</td>
</tr>
<tr>
- <td><LABEL for="ksSystemLocale">{t}System locale{/t}</LABEL></td>
+ <td><LABEL for="kickstartSystemLocale">{t}System locale{/t}</LABEL></td>
<td>
- <input type='text' name="ksSystemLocale" id="ksSystemLocale" value="{$ksSystemLocale}">
+ <input type='text' name="kickstartSystemLocale" id="kickstartSystemLocale" value="{$kickstartSystemLocale}">
</td>
</tr>
<tr>
- <td><LABEL for="ksTimezone">{t}Timezone{/t}</LABEL></td>
+ <td><LABEL for="kickstartTimezone">{t}Timezone{/t}</LABEL></td>
<td>
- <select size='1' name="ksTimezone" id="ksTimezone">
- {html_options values=$timezones options=$timezones selected=$ksTimezone}
+ <select size='1' name="kickstartTimezone" id="kickstartTimezone">
+ {html_options values=$timezones options=$timezones selected=$kickstartTimezone}
</select>
</td>
</tr>
<tr>
- <td><LABEL for="ksTimeUTC">{t}UTC Time{/t}</LABEL></td>
+ <td><LABEL for="kickstartTimeUTC">{t}UTC Time{/t}</LABEL></td>
<td>
- <input type='text' name="ksTimeUTC" id="ksTimeUTC" value="{$ksTimeUTC}">
+ <input type='text' name="kickstartTimeUTC" id="kickstartTimeUTC" value="{$kickstartTimeUTC}">
</td>
</tr>
<tr>
- <td><LABEL for="ksNTPServer">{t}NTP server{/t}</LABEL></td>
+ <td><LABEL for="kickstartNTPServer">{t}NTP server{/t}</LABEL></td>
<td>
- <input type='text' name="ksNTPServer" id="ksNTPServer" value="{$ksNTPServer}">
+ <input type='text' name="kickstartNTPServer" id="kickstartNTPServer" value="{$kickstartNTPServer}">
</td>
</tr>
<tr>
- <td><LABEL for="ksMirror">{t}Mirror{/t}</LABEL></td>
+ <td><LABEL for="kickstartMirrorDN">{t}Mirror{/t}</LABEL></td>
<td>
- <input type='text' name="ksMirror" id="ksMirror" value="{$ksMirror}">
+ <input type='text' name="kickstartMirrorDN" id="kickstartMirrorDN" value="{$kickstartMirrorDN}">
</td>
</tr>
<tr>
- <td><LABEL for="ksMirrorTorrent">{t}Torrent mirror{/t}</LABEL></td>
+ <td><LABEL for="kickstartRootEnabled">{t}Root enabled{/t}</LABEL></td>
<td>
- <input type='text' name="ksMirrorTorrent" id="ksMirrorTorrent" value="{$ksMirrorTorrent}">
- </td>
- </tr>
- <tr>
- <td><LABEL for="ksRootEnabled">{t}Root enabled{/t}</LABEL></td>
- <td>
- <input type='text' name="ksRootEnabled" id="ksRootEnabled" value="{$ksRootEnabled}">
+ <input type='text' name="kickstartRootEnabled" id="kickstartRootEnabled" value="{$kickstartRootEnabled}">
</td>
</tr>
<tr>
- <td><LABEL for="ksRootPasswordHash">{t}Root password hash{/t}</LABEL></td>
+ <td><LABEL for="kickstartRootPasswordHash">{t}Root password hash{/t}</LABEL></td>
<td>
- <input type='text' name="ksRootPasswordHash" id="ksRootPasswordHash" value="{$ksRootPasswordHash}">
+ <input type='text' name="kickstartRootPasswordHash" id="kickstartRootPasswordHash" value="{$kickstartRootPasswordHash}">
</td>
</tr>
<tr>
- <td><LABEL for="ksKernelPackage">{t}Kernel package{/t}</LABEL></td>
+ <td><LABEL for="kickstartKernelPackage">{t}Kernel package{/t}</LABEL></td>
<td>
- <input type='text' name="ksKernelPackage" id="ksKernelPackage" value="{$ksKernelPackage}">
+ <input type='text' name="kickstartKernelPackage" id="kickstartKernelPackage" value="{$kickstartKernelPackage}">
</td>
</tr>
<tr>
- <td><LABEL for="ksPartitionTable">{t}Partition table{/t}</LABEL></td>
+ <td><LABEL for="kickstartPartitionTable">{t}Partition table{/t}</LABEL></td>
<td>
- <input type='text' name="ksPartitionTable" id="ksPartitionTable" value="{$ksPartitionTable}">
+ <input type='text' name="kickstartPartitionTable" id="kickstartPartitionTable" value="{$kickstartPartitionTable}">
</td>
</tr>
</table>
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc
index ae246c8ab7cee77c202bc26dbdb2c2add68c0935..55037749e8bd3a2d3d8c37dc741ce4c427c329d9 100644 (file)
class InstallRecipe extends plugin
{
public $member = array();
- public $ksTemplate = "";
- public $ksKeyboardlayout = "";
- public $ksSystemLocale = "";
- public $ksTimezone = "";
- public $ksTimeUTC = "";
- public $ksNTPServer = "";
- public $ksMirror = "";
- public $ksMirrorTorrent = "";
- public $ksRootEnabled = "";
- public $ksRootPasswordHash = "";
- public $ksKernelPackage = "";
- public $ksPartitionTable = "";
+ public $kickstartTemplateDN = "";
+ public $kickstartKeyboardlayout = "";
+ public $kickstartSystemLocale = "";
+ public $kickstartTimezone = "";
+ public $kickstartTimeUTC = "";
+ public $kickstartNTPServer = "";
+ public $kickstartMirrorDN = "";
+ public $kickstartRootEnabled = "";
+ public $kickstartRootPasswordHash = "";
+ public $kickstartKernelPackage = "";
+ public $kickstartPartitionTable = "";
public $objectclasses = array('installRecipe');
- public $attributes = array("member","ksTemplate","ksKeyboardlayout","ksSystemLocale",
- "ksTimezone","ksTimeUTC","ksNTPServer","ksMirror","ksMirrorTorrent",
- "ksRootEnabled","ksRootPasswordHash","ksKernelPackage","ksPartitionTable");
+ public $attributes = array("member","kickstartTemplateDN","kickstartKeyboardlayout","kickstartSystemLocale",
+ "kickstartTimezone","kickstartTimeUTC","kickstartNTPServer","kickstartMirrorDN",
+ "kickstartRootEnabled","kickstartRootPasswordHash","kickstartKernelPackage","kickstartPartitionTable");
function __construct(&$config, $dn)
{
plugin::plugin($config, $dn);
+ // Preset some values for new accounts
+ if(!$this->is_account){
+
+ // Preset the device timezone
+ $tz = timezone::get_default_timezone();
+ $this->kickstartTimezone = $tz['name'];
+ }
+
// Prepare list of timezones
$tmp = timezone::_get_tz_zones();
$list = array();
$offset = $offset * -1;
$list[$name] = $name." ( - ".sprintf("%0.2f",($offset/(60*60)))." "._("hours").")";
}
- }
+ }
+ uksort($list, 'strnatcasecmp');
$this->timezones = $list;
}
"plCategory" => array("Device"),
"plProvidedAcls" => array(
"member" => _("Member"),
- "ksTemplate" => _("Template"),
- "ksKeyboardlayout" => _("Keyboard layout"),
- "ksSystemLocale" => _("System locale"),
- "ksTimezone" => _("Timezone"),
- "ksTimeUTC" => _("Time"),
- "ksNTPServer" => _("NTP-Server"),
- "ksMirror" => _("Kickstart mirror"),
- "ksMirrorTorrent" => _("Kickstart torrent mirror"),
- "ksRootEnabled" => _("Root login enabled"),
- "ksRootPasswordHash" => _("Root password hash"),
- "ksKernelPackage" => _("Kernal package"),
- "ksPartitionTable" => _("Partition table")
+ "kickstartTemplateDN" => _("Template"),
+ "kickstartKeyboardlayout" => _("Keyboard layout"),
+ "kickstartSystemLocale" => _("System locale"),
+ "kickstartTimezone" => _("Timezone"),
+ "kickstartTimeUTC" => _("Time"),
+ "kickstartNTPServer" => _("NTP-Server"),
+ "kickstartMirrorDN" => _("Kickstart mirror"),
+ "kickstartRootEnabled" => _("Root login enabled"),
+ "kickstartRootPasswordHash" => _("Root password hash"),
+ "kickstartKernelPackage" => _("Kernal package"),
+ "kickstartPartitionTable" => _("Partition table")
)
)
);