forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Ortege-xyz/feat/register
feat: added register to beta page
- Loading branch information
Showing
4 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
superset/templates/appbuilder/general/security/login_db.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- extend base layout --> | ||
{% extends "appbuilder/base.html" %} | ||
|
||
|
||
|
||
{% block content %} | ||
|
||
<div class="container"> | ||
<div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2"> | ||
<div class="panel panel-primary" > | ||
<div class="panel-heading"> | ||
<div class="panel-title">{{ title }}</div> | ||
</div> | ||
<div style="padding-top:30px" class="panel-body" > | ||
|
||
<form class="form" action="" method="post" name="login"> | ||
{{form.hidden_tag()}} | ||
<div class="help-block">{{_("Enter your login and password below")}}:</div> | ||
<div class="control-group{% if form.errors.openid is defined %} error{% endif %}"> | ||
<label class="control-label" for="username">{{_("Username")}}:</label> | ||
|
||
<div class="controls"> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa fa-user"></i></span> | ||
{{ form.username(size = 80, class = "form-control", autofocus = true) }} | ||
</div> | ||
{% for error in form.errors.get('openid', []) %} | ||
<span class="help-inline">[{{error}}]</span><br> | ||
{% endfor %} | ||
<label class="control-label" for="password">{{_("Password")}}:</label> | ||
|
||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa fa-key"></i></span> | ||
{{ form.password(size = 80, class = "form-control") }} | ||
</div> | ||
{% for error in form.errors.get('openid', []) %} | ||
<span class="help-inline">[{{error}}]</span><br> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
|
||
<div class="control-group"> | ||
<div class="controls"> | ||
<br> | ||
<div> | ||
<input class="btn btn-primary btn-block" type="submit" value="{{_('Sign In')}}"> | ||
<a href="/register/beta" class="btn btn-block btn-primary"> | ||
Sign up for closed beta | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
83 changes: 83 additions & 0 deletions
83
superset/templates/appbuilder/general/security/register_beta.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<!-- extend base layout --> | ||
{% extends "appbuilder/base.html" %} | ||
|
||
|
||
|
||
{% block content %} | ||
<div id="container"> | ||
<div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2"> | ||
<div class="panel panel-primary"> | ||
<div class="panel-heading"> | ||
<div class="panel-title">Subscribe</div> | ||
</div> | ||
<div style="padding-top:30px" class="panel-body"> | ||
<form | ||
action="https://ortege.us10.list-manage.com/subscribe/post?u=cc545d0e2ce1030a6b0466c35&id=931737caa5&v_id=5473&f_id=00eedfe5f0" | ||
method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" | ||
target="_blank"> | ||
<div id="mc_embed_signup_scroll"> | ||
<div class="help-block"><span style="color: red;">*</span> indicates required</div> | ||
<label class="control-label" for="mce-EMAIL">Email Address:<span | ||
style="color: red;">*</span></label> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa fa-envelope"></i></span> | ||
<input id="mce-EMAIL" class="form-control" autofocus type="email" name="EMAIL" required> | ||
</div> | ||
<label class="control-label" for="mce-FNAME">First Name:<span | ||
style="color: red;">*</span></label> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa-solid fa-font"></i></i></span> | ||
<input id="mce-FNAME" class="form-control" autofocus type="text" name="FNAME" required> | ||
</div> | ||
<label class="control-label" for="mce-LNAME">Last Name:<span | ||
style="color: red;">*</span></label> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa-solid fa-font"></i></span> | ||
<input id="mce-LNAME" class="form-control" autofocus type="text" name="LNAME" required> | ||
</div> | ||
<label class="control-label" for="mce-WEBSITE1">Website:<span | ||
style="color: red;">*</span></label> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa-solid fa-link"></i></span> | ||
<input id="mce-WEBSITE1" class="form-control" autofocus type="url" name="WEBSITE1" required> | ||
</div> | ||
<label class="control-label" for="mce-COUNTRY1">Country:<span | ||
style="color: red;">*</span></label> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fa-solid fa-globe"></i></span> | ||
<input id="mce-COUNTRY1" class="form-control" autofocus type="text" name="COUNTRY" required> | ||
</div> | ||
<label class="control-label">Marketing Permissions</label> | ||
<p style="color: #879399; font-size: 12px; margin-bottom: 0px;">Please select if you would like to join weekly newsletter.</p> | ||
<fieldset class="mc_fieldset gdprRequired mc-field-group" name="interestgroup_field"> | ||
<label class="checkbox subfield" for="gdpr60277" style="display: flex; align-items: center; gap: 10px;"> | ||
<input type="checkbox" id="gdpr_60277" name="gdpr[60277]" class="gdpr" value="Y" style="position: static; margin: 0px !important;"> | ||
<span style="color: #879399;">Email</span> | ||
</label> | ||
</fieldset> | ||
<p style="color: #879399; font-size: 10px;">We use Mailchimp as our marketing platform. By clicking below to | ||
subscribe, you | ||
acknowledge that your information will be transferred to Mailchimp for processing. | ||
<a href="https://mailchimp.com/legal/terms">Learn more</a> about Mailchimp's privacy | ||
practices. | ||
</p> | ||
<p style="color: #879399; font-size: 10px;">You can unsubscribe at any time by clicking the link in the footer of | ||
our emails. For | ||
information about our privacy practices, please visit our website. | ||
</p> | ||
<div hidden=""><input type="hidden" name="tags" value="14175121,14175117,14175109"></div> | ||
<div aria-hidden="true" style="position: absolute; left: -5000px;"><input type="text" | ||
name="b_cc545d0e2ce1030a6b0466c35_931737caa5" tabindex="-1" value=""></div> | ||
<div class="clear"> | ||
<input class="btn btn-primary btn-block" type="submit" value="Subscribe"> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js"></script> | ||
<script | ||
type="text/javascript">(function ($) { window.fnames = new Array(); window.ftypes = new Array(); fnames[0] = 'EMAIL'; ftypes[0] = 'email'; fnames[1] = 'FNAME'; ftypes[1] = 'text'; fnames[2] = 'LNAME'; ftypes[2] = 'text'; fnames[6] = 'WEBSITE1'; ftypes[6] = 'url'; fnames[7] = 'COUNTRY1'; ftypes[7] = 'text'; fnames[3] = 'ADDRESS'; ftypes[3] = 'address'; fnames[4] = 'PHONE'; ftypes[4] = 'phone'; fnames[5] = 'BIRTHDAY'; ftypes[5] = 'birthday'; fnames[8] = 'CITIZENSHI'; ftypes[8] = 'text'; }(jQuery)); var $mcj = jQuery.noConflict(true);</script> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from flask_appbuilder import expose | ||
from superset.views.base import BaseSupersetView | ||
|
||
class RegisterBetaView(BaseSupersetView): | ||
default_view = 'register_beta' | ||
route_base = "/register" | ||
|
||
@expose('/beta') | ||
def register_beta(self): | ||
self.update_redirect() | ||
return self.render_template('appbuilder/general/security/register_beta.html') |