summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b33bd7d)
raw | patch | inline | side by side (parent: b33bd7d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 15:56:59 +0000 (15:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 15:56:59 +0000 (15:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16963 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/services/kiosk/goKioskService.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc b/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc
index dc27c533356b0224c10a8eda49edfcf3ebcd23eb..780f9d90eeb43839b36f7e3be50329f52a360ad3 100644 (file)
if(file_exists($name)){
$content = file_get_contents($name);
send_binary_content($content,$id);
+ }else{
+ msg_dialog::display(_("Warning"), sprintf(_("The profile does not exists '%s'!"), $name), ERROR_DIALOG);
}
}
}
'tmp_name'=> $file['tmp_name'],
'content' => file_get_contents($file['tmp_name']),
'exists' => TRUE);
- $this->gotoKioskProfiles[] = $tmp;
+
+
+ $used = array();
+ foreach($this->gotoKioskProfiles as $k){
+ $used[] = $k['name'];
+ }
+ if(in_array($file['name'], $used)){
+ msg_dialog::display(_("Warning"), msgPool::duplicated(_("Profile")), WARNING_DIALOG);
+ }else{
+ $this->gotoKioskProfiles[] = $tmp;
+ }
}
}
/* Get id, name and path */
$only_once = false;
- $id = preg_replace("/^delkiosk_/","",$name);
- $id = preg_replace("/_.*$/","",$id);
+ $id = preg_replace("/^delkiosk_([0-9]*)$/","\\1",$name);
$name = $this->gotoKioskProfiles[$id]['name'];
$filename = $this->baseDir."/".$name;
foreach($this->gotoKioskProfiles as $key => $val ){
$del = " ";
if($this->acl_is_writeable("")){
- $del = "<input type='image' src='images/lists/trash.png'
- class='center' alt='delete' name='delkiosk_".$key."'>";
+ $del = image("images/lists/trash.png", 'delkiosk_'.$key);
}
$divlist->AddEntry(array(
- array("string"=>"<a href='?plug=".$_GET['plug']."&getkiosk=".$val['name']."'>".$val['name']."</a>"),
+ array("string"=>"<a href='?plug=".$_GET['plug']."&getkiosk=".$val['name']."'>".$val['name']."</a>"),
array("string"=>$del,
"attach"=>" style='border-right: 0px;width:24px; text-align:center;' ")
));
diff --git a/gosa-plugins/goto/admin/systems/services/kiosk/goKioskService.tpl b/gosa-plugins/goto/admin/systems/services/kiosk/goKioskService.tpl
index b7b3047002ef93a79240b54bb07643729a3767ee..6c2fe6451de832c51f48d511675d8e89ed70e2c9 100644 (file)
{if $baseDir == ""}
-<b>{msgPool type=invalidConfigurationAttribute param=KIOSKPATH}</b>
-
-<hr>
-<div style="width:100%; text-align:right;padding-top:10px;padding-bottom:3px;">
- <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
-
-</div>
+ <b>{msgPool type=invalidConfigurationAttribute param=KIOSKPATH}</b>
+ <hr>
+ <div class="plugin-actions">
+ <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
+ </div>
{else}
- <input type="hidden" name="dialogissubmitted" value="1">
+<input type="hidden" name="dialogissubmitted" value="1">
{t}Server path{/t} <input type='text' name="server_path" style="width:300px;" value="{$server_path}">
-<br>
-<br>
+
{render acl=$ThisACL}
-{$divlist}
+ {$divlist}
{/render}
+
{render acl=$ThisACL}
-<input type="file" size=50 name="newProfile" value="{t}Browse{/t}">
+ <input type="file" size=50 name="newProfile" value="{t}Browse{/t}">
{/render}
-{render acl=$ThisACL}
-<button type='submit' name='profileAdd'>{msgPool type=addButton}</button>
+{render acl=$ThisACL}
+ <button type='submit' name='profileAdd'>{msgPool type=addButton}</button>
{/render}
<hr>
-<div style="width:100%; text-align:right;padding-top:10px;padding-bottom:3px;">
- <button type='submit' name='SaveService'>{msgPool type=saveButton}</button>
-
-
- <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
-
+<div class="plugin-actions">
+ <button type='submit' name='SaveService'>{msgPool type=saveButton}</button>
+ <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
</div>
+
<input type="hidden" name="goKioskPosted" value="1">
<script language="JavaScript" type="text/javascript">