show user client-details after creation (no more step guide) and add guide message
This commit is contained in:
parent
3a0f0ca780
commit
e575f21052
|
@ -3,6 +3,27 @@
|
|||
{% set client_details_page = "basic_info" %}
|
||||
|
||||
{% block client_details_content %}
|
||||
{% if is_new %}
|
||||
<div class="alert alert-warning alert-dismissible fade show mb-4" role="alert">
|
||||
<h4 class="alert-heading">Well done!</h4>
|
||||
<p>
|
||||
Please head to our <a href="http://new-docs.simplelogin.io" target="_blank">documentation</a>
|
||||
to see how to add SimpleLogin into your website/application.
|
||||
</p>
|
||||
<p>
|
||||
<strong>And if you already know about OAuth</strong>, do not forget to set your OAuth <em>Redirect URI</em>
|
||||
before your app is deployed on production. You can add the <em>Redirect URI</em>
|
||||
in the <b>OAuth Setting</b> section on the right 👉
|
||||
|
||||
SimpleLogin OAuth endpoints can be found in <b>OAuth endpoints</b> section, always on the right 👉
|
||||
</p>
|
||||
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{{ form.csrf_token }}
|
||||
|
||||
|
@ -22,7 +43,9 @@
|
|||
|
||||
<div class="form-group">
|
||||
<div class="form-label">App Icon</div>
|
||||
<p><small class="text-muted">The icon displayed on the authorization page</small></p>
|
||||
<p>
|
||||
<small class="text-muted">The icon displayed on the authorization page</small>
|
||||
</p>
|
||||
{{ form.icon(class="form-control-file") }}
|
||||
{{ render_field_errors(form.icon) }}
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ class EditClientForm(FlaskForm):
|
|||
def client_detail(client_id):
|
||||
form = EditClientForm()
|
||||
|
||||
is_new = "is_new" in request.args
|
||||
|
||||
client = Client.get(client_id)
|
||||
if not client:
|
||||
flash("no such client", "warning")
|
||||
|
@ -60,7 +62,10 @@ def client_detail(client_id):
|
|||
return redirect(url_for("developer.client_detail", client_id=client.id))
|
||||
|
||||
return render_template(
|
||||
"developer/client_details/basic_info.html", form=form, client=client
|
||||
"developer/client_details/basic_info.html",
|
||||
form=form,
|
||||
client=client,
|
||||
is_new=is_new,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from flask import request, render_template, redirect, url_for, flash
|
||||
from flask import render_template, redirect, url_for, flash
|
||||
from flask_login import current_user, login_required
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, validators
|
||||
|
@ -26,7 +26,7 @@ def new_client():
|
|||
flash("Your app has been created", "success")
|
||||
|
||||
return redirect(
|
||||
url_for("developer.handle_step", client_id=client.id, step="step-0")
|
||||
url_for("developer.client_detail", client_id=client.id, is_new=1)
|
||||
)
|
||||
|
||||
return render_template("developer/new_client.html", form=form)
|
||||
|
|
Loading…
Reference in a new issue