Skip to content
Snippets Groups Projects
Commit 42ca17bf authored by Mitchell Moore's avatar Mitchell Moore
Browse files

parent ab533531

author Mitchell Moore <mmoo97@uab.edu> 1554919596 -0500
committer Mitchell Moore <mmoo97@uab.edu> 1586783315 -0500

Pruning of unnecessary files, and alteration form

Update Readme and minor html tweaks

Update README.md

Added code to pass username and name variables to ood.

Added redirect to origin page after success

Populate user and catch None error if form is submitted blank

Updated return_url with placeholder value for stability.

Update __init__.py

Updated return_url with proper redirect value

Allowed for default redirect if one not set up.

Add new file

Update bootstrap_signup_page.html

Added directories for externall css implementation

clean_registration_page
Cleaned up html page to match out theme.

Edited form field and fixed name, UI format.

Html class fixes for user_reg page.

Changed UAB OnDemand header and removed static folder

fixed formatting issue

Revert "Allowed for default redirect if one not set up."

This reverts commit 7d0ca8db

fixed redirect loop

(fix) Prevent app from routing back to index

Update readme

(fix) Registration script call

(fix) Jinja Version Update

(fix) incorrect redir argument

(fix) removed hardcoded return value

Added testing script to utilize 'testing' config.

Combine index and SignUp routes

(fix) get redir args

(fix) localize css elements

(fix) fix src file reference

Semantic fix for route order

Semantic fix for variable name/position.

(fix) indexing fix for redir args and test output.

(fix) issue with icons not showing

(fix) variable reference of fullname to success page.

removed indexing from index function and added with statement line 64

Clean up readme typos and make it more concise.

Build a base.html page to inherit from

added another block on base.html for the body container content class

Feat check account existence

Clean up code to function properly

added fileput with timestamp

temp_path for db

fixed whitespaces

fixed time_stamp format

added-mkdir-function

times_stamp cleanup

cleanup

time_stamp format fix

test form simplification

add 'validators' dependency

fix fullname reference in submit statement

Add redir arg and use jinja for text header

Fix default title error

Change title

fix routing logic in index

remove dev comments

Fix falure logic routing and edit error message

Apply css formatting to jinja elements and fix form size issues

Reintroduce form label/instruction

cleanup

directory fix

comments

Produce overlay window with text from jobcomposer tutorial

add temporary functionality to call window for testing

replace next and escape button with loading.gif

Refactor gif to center

Edited text formating/content of notification window

Reverted two commits and removed comments

Remove temp functionality/replace loading visibility logic

remove 5 second pause

Revert "Merge branch 'feat-flatdb' into 'master'"

This reverts merge request !22

Reintroduce Ishan's file script

File test

Include watchdog integration to monitor dir changes

Update requirements and comment prints

file write and logic fix. Responds to file change

Properly initiate while loop, include debug info

finalize change loop

Fix variable confusion in index route

fix variables

Update documentation

fix comment

add username to file name

removed function from signup.html

script fix

path fix

function cleanup

syntax

script src path fix

fix merge conflict

remove watchdog elements

add reason field to form

Added mock sucess template and added to form

Fix typo

make template functional

fix templates

Add fullname to file

