Code

Apply patch by mba for Trac #2667
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Jun 2009 12:16:57 +0000 (12:16 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Jun 2009 12:16:57 +0000 (12:16 +0000)
- Add download button for logon scripts
- Change button label from "Import" to "Import script"

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13773 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-plugins/goto/locale/de/LC_MESSAGES/messages.po
trunk/gosa-plugins/goto/locale/messages.po
trunk/gosa-plugins/goto/personal/environment/class_logonManagementDialog.inc
trunk/gosa-plugins/goto/personal/environment/logonManagement.tpl

index da04eac747900a2100e529fe15ebfc70daf94df8..6a5a6c065b3acaea15ed6f21a0d9fec2207d0696 100644 (file)
@@ -13,7 +13,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: messages\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-22 14:24+0200\n"
+"POT-Creation-Date: 2009-06-23 11:22+0200\n"
 "PO-Revision-Date: 2008-12-04 11:18+0100\n"
 "Last-Translator: Cajus Pollmeier <pollmeier@gonicus.de>\n"
 "Language-Team: deutsch <de@li.org>\n"
@@ -157,6 +157,10 @@ msgstr "Anlegen"
 msgid "Import"
 msgstr "Importieren"
 
+#: personal/environment/logonManagement.tpl:65
+msgid "Import script"
+msgstr "Skript importieren"
+
 #: addons/goto/class_gotomasses.inc:380
 msgid "Resume"
 msgstr "Fortsetzen"
@@ -369,6 +373,7 @@ msgstr "Stelle einen Mechanismus bereit um Systemen automatisch zu aktivieren"
 #: admin/systems/goto/class_printGeneric.inc:966
 #: admin/systems/goto/workstation.tpl:19 admin/systems/goto/printer.tpl:16
 #: admin/systems/goto/terminal.tpl:19
+#: personal/environment/class_logonManagementDialog.inc:125
 msgid "Description"
 msgstr "Beschreibung"
 
@@ -1280,6 +1285,7 @@ msgstr "Einstellungen für Anmelde-Skripte"
 
 #: personal/environment/logonManagement.tpl:10
 #: personal/environment/class_logonManagementDialog.inc:107
+#: personal/environment/class_logonManagementDialog.inc:121
 msgid "Script name"
 msgstr "Skriptname"
 
@@ -1436,6 +1442,7 @@ msgstr "Standard umschalten"
 #: admin/systems/goto/class_printGeneric.inc:720
 #: admin/systems/goto/class_printGeneric.inc:964
 #: admin/groups/apps/edit_entry.tpl:43
+#: personal/environment/class_logonManagementDialog.inc:117
 msgid "Name"
 msgstr "Name"
 
@@ -1588,6 +1595,7 @@ msgid "Place entry in members launch bar"
 msgstr "Platziere einen Eintrag in der Kontrollleiste der Gruppenmitglieder"
 
 #: admin/applications/generic.tpl:144
+#: personal/environment/class_logonManagementDialog.inc:57
 msgid "Download"
 msgstr "Herunterladen"
 
index be40fb55a089610d5337d301ea54992abe350390..3e0928720079d75e94cf1f9b590bf30589ba58de 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-22 14:24+0200\n"
+"POT-Creation-Date: 2009-06-23 11:22+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -147,6 +147,10 @@ msgstr ""
 msgid "Import"
 msgstr ""
 
+#: personal/environment/logonManagement.tpl:65
+msgid "Import script"
+msgstr ""
+
 #: addons/goto/class_gotomasses.inc:380
 msgid "Resume"
 msgstr ""
@@ -358,6 +362,7 @@ msgstr ""
 #: admin/systems/goto/class_printGeneric.inc:966
 #: admin/systems/goto/workstation.tpl:19 admin/systems/goto/printer.tpl:16
 #: admin/systems/goto/terminal.tpl:19
+#: personal/environment/class_logonManagementDialog.inc:125
 msgid "Description"
 msgstr ""
 
@@ -1251,6 +1256,7 @@ msgstr ""
 
 #: personal/environment/logonManagement.tpl:10
 #: personal/environment/class_logonManagementDialog.inc:107
+#: personal/environment/class_logonManagementDialog.inc:121
 msgid "Script name"
 msgstr ""
 
@@ -1405,6 +1411,7 @@ msgstr ""
 #: admin/systems/goto/class_printGeneric.inc:720
 #: admin/systems/goto/class_printGeneric.inc:964
 #: admin/groups/apps/edit_entry.tpl:43
+#: personal/environment/class_logonManagementDialog.inc:117
 msgid "Name"
 msgstr ""
 
@@ -1557,6 +1564,7 @@ msgid "Place entry in members launch bar"
 msgstr ""
 
 #: admin/applications/generic.tpl:144
+#: personal/environment/class_logonManagementDialog.inc:57
 msgid "Download"
 msgstr ""
 
index cd9522785171c47d8dc3cccff364eed9ee94028a..653324eb7ff6e5a0af1bd78655fd52efeef9474c 100644 (file)
@@ -47,6 +47,19 @@ class logonManagementDialog extends plugin
       @unlink($_FILES['importFile']['tmp_name']);
     }
 
+    if(isset($_GET['getLogonData'])){
+      send_binary_content($this->LogonData, $this->real_LogonName);
+    }
+
+    /* Create download button*/
+    if($this->dn != "new" && $this->LogonData != ""){
+      $smarty->assign("DownMe","<a href='?plug=".$_GET['plug']."&getLogonData'>
+          <img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0 class='center'>
+        </a>");
+    }else{
+      $smarty->assign("DownMe","");
+    }
+
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
       if($this->$attr){
index 937f71f9db578716fe879194d14cc71437a764ec..73d36e84ae030f39d6dc3a89ee731d7621f733af 100644 (file)
@@ -62,7 +62,8 @@
                                                <tr>
                                                        <td>
                                                                <input type="file" name="importFile" id="importFile">
-                                                               <input type="submit" value="{t}Import{/t}" name="StartImport" >
+                                                               <input type="submit" value="{t}Import script{/t}" name="StartImport" >
+                                                               {$DownMe}
                                                        </td>
                                                </tr>
                                        </table>