mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-23 06:39:25 +00:00
Switch Add/Update to use CBV, combine templates into one.
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Add EVE API Key{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<h1>Add EVE API Key</h1>
|
||||
</div>
|
||||
|
||||
<p>Please fill in your API key details and a optional description. You can create a API key on the <a href="https://support.eveonline.com/api/Key/CreatePredefined/59638024/0/false">API support site</a></p>
|
||||
|
||||
<form action="{% url eve_api.views.eveapi_add %}" method="post">
|
||||
|
||||
<fieldset>
|
||||
{% include "formtools/formerror.html" %}
|
||||
{% include "formtools/formfield.html" with field=form.api_user_id %}
|
||||
{% include "formtools/formfield.html" with field=form.api_key class="xxlarge"%}
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="Add API Key" class="btn primary"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
24
app/eve_api/templates/eve_api/eveaccount_form.html
Normal file
24
app/eve_api/templates/eve_api/eveaccount_form.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{% if object %}Update EVE API Key{% else %}Add EVE API Key{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<h1>{% if object %}Update EVE API Key{% else %}Add EVE API Key{% endif %}</h1>
|
||||
</div>
|
||||
|
||||
<p>Please fill in your API key details and a optional description. You can create a API key on the <a href="https://support.eveonline.com/api/Key/CreatePredefined/59638024/0/false">API support site</a></p>
|
||||
|
||||
<form action="{% if object %}{% url eveapi-update object.api_user_id %}{% else %}{% url eveapi-add %}{% endif %}" method="post">
|
||||
<fieldset>
|
||||
{% include "formtools/formerror.html" %}
|
||||
{% include "formtools/formfield.html" with field=form.api_user_id %}
|
||||
{% include "formtools/formfield.html" with field=form.api_key class="xxlarge" %}
|
||||
{% include "formtools/formfield.html" with field=form.description class="xxlarge" %}
|
||||
{% include "formtools/formfield.html" with field=form.user %}
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="{% if object %}Update API Key{% else %}Add API Key{% endif %}" class="btn primary"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,24 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Update EVE API Key{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<h1>Update EVE API Key</h1>
|
||||
</div>
|
||||
|
||||
<p>Please update your API key as provided on the <a href="http://eve-online.com/api">EVE Online API page</a> and a optional description.</p>
|
||||
|
||||
<form action="{% url eveapi-update acc.api_user_id %}" method="post">
|
||||
<fieldset>
|
||||
{% include "formtools/formerror.html" %}
|
||||
{% include "formtools/formfield.html" with field=form.user %}
|
||||
{% include "formtools/formfield.html" with field=form.api_user_id %}
|
||||
{% include "formtools/formfield.html" with field=form.api_key class="xxlarge" %}
|
||||
{% include "formtools/formfield.html" with field=form.description class="xxlarge" %}
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="Add API Key" class="btn primary"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user