From d2e9f837f36402b46d4c81dfd9fc36ee6fdd1226 Mon Sep 17 00:00:00 2001
From: Walter Purcaro <vuolter@gmail.com>
Date: Tue, 24 Jun 2014 19:07:03 +0200
Subject: Fix account representation in web interface (by wurfkeks)

---
 module/web/pyload_app.py                   | 11 +++++------
 module/web/templates/default/settings.html |  6 +++---
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py
index 71adb66a6..324bb31df 100644
--- a/module/web/pyload_app.py
+++ b/module/web/pyload_app.py
@@ -269,13 +269,12 @@ def config():
             data.validuntil  = _("not available")
         else:
             t = time.localtime(data.validuntil)
-            data.validuntil  = time.strftime("%d.%m.%Y", t)
+            data.validuntil  = time.strftime("%d.%m.%Y - %H:%M:%S", t)
 
-        if "time" in data.options:
-            try:
-                data.options["time"] = data.options["time"][0]
-            except:
-                data.options["time"] = "0:00-0:00"
+        try:
+            data.options["time"] = data.options["time"][0]
+        except:
+            data.options["time"] = "0:00-0:00"
 
         if "limitDL" in data.options:
             data.options["limitdl"] = data.options["limitDL"][0]
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html
index da0b535ac..257923cb0 100644
--- a/module/web/templates/default/settings.html
+++ b/module/web/templates/default/settings.html
@@ -113,7 +113,7 @@
                                            <td>
                                                <input id="{{plugin}}|password;{{account.login}}"
                                                       name="{{plugin}}|password;{{account.login}}"
-                                                      type="password" value="{{account.password}}" size="12"/>
+                                                      type="password" size="12"/>
                                            </td>
                                            <td>
                                                {% if account.valid %}
@@ -148,12 +148,12 @@
                                            <td>
                                                <input id="{{plugin}}|time;{{account.login}}"
                                                       name="{{plugin}}|time;{{account.login}}" type="text"
-                                                      size="7" value="{{account.time}}"/>
+                                                      size="7" value="{{account.options['time']}}"/>
                                            </td>
                                            <td>
                                                <input id="{{plugin}}|limitdl;{{account.login}}"
                                                       name="{{plugin}}|limitdl;{{account.login}}" type="text"
-                                                      size="2" value="{{account.limitdl}}"/>
+                                                      size="2" value="{{account.options['limitdl']}}"/>
                                            </td>
                                            <td>
                                                <input id="{{plugin}}|delete;{{account.login}}"
-- 
cgit v1.2.3