summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c8dd32)
raw | patch | inline | side by side (parent: 9c8dd32)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 13:28:36 +0000 (13:28 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 13:28:36 +0000 (13:28 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19756 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 b59988f3c53ae456b12b272f33498fc86151e508..efee6ed4b4f83f1ae909c459a0d3b234c29187cb 100644 (file)
<table>
+ <tr>
+ <td><LABEL for="kickstartRootEnabled">{t}Root enabled{/t}</LABEL></td>
+ <td>
+ <input type='checkbox' value='1' {if $kickstartRootEnabled} checked {/if}
+ onClick="changeState('kickstartRootPasswordHash');"
+ name="kickstartRootEnabled" id="kickstartRootEnabled"
+ >
+ </td>
+ </tr>
+ <tr>
+ <td><LABEL for="kickstartRootPasswordHash">{t}Root password hash{/t}</LABEL></td>
+ <td>
+ <input type='text' name="kickstartRootPasswordHash" id="kickstartRootPasswordHash"
+ {if !$kickstartRootEnabled} disabled {/if} value="{$kickstartRootPasswordHash}">
+ </td>
+ </tr>
<tr>
<td><LABEL for="member">{t}Member{/t}</LABEL></td>
<td>
- <input type='text' name="member" id="member" value="{$member}">
+ {$memberList}
+ <input type='text' name="member" id="member" value="">
+ <button name='addMember' type='submit'>{msgPool type='addButton'}</button>
</td>
</tr>
<tr>
</tr>
<tr>
<td><LABEL for="kickstartKeyboardlayout">{t}Keyboard layout{/t}</LABEL></td>
-
<td>
<input type='text' name="kickstartKeyboardlayout" id="kickstartKeyboardlayout" value="{$kickstartKeyboardlayout}">
</td>
</select>
</td>
</tr>
-
<tr>
<td><LABEL for="kickstartTimeUTC">{t}UTC Time{/t}</LABEL></td>
<td>
<input type='text' name="kickstartMirrorDN" id="kickstartMirrorDN" value="{$kickstartMirrorDN}">
</td>
</tr>
- <tr>
- <td><LABEL for="kickstartRootEnabled">{t}Root enabled{/t}</LABEL></td>
- <td>
- <input type='text' name="kickstartRootEnabled" id="kickstartRootEnabled" value="{$kickstartRootEnabled}">
- </td>
- </tr>
-
- <tr>
- <td><LABEL for="kickstartRootPasswordHash">{t}Root password hash{/t}</LABEL></td>
- <td>
- <input type='text' name="kickstartRootPasswordHash" id="kickstartRootPasswordHash" value="{$kickstartRootPasswordHash}">
- </td>
- </tr>
<tr>
<td><LABEL for="kickstartKernelPackage">{t}Kernel package{/t}</LABEL></td>
<td>
</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 55037749e8bd3a2d3d8c37dc741ce4c427c329d9..b0c3fb068483f447ee6d6e89fa978442a52613b1 100644 (file)
}
uksort($list, 'strnatcasecmp');
$this->timezones = $list;
+
+ // Prepare member list
+ $this->memberList= new sortableListing($this->member);
+ $this->memberList->setDeleteable(true);
+ $this->memberList->setColspecs(array('*'));
+ $this->memberList->setWidth("100%");
+ $this->memberList->setHeight("70px");
+
+
}
function execute()
foreach($this->attributes as $attr){
$smarty->assign($attr, $this->$attr);
}
+
+ // Fill and render the member list widget
+ $this->memberList->setListData($this->member);
+ $this->memberList->update();
+ $this->memberList->setAcl($this->getacl('member'));
+ $smarty->assign('memberList', $this->memberList->render());
return($smarty->fetch(get_template_path('goto/Device/InstallRecipe.tpl', TRUE)));
}
+
+ function save_object()
+ {
+ plugin::save_object();
+ $this->kickstartRootEnabled = isset($_POST['kickstartRootEnabled']);
+
+ // Update the member list widget.
+ $this->memberList->save_object();
+ $this->member = $this->memberList->getMaintainedData();
+ if(isset($_POST['member']) && isset($_POST['addMember'])){
+ $member= get_post('member');
+ $this->member[] = $member;
+ }
+ }
+
function save()
{
- $this->member = array();
plugin::save();
- #$this->cleanup();
-
- print_a($this->attrs);
+ $this->cleanup();
$ldap=$this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
$ldap->cd($this->dn);