Delete request_recieved.html
parent ab533531
No related branches found
No related tags found
No related merge requests found
Showing
with 308 additions and 165 deletions
No preview for this file type
......@@ -9,3 +9,4 @@ dist/
build/
*.egg-info/
**.idea/
**/.DS_Store
......@@ -3,25 +3,19 @@
To clone this repo use the command:
```
git clone https://gitlab.rc.uab.edu/noe121/flaskformwork.git
$ git clone https://gitlab.rc.uab.edu/mmoo97/flask_user_reg.git
```
## Prerequisites
-have pip installed
--follow link for installation
- Ensure `pip` is installed (see: https://packaging.python.org/guides/installing-using-pip-and-virtualenv/ ).
- Ensure you have created a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments)
called `venv` setup within the cloned project.
- Note, this project requires a virtual environment running python2 (2.7)
- Ensure Flask and other dependencies are installed using the following commands:
```
https://packaging.python.org/guides/installing-using-pip-and-virtualenv/
```
-then install Flask
```
pip install Flask
```
## Starting the virtual machine for Flask
To start go to formWork directory
-then start virtual machine:
```
source venv/bin/activate
$ cd ~/your/repo/path/flask_user_reg
$ source venv/bin/activate
$ pip install -r requirements.txt
```
- Note, to install flask in your own `$HOME` use `pip install --user Flask`.
# app/__init__.py
# app/__init__.py
# local imports
from __future__ import print_function
import os
import sys
import subprocess
import time
# third-party imports
from flask import Flask, redirect, url_for, request
from flask import render_template
from flask import Flask, redirect, url_for, request, render_template, flash, session
from flask_wtf import FlaskForm
from flask_bootstrap import Bootstrap
from wtforms import StringField, SubmitField, TextAreaField, validators
# local imports
global time_stamp
def create_app(config_name):
app = Flask(__name__) # initialization of the flask app
Bootstrap(app) # allowing app to use bootstrap
app = Flask(__name__)
global return_url
return_url = ''
@app.route('/success/<name>')
def success(name):
return 'welcome new user %s' % name
class MainForm(FlaskForm): # class for the form itself
fullname = StringField('Full Name: ', [validators.DataRequired(), validators.length(max=50)])
reason = TextAreaField('Reason for Requesting Account: ', [validators.DataRequired(), validators.length(max=150)])
submit = SubmitField('Submit')
@app.route('/', methods=['GET'])
@app.route('/', methods=['GET', 'POST']) # initial route to display the reg page
def index():
return render_template("auth/SignUp.html")
@app.route('/', methods=['POST'])
def SignUp():
if request.method == 'POST':
email = request.form['email']
# make username from email
# user = request.environ('REMOTE_USER')
# user = request.remote_user.name
# user = request.environ
user = 'Mitchell'
return redirect(url_for('success', name=user))
global return_url
username = request.remote_user
if "redir" in request.args and return_url == "": # check for redir arg in url
return_url = request.args.get("redir") or "/pun/sys/dashboard"
fullname = False
form = MainForm() # initialize form object
if form.is_submitted():
session["fullname"] = form.fullname.data
session['reason'] = form.reason.data
form.fullname.data = '' # reset form data upon capture
form.fullname.data = '' # reset form data upon capture
return redirect(url_for('success', username=username))
return render_template('auth/SignUp.html', form=form, user=username)
@app.route('/success/<username>')
def success(username):
fullname = session.get('fullname', None)
reason = session.get('reason', None)
global return_url
global time_stamp
print(username, fullname, return_url, file=sys.stdout)
# Deliver arguments to script. (for local vagrant implementation)
tempString = 'ssh ohpc "sudo /opt/ohpc_user_create/user_create ' + username + " " + fullname + '"'
print(tempString, file=sys.stdout)
try:
# function to write out a flatdb with the name of the file being a timestamp and the content
# of the file beieng blazerID the user submitted from the flask form (fullname)
time_stamp = time.strftime("%m-%d-%Y_%H:%M:%S")
directory = "/home/reggie/flat_db/"
complete_file_name = os.path.join(directory, time_stamp + "_" + request.remote_user + ".txt")
if not os.path.exists(directory):
os.makedirs(directory)
file = open(complete_file_name, "w") # create time stamped file to be queued
file.write(fullname + "\n")
file.write(reason)
file.close()
return render_template("auth/request_received.html") # Todo: replace template with redirect
# return redirect(return_url, 302)
except Exception as e:
print(e)
flash("Registration Failed. Please try again.") # show error message upon failure
return redirect(url_for('index'))
# misc page error catching
@app.errorhandler(403)
def forbidden(error):
......
# app/auth/__init__.py
from flask import Blueprint
auth = Blueprint('auth', __name__)
from . import views
# app/auth/forms.py
from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField, SubmitField, ValidationError
from wtforms.validators import DataRequired, Email, EqualTo
class RegistrationForm(FlaskForm):
"""
Form for users to create new account
"""
email = StringField('Email', validators=[DataRequired(), Email()])
username = StringField('Username', validators=[DataRequired()])
first_name = StringField('First Name', validators=[DataRequired()])
last_name = StringField('Last Name', validators=[DataRequired()])
password = PasswordField('Password', validators=[
DataRequired(),
EqualTo('confirm_password')
])
confirm_password = PasswordField('Confirm Password')
submit = SubmitField('Register')
# def validate_email(self, field):
# if Employee.query.filter_by(email=field.data).first():
# raise ValidationError('Email is already in use.')
#
# def validate_username(self, field):
# if Employee.query.filter_by(username=field.data).first():
# raise ValidationError('Username is already in use.')
class LoginForm(FlaskForm):
"""
Form for users to login
"""
email = StringField('Email', validators=[DataRequired(), Email()])
password = PasswordField('Password', validators=[DataRequired()])
submit = SubmitField('Login')
from flask import flash, redirect, render_template, url_for
from forms import RegistrationForm
from . import auth
@auth.route('/register', methods=['GET', 'POST'])
def register():
"""
Handle requests to the /register route
Add an employee to the database through the registration form
"""
form = RegistrationForm()
if form.validate_on_submit():
employee = Employee(email=form.email.data,
username=form.username.data,
first_name=form.first_name.data,
last_name=form.last_name.data,
password=form.password.data)
# add employee to the database
db.session.add(employee)
db.session.commit()
flash('You have successfully registered! You may now login.')
# redirect to the login page
return redirect(url_for('auth.login'))
# load registration template
return render_template('auth/register.html', form=form, title='Register')
\ No newline at end of file
File added
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 196.2 35.7" style="enable-background:new 0 0 196.2 35.7;" xml:space="preserve">
<style type="text/css">
.st0{fill:#CF0A2C;}
.st1{fill:#FFFFFF;}
</style>
<g>
<path d="M73.8,32.9h1.7v-7.6h-1.7v-2.4h4.9V25h0.1c0.8-1.6,2.4-2.5,4.2-2.5c3.3,0,4.4,1.7,4.4,4.9v5.5h1.7v2.4h-6.8v-2.4h1.6v-5.4
c0-1.3-0.7-2.5-2.2-2.5c-1.9,0-2.7,1.7-2.7,3.3v4.5h1.6v2.4h-6.8C73.8,35.2,73.8,32.9,73.8,32.9z"/>
<path d="M91.4,32.8h2.2V20.5h-2.2V18h9.5c1.7,0,8.9,0.3,8.9,8.6c0,5.8-3.7,8.7-9.3,8.7h-9L91.4,32.8L91.4,32.8z M97.3,32.8h2.9
c3.8,0,5.7-2.4,5.7-6.1s-1.8-6.1-5.7-6.1h-2.9V32.8z"/>
<path d="M114.6,30.1c0,2,1.1,3.2,3.1,3.2c1.2,0,2.1-0.5,2.4-1.8h3.3c-0.6,3-3,4.2-5.9,4.2c-4.3,0-6.7-2.6-6.7-6.7
c0-3.9,2.7-6.4,6.6-6.4c3,0,5.4,1.7,5.9,4.8c0.2,1,0.2,1.9,0.2,2.8h-8.9V30.1z M120.1,27.8c0-1.8-0.9-2.9-2.7-2.9
c-1.8,0-2.8,1.3-2.8,2.9H120.1z"/>
<path d="M125.2,32.9h1.7v-7.6h-1.7v-2.4h4.9V25h0.1c0.8-1.6,2.4-2.5,4.2-2.5c1.9,0,3.2,0.6,4.1,2.3c0.8-1.6,2.3-2.3,4-2.3
c2.7,0,4.6,1.1,4.7,4v6.4h1.7v2.4H142v-2.4h1.6v-5.4c0-1.4-0.5-2.5-2.1-2.5c-1.9,0-2.7,1.5-2.7,3.2v4.7h1.6v2.4h-6.7v-2.4h1.6v-5.4
c0-1.3-0.7-2.5-2.2-2.5c-1.9,0-2.7,1.7-2.7,3.3v4.5h1.6v2.4h-6.8L125.2,32.9L125.2,32.9z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/>
</g>
<path class="st0" d="M55.8,23c-0.9-0.5-1.7,0-1.7,1.1v5.2c0,1,0.8,1.5,1.7,1.1l5.9-2.8c0.9-0.5,0.9-1.2,0-1.7L55.8,23z"/>
<path d="M41.3,33.9H3.8c-2.1,0-3.8-1.7-3.8-3.8v-6.8c0-2.1,1.7-3.8,3.8-3.8h37.5c2.1,0,3.8,1.7,3.8,3.8v6.8
C45.1,32.2,43.4,33.9,41.3,33.9z"/>
<g>
<path class="st1" d="M5.4,26.7c0-2.4,1.5-4.1,4.1-4.1s4.1,1.7,4.1,4.1s-1.5,4.1-4.1,4.1C6.9,30.8,5.4,29,5.4,26.7z M11.9,26.7
c0-1.7-0.7-2.9-2.4-2.9s-2.4,1.3-2.4,2.9c0,1.7,0.7,2.9,2.4,2.9S11.9,28.4,11.9,26.7z"/>
<path class="st1" d="M14.4,29.5h1.1v-5.6h-1.1v-1.1h4.2c1.2,0,2.8,0.2,2.8,2.4c0,2-1.2,2.5-2.8,2.5h-1.5v1.8h1.3v1.1h-4
C14.4,30.6,14.4,29.5,14.4,29.5z M17.1,26.5H18c0.9,0,1.7-0.2,1.7-1.3c0-1.4-0.9-1.3-1.8-1.3h-0.8C17.1,23.9,17.1,26.5,17.1,26.5z"
/>
<path class="st1" d="M22.4,29.5h1v-5.6h-1v-1.1h7.1v2.3h-1.4v-1.2H25V26h1.2v-1h1.3v3.2h-1.3v-1.1H25v2.3h3.1V28h1.4v2.6h-7.1V29.5
z"/>
<path class="st1" d="M30.9,29.5h1v-5.6h-1v-1.1h3.3l3,5.8l0,0v-4.7h-1v-1.1h3.5v1.1h-1v6.7h-2.2l-3.2-6l0,0v4.9h1v1.1h-3.5v-1.1
H30.9z"/>
</g>
<g>
<path d="M0,3.6c0-0.3,0-0.4,0-1h1.1l0,1c0.6-0.9,1.6-1.1,2.1-1.1c1.3,0,2.5,0.9,2.5,3.1c0,2.2-1.3,3.2-2.7,3.2
C2.1,8.9,1.5,8.5,1.2,8v3H0V3.6z M2.8,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2.6,3.4H34.9z M38.1,5.1
c0-0.6-0.1-1.8-1.5-1.8c-0.7,0-1.6,0.4-1.6,1.8H38.1z"/>
<path d="M44.8,0h1.1v7.7c0,0.1,0,0.6,0,1h-1.1l0-1c-0.1,0.2-0.2,0.4-0.5,0.6c-0.5,0.3-1.1,0.4-1.5,0.4c-0.8,0-2.6-0.4-2.6-3.1
c0-2.3,1.3-3.3,2.7-3.3c1.3,0,1.7,0.8,1.9,1V0z M44.3,3.9c-0.2-0.3-0.7-0.6-1.3-0.6c-1.7,0-1.7,2-1.7,2.4C41.4,6.8,41.6,8,43,8
c1.8,0,1.8-2,1.8-2.4C44.8,4.7,44.6,4.2,44.3,3.9z"/>
<path d="M51.7,3.5c0.2-0.3,0.6-1,2-1c0.6,0,1.4,0.1,1.9,0.8c0.3,0.3,0.7,0.9,0.7,2.3c0,1.2-0.3,1.8-0.6,2.2c-0.5,0.7-1.3,1-2.1,1
c-0.3,0-0.8,0-1.3-0.4c-0.3-0.2-0.5-0.4-0.6-0.6l0,0.9h-1.1l0-1.1V0h1.1V3.5z M53.4,3.2c-1.7,0-1.7,2-1.7,2.4c0,0.4,0,2.3,1.7,2.3
c1.4,0,1.7-1.4,1.7-2.3C55.1,5,54.9,3.2,53.4,3.2z"/>
<path d="M60.2,8.7l-0.9,2.2h-1.2l0.9-2.3l-2.5-6h1.3l1.9,4.7l1.9-4.7h1.2L60.2,8.7z"/>
</g>
</svg>
app/static/img/loading.gif

77.1 KiB

source diff could not be displayed: it is too large. Options to address this: view the blob.
function displayloading() {
document.getElementById("notification_window").innerHTML = "" +
"<div class=\"joyride-tip-guide\" data-index=\"0\" style=\"visibility: visible; display: block; top: 77.5px; left: 570px;\"><span class=\"joyride-nub\" style=\"display: none;\"></span><div class=\"joyride-content-wrapper\" role=\"dialog\"><ol>\n" +
" <h4>\n" +
"\n" +
" Your account is pending creation...\n" +
"\n" +
" </h4>\n" +
" <br><p>\n" +
" This can take between 5-10 min.\n" +
" </p>\n" +
" </ol>\n" +
" <img src=\"/register/static/img/loading.gif\" style=\"width: 35px; height: auto\"> Pending...\n" +
" </div></div>\n" +
"\n" +
" <div class=\"joyride-modal-bg\" style=\"display: block;\"></div>"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<body>
<h2>Sign up Form</h2>
<form action="/" method="post">
<div class ="signUpContainer">
<label for="email"><b>Email:<br></b></label>
<input type="email" placeholder="Enter Email" name="email" onkeyup='validateEmail(email);' required/><br>
<label>password : <br>
<input name="password" placeholder="Enter Password" id="password" type="password" onkeyup='check();' required />
</label>`
<br>
<label>confirm password: <br>
<input type="password" placeholder="Re-enter Password" name="confirm_password" id="confirm_password" onkeyup='check();' required/>
<span id='message'></span>
</label>`<br>
<input type="submit" value = "Submit" ></input>
<script>
var check = function() {
if (document.getElementById('password').value ==
document.getElementById('confirm_password').value) {
document.getElementById('message').style.color = 'green';
document.getElementById('message').innerHTML = 'matching';
} else {
document.getElementById('message').style.color = 'red';
document.getElementById('message').innerHTML = 'not matching';
}
}
function validateEmail() {
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());
{% extends "auth/base.html" %}
<html class="gr__rc_uab_edu">
{% block title %} User Registration {% endblock %}
{% block head %}
{{ super() }}
<script src="{{ url_for('static', filename='scripts/function.js') }}"></script>
<script src="{{ url_for('static', filename='scripts/application.js') }}"></script>
<style type="text/css">
.important { color: #336699; }
</style>
<link rel="shortcut icon" type="image/x-icon" href="/public/favicon.ico">
<link rel="stylesheet" media="all" href="/register/static/style/application.css">
<link rel="stylesheet" media="all" href="/register/static/style/app2.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.navbar-inverse {
background-color: rgb(0,99,65);
}
</script>
</style>
{% endblock %}
<body data-gr-c-s-loaded="true">
<header>
{% block body %}
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="/register">Research Computing</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-9">
<ul class="nav navbar-nav">
</ul>
<div class="navbar-right">
<ul class="nav navbar-nav">
<li>
<a target="_blank" href="https://docs.uabgrid.uab.edu/wiki/Cheaha_GettingStarted">
<i class="fas fa-info-circle fa-fw"></i> Online Documentation
</a></li>
<li>
</li></ul>
</div>
</div>
</div>
</form>
</nav>
</header>
<div class="container content" role="main" style="width: 625px">
<div style="position:relative;">
<img alt="logo" height="100" style="margin-bottom: 20px" src="/register/static/img/cheaha-logo-a605de0aecd3006b82a5ee30a6d0cb8cd9bf8b7e836296cc293eac746a4c2b11.png">
<a href="https://tinyurl.com/cheahaAL" target="_blank">
<div style="float:left;position:absolute;display:block;left:310px;top:-6px;padding:10px 20px;"> </div>
</a>
</div>
<h2>Hello, {{ user }}!</h2>
<form action="." method="post" onsubmit="displayloading()">
<div class="signUpContainer">
<label><b>{{ form.fullname.label }}<br></b></label>
{{ form.fullname(class_="form-control", placeholder="Enter Full Name") }}
<label><b>{{ form.reason.label }}<br></b></label>
{{ form.reason(class_="form-control", placeholder="Enter Reason for Account Request") }}
{{ form.submit(class_="btn btn-primary btn-block" ) }}
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div>
<strong style="color: #be051b; text-align: center;">{{ message }}</strong>
</div>
{% endfor %}
{% endif %}
{% endwith %}
</div>
</form>
</div>
<div id="notification_window" >
</div>
{% endblock %}
</body>
</html>
\ No newline at end of file
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-sm-6">
<a href="https://osc.github.io/Open-OnDemand/">
<img class="footer-logo" alt="Powered by Open OnDemand" height="40" style="margin-bottom: 20px" src="/register/static/img/OpenOnDemand_powered_by_RGB-cb3aad5ff5350c7994f250fb334ddcc72e343233ce99eb71fda93beddd76a847.svg">
</a>
</div>
</div>
</div><!-- /.container -->
</footer>
</html>
<!-- app/templates/auth/register.html -->
{% import "bootstrap/wtf.html" as wtf %}
{% extends "base.html" %}
{% block title %}Register{% endblock %}
{% block body %}
<div class="content-section">
<div class="center">
<h1>Register for an account</h1>
<br/>
{{ wtf.quick_form(form) }}
</div>
</div>
{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment