]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Allow no account reference when using the password module
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 May 2019 15:50:28 +0000 (16:50 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 May 2019 15:50:28 +0000 (16:50 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/people/modules/password.html
src/web/people.py

index a70b405a5bdffd2a73f674a9c3907c0b7c96662b..f5d273b3279b98d858250250106298e95527fc6d 100644 (file)
@@ -4,7 +4,7 @@
 
                <input type="password" class="form-control" name="password1"
                        id="password1" placeholder="{{ _("New Password") }}" required
-                       data-user-input="{{ " ".join((account.first_name, account.last_name)) }}">
+                       data-user-input="{% if account %}{{ " ".join((account.first_name, account.last_name)) }}{% end %}">
        </div>
 
        <div class="form-group">
index c429aeb496885a659949f59c3b50a0a65e09e6a2..4b82fb67bc2a399e8031076cbe9dc78105f88046 100644 (file)
@@ -385,7 +385,7 @@ class MOSModule(ui_modules.UIModule):
 
 
 class PasswordModule(ui_modules.UIModule):
-       def render(self, account):
+       def render(self, account=None):
                return self.render_string("people/modules/password.html", account=account)
 
        def javascript_files(self):