Added status attribute
authorMarcel Werk <burntime@woltlab.com>
Tue, 13 Nov 2012 22:23:59 +0000 (23:23 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 13 Nov 2012 22:23:59 +0000 (23:23 +0100)
com.woltlab.wcf/template/redirect.tpl
wcfsetup/install/files/lib/util/HeaderUtil.class.php

index da71ff9d0143e80d5f75ede72edeff3eec891358..d5293e979ff65cc339ff28d2c2d7ad3045b12361 100644 (file)
@@ -12,7 +12,7 @@
 
 {include file='header'}
        
-<div class="success">
+<div class="{if !$status|empty}{@$status}{else}success{/if}">
        <p>{@$message}</p>
        <a href="{$url}">{lang}wcf.global.redirect.url{/lang}</a>
 </div>
index e6f850c46fdef862eebccaffa761a8b66f323c5c..c7be01a4d111caf212a1b62110a468c7d5793cb6 100644 (file)
@@ -104,13 +104,15 @@ final class HeaderUtil {
         * @param       string          $location
         * @param       string          $message
         * @param       integer         $delay
+        * @param       string          $status
         */
-       public static function delayedRedirect($location, $message, $delay = 5) {
+       public static function delayedRedirect($location, $message, $delay = 5, $status = 'success') {
                WCF::getTPL()->assign(array(
                        'url' => $location,
                        'message' => $message,
                        'wait' => $delay,
-                       'templateName' => 'redirect'
+                       'templateName' => 'redirect',
+                       'status' => $status
                ));
                WCF::getTPL()->display('redirect');
        }