浏览代码

Add posibility of link in error box.

stevetruckstuff 19 年之前
父节点
当前提交
fe13fb64e7
共有 1 个文件被更改,包括 18 次插入0 次删除
  1. 18 0
      templates/default/error_box.tpl

+ 18 - 0
templates/default/error_box.tpl

@@ -11,6 +11,12 @@
  *      $error        - Translation of string "ERROR".  This string is
  *                      translated in functions that call this template to
  *                      avoid making multiple translations on this string
+ *      $link         - Array containing link to display to go back, if desired.
+ *                      If no link is dsired, this will be NULL.  The array
+ *                      will contain the following elements:
+ *              $link['URL']    - URL target for link
+ *              $link['FRAME']  - Frame target for link
+ *              $link['TEXT']   - Text to display for link
  * 
  * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -37,6 +43,18 @@ extract($t);
       <?php echo $errorMessage."\n"; ?>
      </td>
     </tr>
+    <?php
+        if (!is_null($link)) {
+            ?>
+    <tr>
+     <td class="error_header">
+      <a href="<?php echo $link['URL']; ?>" target="<?php echo $link['FRAME']; ?>"><?php echo $link['TEXT']; ?></a>
+     </td>
+    </tr>
+            
+            <?php
+        }
+    ?>
    </table>
   </td>
  </tr>