mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-21 20:34:57 +09:00
Resolves open issue 629
This commit is contained in:
1 parent
bb4f963812
commit
3a5146ea02
7448 files changed
+1
-1041060
No files matched your search
@@ -1,76 +0,0 @@
|
||||
{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
|
||||
|
||||
{% block meta_title %}{% trans 'Example module' %}{% endblock %}
|
||||
|
||||
{% set active_menu = 'example' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="widget">
|
||||
<div class="head">
|
||||
<h5>{% trans 'Example module title' %}</h5>
|
||||
</div>
|
||||
|
||||
<div class="help">
|
||||
<h3>{% trans 'This is an example extension content' %}</h3>
|
||||
</div>
|
||||
<div class="body">
|
||||
<a href="{{ 'example'|alink }}">Example module index</a> <br/>
|
||||
<a href="{{ 'extension/settings/example'|alink }}">Example settings page</a> <br/>
|
||||
<a href="{{ 'example'|alink }}/test">Test link with static URL</a> <br/>
|
||||
<a href="{{ 'example'|alink }}/user/1">Test link location with parameter 1</a> <br/>
|
||||
<a href="{{ 'example'|alink }}/user/2">Test link location with parameter 2</a> <br/>
|
||||
<a href="{{ 'example'|alink }}/user/3">Test link location with parameter 3</a> <br/>
|
||||
<a href="{{ 'example'|alink }}/api">API example</a>
|
||||
<a href="{{ 'example'|link }}" target="_blank">Client area link example</a>
|
||||
</div>
|
||||
|
||||
{# Check if example parameters passed to template file #}
|
||||
{% if youparamname %}
|
||||
<div class="help">
|
||||
<h3>{% trans 'Parameters from Controller' %}</h3>
|
||||
</div>
|
||||
<div class="body">
|
||||
<p>You have passed parameter youparamname: <strong>{{ youparamname }}</strong></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{# Check if example parameters passed to template file #}
|
||||
{% if userid %}
|
||||
<div class="help">
|
||||
<h3>{% trans 'Parameters from URL' %}</h3>
|
||||
</div>
|
||||
<div class="body">
|
||||
<p>You have passed parameter userid: <strong>{{ userid }}</strong></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if api_example %}
|
||||
{# API example #}
|
||||
<div class="help">
|
||||
<h3>{% trans 'API example' %}</h3>
|
||||
</div>
|
||||
<div class="body">
|
||||
<h5 class="pt12">Data from API and passed to template from controller</h5>
|
||||
<pre>{% debug list_from_controller %}</pre>
|
||||
|
||||
<h5 class="pt12">Data from API accessed directly from template file</h5>
|
||||
{% set list = admin.example_get_something({"microsoft":1}) %}
|
||||
<pre>{% debug list %}</pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="widget">
|
||||
<div class="head">
|
||||
<h5>{% trans 'README' %}</h5>
|
||||
</div>
|
||||
|
||||
<div class="body list arrowBlue">
|
||||
{{ guest.example_readme|markdown }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,53 +0,0 @@
|
||||
{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
|
||||
{% import "macro_functions.phtml" as mf %}
|
||||
{% block meta_title %}Example extension settings{% endblock %}
|
||||
{% set active_menu = 'system' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<ul>
|
||||
<li class="firstB"><a href="{{ '/'|alink }}">{% trans 'Home' %}</a></li>
|
||||
<li><a href="{{ 'system'|alink }}">{% trans 'Settings' %}</a></li>
|
||||
<li class="lastB">{% trans 'Example module settings' %}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="widget">
|
||||
<div class="head">
|
||||
<h5 class="iCog">{% trans 'Example extension settings' %}</h5>
|
||||
</div>
|
||||
|
||||
{% set params = admin.extension_config_get({"ext":"mod_example"}) %}
|
||||
|
||||
<form method="post" action="{{ 'api/admin/extension/config_save'|link }}" class="mainForm api-form" data-api-msg="{% trans 'Configuration updated' %}">
|
||||
|
||||
<div class="help">
|
||||
<h3>{% trans 'Example extension settings' %}</h3>
|
||||
<p>{% trans 'Every extension can have settings page. Only requirement is to have mod_example_settings.phtml page in html_admin folder' %}</p>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<div class="rowElem noborder">
|
||||
<label>{% trans 'Parameter title' %}</label>
|
||||
<div class="formRight">
|
||||
<input type="text" name="custom_param" value="{{params.custom_param}}" placeholder="{% trans 'Example custom value' %}"/>
|
||||
</div>
|
||||
<div class="fix"></div>
|
||||
</div>
|
||||
|
||||
<div class="rowElem">
|
||||
<label>{% trans 'Public Parameter title' %}</label>
|
||||
<div class="formRight">
|
||||
<input type="text" name="public[param]" value="{{params.public.param}}" placeholder="{% trans 'This setting will be accessible by Guest API' %}"/>
|
||||
</div>
|
||||
<div class="fix"></div>
|
||||
</div>
|
||||
|
||||
<input type="submit" value="{% trans 'Update' %}" class="greyishBtn submitForm" />
|
||||
<input type="hidden" name="ext" value="mod_example" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user