Rename form login page
authorSimo Sorce <simo@redhat.com>
Fri, 1 Aug 2014 11:59:52 +0000 (07:59 -0400)
committerPatrick Uiterwijk <puiterwijk@redhat.com>
Wed, 24 Sep 2014 18:29:17 +0000 (20:29 +0200)
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
ipsilon/login/authform.py
ipsilon/login/authpam.py
ipsilon/login/authtest.py
templates/login/form.html [new file with mode: 0644]
templates/login/pam.html [deleted file]

index bd06b60..9e8e56c 100755 (executable)
@@ -31,7 +31,7 @@ class Form(LoginPageBase):
     def GET(self, *args, **kwargs):
         context = self.create_tmpl_context()
         # pylint: disable=star-args
     def GET(self, *args, **kwargs):
         context = self.create_tmpl_context()
         # pylint: disable=star-args
-        return self._template('login/pam.html', **context)
+        return self._template('login/form.html', **context)
 
     def POST(self, *args, **kwargs):
         us = UserSession()
 
     def POST(self, *args, **kwargs):
         us = UserSession()
index 378cfb6..663ed19 100755 (executable)
@@ -43,7 +43,7 @@ class Pam(LoginPageBase):
     def GET(self, *args, **kwargs):
         context = self.create_tmpl_context()
         # pylint: disable=star-args
     def GET(self, *args, **kwargs):
         context = self.create_tmpl_context()
         # pylint: disable=star-args
-        return self._template('login/pam.html', **context)
+        return self._template('login/form.html', **context)
 
     def POST(self, *args, **kwargs):
         username = kwargs.get("login_name")
 
     def POST(self, *args, **kwargs):
         username = kwargs.get("login_name")
@@ -69,7 +69,7 @@ class Pam(LoginPageBase):
             error_username=not username
         )
         # pylint: disable=star-args
             error_username=not username
         )
         # pylint: disable=star-args
-        return self._template('login/pam.html', **context)
+        return self._template('login/form.html', **context)
 
     def root(self, *args, **kwargs):
         op = getattr(self, cherrypy.request.method, self.GET)
 
     def root(self, *args, **kwargs):
         op = getattr(self, cherrypy.request.method, self.GET)
index 289a493..7b66066 100755 (executable)
@@ -28,7 +28,7 @@ class TestAuth(LoginPageBase):
     def GET(self, *args, **kwargs):
         context = self.create_tmpl_context()
         # pylint: disable=star-args
     def GET(self, *args, **kwargs):
         context = self.create_tmpl_context()
         # pylint: disable=star-args
-        return self._template('login/pam.html', **context)
+        return self._template('login/form.html', **context)
 
     def POST(self, *args, **kwargs):
         username = kwargs.get("login_name")
 
     def POST(self, *args, **kwargs):
         username = kwargs.get("login_name")
@@ -53,7 +53,7 @@ class TestAuth(LoginPageBase):
             error_username=not username
         )
         # pylint: disable=star-args
             error_username=not username
         )
         # pylint: disable=star-args
-        return self._template('login/pam.html', **context)
+        return self._template('login/form.html', **context)
 
     def root(self, *args, **kwargs):
         op = getattr(self, cherrypy.request.method, self.GET)
 
     def root(self, *args, **kwargs):
         op = getattr(self, cherrypy.request.method, self.GET)
diff --git a/templates/login/form.html b/templates/login/form.html
new file mode 100644 (file)
index 0000000..b856731
--- /dev/null
@@ -0,0 +1,43 @@
+{% extends "master.html" %}
+{% block main %}
+
+{% if error %}
+<div class="col-sm-12">
+  <div class="alert alert-danger">
+    <p>{{ error }}</p>
+  </div>
+</div>
+
+{% endif %}
+
+<div class="col-sm-7 col-md-6 col-lg-5 login">
+  <form class="form-horizontal" role="form" id="login_form" action="{{ action }}" method="post" enctype="application/x-www-form-urlencoded">
+    <div class="form-group {% if error_username %} has-error{% endif %}">
+      <label for="login_name" class="col-sm-2 col-md-2 control-label">{{ username_text }}</label>
+      <div class="col-sm-10 col-md-10">
+        <input type="text" class="form-control" name="login_name" id="login_name" placeholder="" tabindex="1" value="{{ username | e }}">
+      </div>
+    </div>
+    <div class="form-group{% if error_password %} has-error{% endif %}">
+      <label for="login_password" class="col-sm-2 col-md-2 control-label">{{ password_text }}</label>
+      <div class="col-sm-10 col-md-10">
+        <input type="password" class="form-control" name="login_password" id="login_password" placeholder="" tabindex="2">
+      </div>
+    </div>
+    <div class="form-group">
+      <div class="col-sm-offset-2 col-md-offset-2 col-xs-12 col-sm-10 col-md-10 submit">
+        <a href="{{ basepath }}/" title="Cancel" class="btn btn-link" tabindex="4">Cancel</a>
+        {% if next_url %}
+          <a href="{{ next_url }}" title="Next authentication method" class="btn btn-link" tabindex="5">Next method </a>
+        {% endif %}
+        <button type="submit" value="login" class="btn btn-primary btn-lg" tabindex="3">Log In</button>
+      </div>
+    </div>
+  </form>
+</div>
+
+<div class="col-sm-5 col-md-6 col-lg-7 details">
+  <p>{{description}}</p>
+</div>
+
+{% endblock %}
diff --git a/templates/login/pam.html b/templates/login/pam.html
deleted file mode 100644 (file)
index b856731..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "master.html" %}
-{% block main %}
-
-{% if error %}
-<div class="col-sm-12">
-  <div class="alert alert-danger">
-    <p>{{ error }}</p>
-  </div>
-</div>
-
-{% endif %}
-
-<div class="col-sm-7 col-md-6 col-lg-5 login">
-  <form class="form-horizontal" role="form" id="login_form" action="{{ action }}" method="post" enctype="application/x-www-form-urlencoded">
-    <div class="form-group {% if error_username %} has-error{% endif %}">
-      <label for="login_name" class="col-sm-2 col-md-2 control-label">{{ username_text }}</label>
-      <div class="col-sm-10 col-md-10">
-        <input type="text" class="form-control" name="login_name" id="login_name" placeholder="" tabindex="1" value="{{ username | e }}">
-      </div>
-    </div>
-    <div class="form-group{% if error_password %} has-error{% endif %}">
-      <label for="login_password" class="col-sm-2 col-md-2 control-label">{{ password_text }}</label>
-      <div class="col-sm-10 col-md-10">
-        <input type="password" class="form-control" name="login_password" id="login_password" placeholder="" tabindex="2">
-      </div>
-    </div>
-    <div class="form-group">
-      <div class="col-sm-offset-2 col-md-offset-2 col-xs-12 col-sm-10 col-md-10 submit">
-        <a href="{{ basepath }}/" title="Cancel" class="btn btn-link" tabindex="4">Cancel</a>
-        {% if next_url %}
-          <a href="{{ next_url }}" title="Next authentication method" class="btn btn-link" tabindex="5">Next method </a>
-        {% endif %}
-        <button type="submit" value="login" class="btn btn-primary btn-lg" tabindex="3">Log In</button>
-      </div>
-    </div>
-  </form>
-</div>
-
-<div class="col-sm-5 col-md-6 col-lg-7 details">
-  <p>{{description}}</p>
-</div>
-
-{% endblock %}