// display page
$this->view->render(
$response,
- 'pages/contribution_form.html.twig',
+ 'modals/contribution_form.html.twig',
$params
);
return $response;
// display page
$this->view->render(
$response,
- 'elements/contributions_mass_choose_type.html.twig',
+ 'modals/mass_choose_contributions_type.html.twig',
array(
'mode' => $request->isXhr() ? 'ajax' : '',
'page_title' => str_replace(
// display page
$this->view->render(
$response,
- 'elements/contributions_mass_add.html.twig',
+ 'modals/mass_add_contributions.html.twig',
array(
'mode' => $request->isXhr() ? 'ajax' : '',
'page_title' => str_replace(
// display page
$this->view->render(
$response,
- 'pages/configuration_dynamic_field_form.html.twig',
+ 'modals/configuration_dynamic_field_form.html.twig',
$params
);
return $response;
// display page
$this->view->render(
$response,
- 'pages/confirm_removal.html.twig',
+ 'modals/confirm_removal.html.twig',
$this->getconfirmDeleteParams($request)
);
return $response;
// display page
$this->view->render(
$response,
- 'pages/confirm_removal.html.twig',
+ 'modals/confirm_removal.html.twig',
array(
'mode' => $request->isXhr() ? 'ajax' : '',
'page_title' => sprintf(
// display page
$this->view->render(
$response,
- 'pages/confirm_removal.html.twig',
+ 'modals/confirm_removal.html.twig',
array(
'mode' => $request->isXhr() ? 'ajax' : '',
'page_title' => _T('Flush the logs'),
// display page
$this->view->render(
$response,
- 'pages/members_attendance_sheet.html.twig',
+ 'modals/members_attendance_sheet.html.twig',
[
'page_title' => _T("Attendance sheet configuration"),
'ajax' => $ajax,
// display page
$this->view->render(
$response,
- 'pages/plugin_initdb.html.twig',
+ 'modals/plugin_initdb.html.twig',
$params
);
return $response;
+++ /dev/null
-{% extends 'pages/contribution_form.html.twig' %}
-
-{% block content %}
- <div id="mass_contributions"{% if mode != 'ajax' %} class="center"{% else %} title="{{ page_title }}"{% endif %}>
- <form action="{{ form_url }}" method="post">
- {% if mode != 'ajax' %}<h2>{{ page_title }}</h2>{% endif %}
- <div class="button-container">
- {{ parent() }}
- <input type="submit" id="masschange" class="button" value="{% if changes is not defined %}{{ _T("Edit") }}{% else %}{{ _T("OK") }}{% endif %}"/>
- <a href="{{ cancel_uri }}" class="button" id="btncancel">{{ _T("Cancel") }}</a>
- <input type="hidden" name="confirm" value="1"/>
- {% if mode == 'ajax' %}<input type="hidden" name="ajax" value="true"/>{% endif %}
- {% for key, value in data %}
- {% if value is iterable %}
- {% for val in value %}
- <input type="hidden" name="{{ key }}[]" value="{{ val }}"/>
- {% endfor %}
- {% else %}
- <input type="hidden" name="{{ key }}" value="{{ value }}"/>
- {% endif %}
- {% endfor %}
- {% include "components/forms/csrf.html.twig" %}
- </div>
- </form>
- </div>
-{% endblock %}
+++ /dev/null
-{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
-
-{% block content %}
- <div id="mass_contributions"{% if mode != 'ajax' %} class="center"{% else %} title="{{ page_title }}"{% endif %}>
- <form action="{{ form_url }}" method="post">
- {% if mode != 'ajax' %}<h2>{{ page_title }}</h2>{% endif %}
- <label for="type">{{ _T("Contribution type") }}</label>
- <select name="type" id="type">
- <option value="{{ constant('Galette\\Entity\\Contribution::TYPE_FEE') }}">{{ _T("Membership") }}</option>
- <option value="{{ constant('Galette\\Entity\\Contribution::TYPE_DONATION') }}">{{ _T("Donation") }}</option>
- </select>
- <div class="button-container">
- <input type="submit" id="masschange" class="button" value="{{ _T("OK") }}"/>
- <a href="{{ cancel_uri }}" class="button" id="btncancel">{{ _T("Cancel") }}</a>
- {% if mode == 'ajax' %}<input type="hidden" name="ajax" value="true"/>{% endif %}
- {% for key, value in data %}
- {% if value is iterable %}
- {% for val in value %}
- <input type="hidden" name="{{ key }}[]" value="{{ val }}"/>
- {% endfor %}
- {% else %}
- <input type="hidden" name="{{ key }}" value="{{ value }}"/>
- {% endif %}
- {% endfor %}
- {% include "components/forms/csrf.html.twig" %}
- </div>
- </form>
- </div>
-{% endblock %}
{% include 'components/forms/csrf.html.twig' %}
</div>
</form>
- {% include 'elements/replacements_legend.html.twig' with { 'legends': model.getLegend(), 'cur_ref': model.id } %}
+ {% include 'modals/replacements_legend.html.twig' with { 'legends': model.getLegend(), 'cur_ref': model.id } %}
+++ /dev/null
-<div id="legende{{ cur_ref }}" class="texts_legend ui modal" title="{{ _T("Existing variables") }}">
- <div class="header">{{ _T('Existing variables') }}</div>
- <div class="content">
- <table class="ui very basic table">
- {% for legend in legends %}
- <tr>
- <th colspan="4">
- {{ legend.title }}
- </th>
- </tr>
- {% for pattern in legend.patterns %}
- {% if loop.index0 % 2 == 0 %}
- <tr>
- {% endif %}
- <th><tt>{{ pattern.pattern|trim('/') }}</tt></th>
- <td class="back">
- {% if pattern.title is defined %}{{ pattern.title }}{% endif %}
- </td>
- {% if loop.index0 % 2 != 0 %}
- </tr>
- {% endif %}
- {% endfor %}
- {% endfor %}
- </table>
- </div>
- <div class="actions"><div class="ui labeled icon deny button"><i class="times icon"></i> {{ _T('Close') }}</div></div>
-</div>
-<script type="text/javascript">
-
- var _addLegenButton = function(selector) {
- $(selector).append('<a id="btnlegend" class="ui tooltip" data-html="{{ _T("Show existing variables")|e('js') }}"><i class="circular inverted primary link icon info"></i> <span class="sr-only">{{ _T("Show existing variables")|e('js') }}</span></a>');
- };
-
- var _handleLegend = function(selector) {
- if (typeof selector == 'undefined') {
- selector = '{{ cur_ref }}';
- }
- $('#legende' + selector + ' h1').remove();
- $('#legende' + selector).dialog({
- autoOpen: false,
- modal: true,
- hide: 'fold',
- width: '60em',
- create: function (event, ui) {
- if ($(window ).width() < 767) {
- $(this).dialog('option', {
- 'width': '95%',
- 'draggable': false
- });
- }
- }
- }).dialog('close');
-
- $('#btnlegend').unbind('click').click(function(){
- $('#legende' + selector).dialog('open');
- return false;
- });
- };
-</script>
--- /dev/null
+{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
+
+{% block content %}
+{% if action == 'edit' %}
+ <form action="{{ path_for('doEditDynamicField', { 'form_name': form_name, 'id': df.getId() }) }}" method="post" class="ui form">
+ <div class="ui top attached header">
+ {{ _T("Edit field %field")|replace({ '%field': df.getName() }) }}
+ </div>
+ <div class="ui bottom attached segment">
+ <div class="active content field">
+ <div class="inline field">
+ <label for="field_name">{{ _T("Name:") }}</label>
+ <input type="text" name="field_name" id="field_name" value="{{ df.getName(false) }}"{if not $df|is_a:'Galette\DynamicFields\Separator'} required="required"{/if}/>
+ </div>
+ <div class="inline field">
+ <label for="field_perm">{{ _T("Permissions:") }}</label>
+ <select name="field_perm" id="field_perm" class="ui dropdown nochosen">
+ {% for key, value in perm_names %}
+ <option value="{{ key }}"{% if key == df.getPerm() %} selected="selected"{% endif %}>{{ value }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ {% if df.hasData() %}
+ <div class="inline field">
+ <label for="field_required">{{ _T("Required:") }}</label>
+ <select name="field_required" id="field_required" class="ui dropdown nochosen">
+ <option value="0" {% if not df.isRequired() %}selected="selected"{% endif %}>{{ _T("No") }}</option>
+ <option value="1" {% if df.isRequired() %}selected="selected"{% endif %}>{{ _T("Yes") }}</option>
+ </select>
+ </div>
+ {% endif %}
+ {% if df.hasWidth() %}
+ <div class="inline field">
+ <label for="field_width">{{ _T("Width:") }}</label>
+ <input type="text" name="field_width" id="field_width" value="{{ df.getWidth() }}" size="3"/>
+ </div>
+ {% endif %}
+ {% if df.hasHeight() %}
+ <div class="inline field">
+ <label for="field_height">{{ _T("Height:") }}</label>
+ <input type="text" name="field_height" id="field_height" value="{{ df.getHeight() }}" size="3"/>
+ </div>
+ {% endif %}
+ {% if df.hasSize() %}
+ <div class="inline field">
+ <label for="field_size">{{ _T("Size:") }}</label>
+ <input type="text" name="field_size" id="field_size" value="{{ df.getSize() }}" size="3"/>
+ {if $df|is_a:'Galette\DynamicFields\File'}
+ <span class="exemple">{{ _T("Maximum file size, in Ko.") }}</span>
+ {else}
+ <span class="exemple">{{ _T("Maximum number of characters.") }}</span>
+ {/if}
+ </div>
+ {% endif %}
+ {% if df.isMultiValued() %}
+ <div class="inline field">
+ <label for="field_repeat">{{ _T("Repeat:") }}</label>
+ <input type="text" name="field_repeat" id="field_repeat" value="{{ df.getRepeat() }}" size="3"/>
+ <span class="exemple">{{ _T("Number of values or zero if infinite.") }}</span>
+ </div>
+ {% endif %}
+ {% if df.hasFixedValues() %}
+ <div class="inline field">
+ <label for="fixed_values">{{ _T("Values:") }}</label>
+ <textarea name="fixed_values" id="fixed_values" cols="20" rows="6">{{ df.getValues(true) }}</textarea>
+ <br/><span class="exemple">{{ _T("Choice list (one entry per line).") }}</span>
+ </div>
+ {% endif %}
+ <div class="field">
+ <label for="field_information">{{ _T("Information:") }}</label>
+ <textarea name="field_information" id="field_information" cols="20" rows="6">{{ df.getInformation() }}</textarea>
+ <span class="tip">{{ _T("Extra information displayed along with dynamic field.") }}</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="ui basic center aligned segment">
+ <button type="submit" class="ui labeled icon primary button action">
+ <i class="save icon"></i> {{ _T("Save") }}
+ </button>
+ {% include "components/forms/csrf.html.twig" %}
+ </div>
+ </form>
+{% elseif action == 'add' %}
+ <form action="{{ path_for('doAddDynamicField', { 'form_name': form_name }) }}" method="post" enctype="multipart/form-data" title="{{ _T("New dynamic field") }}" class="ui form">
+ {% if mode != 'ajax' %}
+ <div class="ui top attached header">
+ {{ _T("New dynamic field") }}
+ </div>
+ <div class="ui bottom attached segment">
+ <div class="active content field">
+ {% else %}
+ <div class="cssform">
+ {% endif %}
+ <div class="inline field">
+ <label for="field_name">{{ _T("Field name") }}</label>
+ <input size="40" type="text" name="field_name" id="field_name" value="{% if df is defined %}{{ df.getName() }}{% endif %}"/>
+ </div>
+ <div class="inline field">
+ <label for="field_perm">{{ _T("Visibility") }}</label>
+ <select name="field_perm" id="field_perm" class="ui dropdown nochosen">
+ {% set perm = 0 %}
+ {% if df is defined %}
+ {% set perm = df.getPerm() %}
+ {% endif %}
+ {% for key, value in perm_names %}
+ <option value="{{ key }}"{% if key == perm %} selected="selected"{% endif %}>{{ value }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ <div class="inline field">
+ <label for="field_type">{{ _T("Type") }}</label>
+ <select name="field_type" id="field_type" class="ui dropdown nochosen">
+ {% set type = 0 %}
+ {% if df is defined %}
+ {% set type = df.getType() %}
+ {% endif %}
+ {html_options options=$field_type_names selected=$type}
+ {% for key, value in field_type_names %}
+ <option value="{{ key }}"{% if key == type %} selected="selected"{% endif %}>{{ value }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ <div class="inline field">
+ <label for="field_required">{{ _T("Required") }}</label>
+ <select name="field_required" id="field_required" class="ui dropdown nochosen">
+ <option value="0"{% if df is not defined or not df.isRequired() %} selected="selected"{% endif %}>{{ _T("No") }}</option>
+ <option value="1"{% if df is defined and df.isRequired() %} selected="selected"{% endif %}>{{ _T("Yes") }}</option>
+ </select>
+ {% include "components/forms/csrf.html.twig" %}
+ </div>
+ {% if mode != 'ajax' %}
+ </div>
+ {% endif %}
+ </div>
+ <div class="ui basic center aligned segment">
+ <button type="submit" name="valid" class="ui labeled icon primary button action">
+ <i class="plus icon"></i> {{ _T("Add") }}
+ </button>
+ <input type="hidden" name="form_name" id="form_name" value="{{ form_name }}"/>
+ </div>
+ </form>
+{% endif %}
+{% endblock %}
+
+{% block javascripts %}
+ <script>
+ $('#field_information').summernote({
+ lang: '{{ i18n.getID()|replace({ '_': '-'}) }}',
+ height: 240,
+ toolbar: [
+ ['style', ['style']],
+ ['font', ['bold', 'italic', 'strikethrough', 'clear']],
+ ['para', ['ul', 'ol', 'paragraph']],
+ ['insert', ['link', 'picture']],
+ ['view', ['codeview', 'help']]
+ ],
+ styleTags: [
+ 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'
+ ]
+ });
+ $('#field_information').summernote('focus');
+
+ </script>
+{% endblock %}
--- /dev/null
+{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
+
+{% block content %}
+ <div id="confirm_removal"{% if mode == 'ajax' %} class="center"{% else %} title="{{ page_title }}"{% endif %}>
+ <form action="{{ form_url }}" method="post">
+ {% if mode != 'ajax' %}
+ <div class="ui segment">
+ <div class="content">
+ {% if with_cascade is defined %}
+ <div class="field inline">
+ {% endif %}
+ {% endif %}
+ {% if with_cascade is defined %}
+ <label for="cascade">{{ _T("Cascade delete") }}</label>
+ <input type="checkbox" name="cascade" id="cascade" value="true" title="{{ _T("Delete all associated data") }}"/>
+ {% endif %}
+ {% if mode != 'ajax' %}
+ {% if with_cascade is defined %}
+ </div>
+ {% endif %}
+ {% if message is defined %}
+ <div class="ui warning message">
+ {% endif %}
+ {% endif %}
+ {% if message is defined %}
+ <p>{{ message }}</p>
+ {% endif %}
+ {% if mode != 'ajax' %}
+ {% if message is defined %}
+ </div>
+ {% endif %}
+ <div class="ui red message">
+ {% endif %}
+ <p>{{ _T("Are you sure you want to proceed?") }}<br/>{{ _T("This can't be undone.") }}</p>
+ {% if mode != 'ajax' %}
+ </div>
+ </div>
+ </div>
+ <div class="ui basic center aligned segment">
+ {% else %}
+ <div class="button-container">
+ {% endif %}
+ <input type="submit" id="delete" value="{{ _T("Remove") }}"{% if mode != 'ajax' %} class="ui primary button action"{% endif %}/>
+ <a href="{{ cancel_uri }}" class="{% if mode != 'ajax' %}ui {% endif %}button" id="btncancel">{{ _T("Cancel") }}</a>
+ <input type="hidden" name="confirm" value="1"/>
+ {% if mode == 'ajax' %}<input type="hidden" name="ajax" value="true"/>{% endif %}
+ {% for key, value in data %}
+ {% if value is iterable %}
+ {% for val in value %}
+ <input type="hidden" name="{{ key }}[]" value="{{ val }}"/>
+ {% endfor %}
+ {% else %}
+ <input type="hidden" name="{{ key }}" value="{{ value }}"/>
+ {% endif %}
+ {% endfor %}
+ {% include 'components/forms/csrf.html.twig' %}
+ </div>
+ </form>
+ </div>
+{% endblock %}
+
+{% block javascripts %}
+{% endblock %}
--- /dev/null
+{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
+
+{% block content %}
+{% if members.list is defined or require_mass %}
+ <form action="{% if contribution.id %}{{ path_for("doEditContribution", { "type": type, "id": contribution.id }) }}{% else %}{{ path_for("doAddContribution", { "type": type }) }}{% endif %}" enctype="multipart/form-data" method="post" class="ui form">
+ {% if contribution.isTransactionPart() %}
+ {assign var="mid" value=$contribution->transaction->member}
+ <div class="ui top attached header">
+ {{ _T("Related transaction information") }}
+ </div>
+ <div class="ui bottom attached segment">
+ <div class="active content field">
+ <table id="transaction_detail" class="listing ui celled table">
+ <thead>
+ <tr>
+ <th colspan="5">
+ {{ contribution.transaction.description }}
+ <a
+ href="{{ path_for("editTransaction", { "id": contribution.transaction.id }) }}"
+ class="ui icon button tooltip"
+ title="{{ _T("View transaction") }}"
+ >
+ <i class="columns icon"><span class="sr-only">{{ _T("View transaction") }}</span></i>
+ </a>
+ </th>
+ </tr>
+ <tr>
+ <th class="listing">#</th>
+ <th class="listing">{{ _T("Date") }}</th>
+ <th class="listing">{{ _T("Member") }}</th>
+ <th class="listing">{{ _T("Amount") }}</th>
+ <th class="listing">{{ _T("Not dispatched amount") }}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ contribution.transaction.id }}</td>
+ <td>{{ contribution.transaction.date }}</td>
+ <td>{ memberName id="$mid"}</td>
+ <td class="right">{{ contribution.transaction.amount }}</td>
+ <td class="right">{{ contribution.transaction.getMissingAmount() }}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% endif %}
+ <div class="ui styled fluid accordion field">
+ <div class="active title">
+ <i class="icon dropdown"></i>
+ {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
+ {{ _T("Select contributor and membership fee type") }}
+ {% else %}
+ {{ _T("Select contributor and donation type") }}
+ {% endif %}
+ {% if contribution.isTransactionPart() and contribution.transaction.getMissingAmount() > 0 %}
+ <a
+ href="{{ path_for("addContribution", { "type": constant('Galette\\Entity\\Contribution::TYPE_FEE') }) }}?trans_id={{ contribution.transaction.id }}"
+ class="ui icon button fright tooltip"
+ title="{{ _T("Create a new fee that will be attached to the current transaction") }}">
+ <i class="user check icon"></i>
+ <span class="sr-only">{{ _T("New attached fee") }}</span>
+ </a>
+ <a
+ href="{{ path_for("addContribution", { "type": "donation" }) }}?trans_id={{ contribution.transaction.id }}"
+ class="ui icon button fright tooltip"
+ title="{{ _T("Create a new donation that will be attached to the current transaction") }}">
+ <i class="gift icon"></i>
+ <span class="sr-only">{{ _T("New attached donation") }}</span>
+ </a>
+ {% endif %}
+ </div>
+ {% if not require_mass %}
+ <div class="active content field">
+ <div class="field inline">
+ <label for="id_adh">{{ _T("Contributor:") }}</label>
+ <select name="id_adh" id="id_adh" class="nochosen">
+ {% if adh_selected == 0 %}
+ <option value="">{{ _T("Search for name or ID and pick member") }}</option>
+ {% endif %}
+ {% for k,v in members.list %}
+ <option value="{{ k }}"{% if contribution.member == k %} selected="selected"{% endif %}>{{ v }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ {% endif %}
+ <div class="field inline">
+ <label for="id_type_cotis">{{ _T("Contribution type:") }}</label>
+ <select name="id_type_cotis" id="id_type_cotis" class="ui dropdown nochosen"{% if required.id_type_cotis == 1 %} required="required"{% endif %}>
+ {% if contribution.type %}
+ {% set selectedid = contribution.type.id %}
+ {% else %}
+ {% set selectedid = null %}
+ {% endif %}
+ {html_options options=$type_cotis_options selected=$selectedid}
+ {% for key, value in type_cotis_options %}
+ <option value="{{ key }}"{% if key == selectedid %} selected="selected"{% endif %}>{{ value }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
+ <noscript>
+ <div class="button-container" id="reloadcont">
+ <input type="submit" id="btnreload" name="btnreload" value="{{ _T("Reload") }}" title="{{ _T("Reload date information according to selected member and contribution type") }}" class="ui button"/>
+ </div>
+ </noscript>
+ {% endif %}
+ </div>
+ </div>
+
+ <div class="ui styled fluid accordion field">
+ <div class="active title">
+ <i class="icon dropdown"></i>
+ {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
+ {{ _T("Details of membership fee") }}
+ {% else %}
+ {{ _T("Details of donation") }}
+ {% endif %}
+ </div>
+ <div class="active content field">
+ <div class="field inline">
+ <label for="montant_cotis">{{ _T("Amount:") }}</label>
+ <input type="text" name="montant_cotis" id="montant_cotis" value="{{ contribution.amount }}" maxlength="10"{% if required.montant_cotis == 1 %} required="required"{% endif %}/>
+ </div>
+ {# payment type #}
+ {% set ptype = contribution.payment_type %}
+ {% if ptype == null %}
+ {% set ptype = constant('Galette\\Entity\\PaymentType::CHECK') %}
+ {% endif %}
+ {% include 'components/forms/payment_types.html.twig' with { 'current': ptype, 'varname': 'type_paiement_cotis', 'show_inline': true } %}
+ <div class="field inline">
+ <label for="date_enreg">
+ {{ _T("Record date:") }}
+ </label>
+ <div class="ui calendar" id="contribution-rangestart">
+ <div class="ui input left icon">
+ <i class="calendar icon"></i>
+ <input type="text" name="date_enreg" id="date_enreg" value="{{ contribution.date }}" maxlength="10"{% if required.date_enreg == 1 %} required="required"{% endif %}>
+ </div>
+ </div>
+ <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
+ </div>
+ <div class="field inline">
+ <label for="date_debut_cotis">
+ {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
+ {{ _T("Start date of membership:") }}
+ {% else %}
+ {{ _T("Date of contribution:") }}
+ {% endif %}
+ </label>
+ <div class="ui calendar" id="contribution-rangeend">
+ <div class="ui input left icon">
+ <i class="calendar icon"></i>
+ <input type="text" name="date_debut_cotis" id="date_debut_cotis" value="{{ contribution.begin_date }}" maxlength="10"{% if required.date_debut_cotis == 1 %} required="required"{% endif %}/>
+ </div>
+ </div>
+ <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
+ </div>
+ {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
+ <div class="field inline">
+ {% if preferences.pref_membership_ext != "" %}
+ <label for="duree_mois_cotis">{{ _T("Membership extension:") }}</label>
+ <input type="text" name="duree_mois_cotis" id="duree_mois_cotis" value="{{ contribution.duration }}" maxlength="3"{% if required.date_fin_cotis == 1%} required="required"{% endif %}/>
+ <span class="exemple">{{ _T("months") }}</span>
+ {% else %}
+ <label for="date_fin_cotis">{{ _T("End date of membership:") }}</label>
+ <input type="text" name="date_fin_cotis" id="date_fin_cotis" value="{{ contribution.end_date }}" maxlength="10"{% if required.date_fin_cotis == 1 %} required="required"{% endif %}/>
+ <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
+ {% endif %}
+ </div>
+ {% endif %}
+ <div class="field inline">
+ <label for="info_cotis">{{ _T("Comments:") }}</label>
+ <textarea name="info_cotis" id="info_cotis" cols="61" rows="6"{% if required.info_cotis is defined and required.info_cotis == 1 %} required="required"{% endif %}>{{ contribution.info }}</textarea>
+ </div>
+ </div>
+ </div>
+
+ {% if contribution.isTransactionPart() and contribution.transaction.getMissingAmount() %}
+ <div class="ui styled fluid accordion field">
+ <div class="active title">
+ <i class="icon dropdown"></i>
+ {{ _T("Transaction related") }}
+ </div>
+ <div class="active content field">
+ <p>
+ <span class="bline tooltip" title="{{ _T("Select a contribution type to create for dispatch transaction") }}">{{ _T("Dispatch type:") }}</span>
+ <span class="tip">{{ _T("Select a contribution type to create for dispatch transaction") }}</span>
+ <input type="radio" name="contrib_type" id="contrib_type_fee" value="{{ constant('Galette\\Entity\\Contribution::TYPE_FEE') }}" checked="checked"/> <label for="contrib_type_fee">{{ _T("Membership fee") }}</label>
+ <input type="radio" name="contrib_type" id="contrib_type_donation" value="donation"/> <label for="contrib_type_donation">{{ _T("Donation") }}</label>
+ </p>
+ </div>
+ </div>
+ {% endif %}
+ {% include 'components/dynamic_fields.html.twig' with { 'object': contribution } %}
+ {% if not contribution.id and preferences.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_DISABLED') %}
+ {% if not require_mass %}
+ <div class="ui center aligned segment">
+ <div class="inline field">
+ <div class="ui toggle checkbox">
+ <input type="checkbox" name="mail_confirm" id="mail_confirm" value="1" {if isset($smarty.post.mail_confirm) and $smarty.post.mail_confirm != ""}checked="checked"{/if}/>
+ <label for="mail_confirm">
+ {{ _T("Notify member") }}
+ </label>
+ <br/>
+ <span class="exemple">
+ {{ _T("Member will receive a notification by email, if he has an address.") }}
+ </span>
+ </div>
+ </div>
+ </div>
+ {% endif %}
+ {% endif %}
+ {% if not require_mass %}
+ <div class="ui basic center aligned segment">
+ <button type="submit" name="valid" class="ui labeled icon primary button action">
+ <i class="save icon"></i> {{ _T("Save") }}
+ </button>
+ <input type="hidden" name="id_cotis" value="{{ contribution.id }}"/>
+ <input type="hidden" name="valid" value="1"/>
+ <input type="hidden" name="trans_id" value="{% if contribution.transaction != NULL %}{{ contribution.transaction.id }}{% endif %}"/>
+ </div>
+ {% endif %}
+ {% include "components/forms/csrf.html.twig" %}
+ </form>
+{% else %} {# No members #}
+ <div class="ui warning message" id="warningbox">
+ <h3>{{ _T("No member registered!") }}</h3>
+ <p>
+ {{ _T("Unfortunately, there is no member in your database yet,") }}
+ <br/>
+ <a href="{{ path_for("addMember") }}">{{ _T("please create a member") }}</a>
+ </p>
+ </div>
+{% endif %}
+{% endblock %}
+
+{% block javascripts %}
+<script type="text/javascript">
+ {% include "elements/js/choose_adh.js.twig" %}
+
+ $(function() {
+ /*$('#date_debut_cotis, #date_fin_cotis, #date_enreg').datepicker({
+ changeMonth: true,
+ changeYear: true,
+ showOn: 'button',
+ buttonText: '<i class="ui calendar alt icon"></i> <span class="sr-only">{{ _T("Select a date")|e("js") }}</span>'
+ });*/
+
+ {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') and not contribution.id %}
+ $('#id_adh, #id_type_cotis').on('change', function() {
+ var _this = $(this);
+ var _member = $('#id_adh').val();
+ var _fee = $('#id_type_cotis').val();
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url : '{{ path_for ("contributionDates") }}',
+ data: {
+ member_id: _member,
+ fee_id: _fee
+ },
+ {% include "elements/js/loader.js.twig" %},
+ success: function(res){
+ $('#date_debut_cotis').val(res.date_debut_cotis);
+ $('#date_fin_cotis').val(res.date_fin_cotis);
+ },
+ error: function() {
+ alert("{{ _T("An error occurred retrieving dates :(")|e("js") }}");
+ }
+ });
+
+ });
+ {% endif %}
+
+ {% if contribution.isTransactionPart() and contribution.transaction.getMissingAmount() %}
+ $('#transaction_related').hide();
+ $('#montant_cotis').on('keyup', function() {
+ var _amount = {{ contribution.transaction.getMissingAmount() }};
+ var _current = $(this).val();
+ if (_current < _amount) {
+ $('#transaction_related').show();
+ } else if (_current > _amount) {
+ alert('{{ _T("Contribution amount should be greater than %max")|replace({ '%max': contribution.transaction.getMissingAmount() })|e("js") }}');
+ } else {
+ $('#transaction_related').hide();
+ }
+ });
+ {% endif %}
+ });
+</script>
+{% endblock %}
--- /dev/null
+{% extends 'modals/contribution_form.html.twig' %}
+
+{% block content %}
+ <div id="mass_contributions"{% if mode != 'ajax' %} class="center"{% else %} title="{{ page_title }}"{% endif %}>
+ <form action="{{ form_url }}" method="post">
+ {% if mode != 'ajax' %}<h2>{{ page_title }}</h2>{% endif %}
+ <div class="button-container">
+ {{ parent() }}
+ <input type="submit" id="masschange" class="button" value="{% if changes is not defined %}{{ _T("Edit") }}{% else %}{{ _T("OK") }}{% endif %}"/>
+ <a href="{{ cancel_uri }}" class="button" id="btncancel">{{ _T("Cancel") }}</a>
+ <input type="hidden" name="confirm" value="1"/>
+ {% if mode == 'ajax' %}<input type="hidden" name="ajax" value="true"/>{% endif %}
+ {% for key, value in data %}
+ {% if value is iterable %}
+ {% for val in value %}
+ <input type="hidden" name="{{ key }}[]" value="{{ val }}"/>
+ {% endfor %}
+ {% else %}
+ <input type="hidden" name="{{ key }}" value="{{ value }}"/>
+ {% endif %}
+ {% endfor %}
+ {% include "components/forms/csrf.html.twig" %}
+ </div>
+ </form>
+ </div>
+{% endblock %}
--- /dev/null
+{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
+
+{% block content %}
+ <div id="mass_contributions"{% if mode != 'ajax' %} class="center"{% else %} title="{{ page_title }}"{% endif %}>
+ <form action="{{ form_url }}" method="post">
+ {% if mode != 'ajax' %}<h2>{{ page_title }}</h2>{% endif %}
+ <label for="type">{{ _T("Contribution type") }}</label>
+ <select name="type" id="type">
+ <option value="{{ constant('Galette\\Entity\\Contribution::TYPE_FEE') }}">{{ _T("Membership") }}</option>
+ <option value="{{ constant('Galette\\Entity\\Contribution::TYPE_DONATION') }}">{{ _T("Donation") }}</option>
+ </select>
+ <div class="button-container">
+ <input type="submit" id="masschange" class="button" value="{{ _T("OK") }}"/>
+ <a href="{{ cancel_uri }}" class="button" id="btncancel">{{ _T("Cancel") }}</a>
+ {% if mode == 'ajax' %}<input type="hidden" name="ajax" value="true"/>{% endif %}
+ {% for key, value in data %}
+ {% if value is iterable %}
+ {% for val in value %}
+ <input type="hidden" name="{{ key }}[]" value="{{ val }}"/>
+ {% endfor %}
+ {% else %}
+ <input type="hidden" name="{{ key }}" value="{{ value }}"/>
+ {% endif %}
+ {% endfor %}
+ {% include "components/forms/csrf.html.twig" %}
+ </div>
+ </form>
+ </div>
+{% endblock %}
--- /dev/null
+{% extends (ajax) ? "ajax.html.twig" : "page.html.twig" %}
+
+{% block content %}
+ <form action="{{ path_for('attendance_sheet') }}" id="sheet_details_form" method="POST" class="ui form">
+ <div class="ui top attached header">
+ {{ _T("Some details about your attendance sheet...") }} - <span>{{ _T("%s attendees")|replace({ '%s': selection|length }) }}</span>
+ </div>
+ <div class="ui bottom attached segment">
+ <div class="active content field">
+ <div class="inline field">
+ <label for="sheet_type">{{ _T("Sheet type") }}</label>
+ <input type="text" name="sheet_type" id="sheet_type" value="{{ _T("Attendance sheet") }}" required/>
+ </div>
+ <div class="inline field">
+ <label for="sheet_title">{{ _T("Title") }}</label>
+ <input type="text" name="sheet_title" id="sheet_title"/>
+ </div>
+ <div class="inline field">
+ <label for="sheet_sub_title">{{ _T("Subtitle") }}</label>
+ <input type="text" name="sheet_sub_title" id="sheet_sub_title"/>
+ </div>
+ <div class="inline field">
+ <label for="sheet_date">{{ _T("Date") }}</label>
+ <input type="text" name="sheet_date" id="sheet_date"/>
+ <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
+ </div>
+ <div class="inline field">
+ <label for="sheet_photos">{{ _T("With photos?") }}</label>
+ <input type="checkbox" name="sheet_photos" id="sheet_photos" value="1"/>
+{% for member in selection %}
+ <input type="hidden" name="selection[]" value="{{ member }}"/>
+{% endfor %}
+ {% include 'components/forms/csrf.html.twig' %}
+ </div>
+ </div>
+ </div>
+{% if not ajax %}
+ <div class="ui basic center aligned segment">
+ <button type="submit" class="ui labeled icon primary button">
+ <i class="file pdf icon" aria-hidden="true"></i>
+ {{ _T("Generate") }}
+ </button>
+ </div>
+{% endif %}
+
+ </form>
+{% endblock %}
--- /dev/null
+{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
+
+{% block content %}
+<section id="plugin_install">
+ <header>
+ <h1>{{ _T("%plugin plugin installation")|replace({ '%plugin': plugin.name }) }}</h1>
+ </header>
+ <div>
+ <form action="{{ path_for('pluginInitDb', { 'id': plugid }) }}" id="plugins_initdb_form" method="post">
+ <h2>{{ page_title }}</h2>
+{% if mode == 'ajax' %}
+ {% include 'elements/messages_inline.html.twig' %}
+{% endif %}
+
+
+
+{% if step == 1 %}
+ <div id="installation_mode">
+ <article id="mode_new" class="installation_mode">
+ <h3>
+ <input type="radio" name="install_type" value="{{ constant('Galette\\Core\\PluginInstall::INSTALL') }}" checked="checked" id="install"/>
+ <label for="install">{{ _T("New installation") }}</label>
+ </h3>
+ <ul>
+ <li>{{ _T("you're installing %name for the first time")|replace({ '%name': plugin.name }) }},</li>
+ <li>{{ _T("you wish to erase an older version of of %name without keeping your data")|replace({ '%name': plugin.name }) }}.</li>
+ </ul>
+ </article>
+ {% if update_scripts is defined and update_scripts|length > 0 %}
+ <article id="mode_update" class="installation_mode">
+ <h3>
+ <input type="radio" name="install_type" value="{{ constant('Galette\\Core\\PluginInstall::UPDATE') }}" id="update"/>
+ <label for="update">{{ _T("Update") }}</label>
+ </h3>
+ <ul>
+ <li>{{ _T("you already have installed %name, and you want to upgrade to the latest version")|replace({ '%name': plugin.name }) }}.</li>
+ </ul>
+ <p id="warningbox">{{ _T("Warning: Don't forget to backup your current database.") }}</span>
+ </article>
+ {% endif %}
+ </div>
+{% endif %}
+{% if step == 'i2' or step == 'u2' %}
+ {{ results }}
+{% endif %}
+{% if step == 'u3' %}
+ <fieldset class="cssform">
+ <legend class="ui-state-active ui-corner-top">{{ _T("You current %name version is...")|replace({ '%name': plugin.name }) }}</legend>
+ <ul class="leaders">
+ {% set last = 0.00 %}
+ {% for k, val in update_scripts %}
+ <li>
+ <span>
+ <label for="upgrade-{{ val }}">
+
+ {% if last == 0.00 %}
+ {{ _T("older than %version")|replace({ '%version': val }) }}
+ {% elseif last != val %}
+ {{ _T("comprised between") }} {{ last }} {{ _T("and") }} {{ val }}
+ {% else %}
+ {{ val }}
+ {% endif %}
+ {% set last = val %}
+ </label>
+ </span>
+ <span>
+ <input type="radio" name="previous_version" value="{{ val }}" id="upgrade-{{ val }}" required/>
+ </span>
+ </li>
+ {% endfor %}
+ </ul>
+ </fieldset>
+{% endif %}
+{% if step == 'i4' or step == 'u4' %}
+ <p>{{ _T("(Errors on DROP and RENAME operations can be ignored)") }}</p>
+ {% if error_detected|length > 0 %}
+ <p id="errorbox">
+ {% if step == 'i3' %}
+ {{ _T("The tables are not totally created, it may be a permission problem.") }}
+ {% else %}
+ {{ _T("The tables have not been totally created, it may be a permission problem.") }}
+ <br/>
+ {{ _T("Your database is maybe not usable, try to restore the older version.") }}
+ {% endif %}
+ </p>
+ {% endif %}
+{% endif %}
+{% if step == 'i5' or step =='u5' %}
+ <p>
+ {% if step == 'i5' %}
+ {{ _T("Plugin '%name' has been successfully installed!")|replace({ '%name': plugin.name }) }}
+ {% else %}
+ {{ _T("Plugin '%name' has been successfully updated!")|replace({ '%name': plugin.name }) }}
+ {% endif %}
+ </p>
+{% endif %}
+{% if istep < 5 %}
+ <p id="btn_box">
+ <input type="hidden" name="plugid" value="{{ plugid }}"/>
+ {% if istep > 1 and install_type is defined %}
+ <input type="hidden" name="install_type" value="{{ install_type }}"/>
+ {% endif %}
+ {% if error_detected|length == 0 and istep >= 2 or istep > 2 %}
+ <input type="hidden" name="install_dbperms_ok" value="1"/>
+ {% endif %}
+ {% if error_detected|length == 0 and istep >= 4 or istep > 4 %}
+ <input type="hidden" name="install_dbwrite_ok" value="1"/>
+ {% endif %}
+ {% if error_detected|length > 0 %}
+ <input type="submit" value="{{ _T("Retry") }}"/>
+ {% else %}
+ <button id="next" type="ui labeled icon button submit">{{ _T("Next step") }} <i class="forward icon"></i></button>
+ {% endif %}
+{% else %}
+ {% if mode != 'ajax' %}
+ <a href="{{ path_for('plugins') }}" class="ui labeled icon button" id="btnback"><i class="backward icon"></i> {{ _T("Back to plugins managment page") }}</a>
+ {% endif %}
+{% endif %}
+ {% include 'components/forms/csrf.html.twig' %}
+ </p>
+ </form>
+ </div>
+ <footer>
+ <p>{{ _T("Steps:") }}</p>
+ <ol>
+ <li{% if step == 1 %} class="current"{% endif %}>{{ _T("Installation mode") }} - </li>
+ <li{% if step == 'i2' or step == 'u2' %} class="current"{% endif %}>{{ _T("Access permissions to database") }} - </li>
+ {% if install_type is defined and install_type == 'upgrade' %}
+ <li{% if step == 'u3' %} class="current"{% endif %}>{{ _T("Version selection") }} - </li>
+ </li>
+ {% endif %}
+ <li{% if step == 'i4' or step == 'u4' %} class="current"{% endif %}>{% if install_type is not defined or install_type == 'install' %}{{ _T("Database installation") }}{% else %}{{ _T("Database upgrade") }}{% endif %} - </li>
+ <li{% if step == 'i5' or step == 'u5' %} class="current"{% endif %}>{{ _T("End!") }}</li>
+ </ol>
+ </footer>
+</section>
+{% endblock %}
--- /dev/null
+<div id="legende{{ cur_ref }}" class="texts_legend ui large modal" title="{{ _T("Existing variables") }}">
+ <div class="header">{{ _T('Existing variables') }}</div>
+ <div class="scrolling content">
+ <table class="ui very basic table">
+ {% for legend in legends %}
+ <tr>
+ <th colspan="4">
+ {{ legend.title }}
+ </th>
+ </tr>
+ {% for pattern in legend.patterns %}
+ {% if loop.index0 % 2 == 0 %}
+ <tr>
+ {% endif %}
+ <th><tt>{{ pattern.pattern|trim('/') }}</tt></th>
+ <td class="back">
+ {% if pattern.title is defined %}{{ pattern.title }}{% endif %}
+ </td>
+ {% if loop.index0 % 2 != 0 %}
+ </tr>
+ {% endif %}
+ {% endfor %}
+ {% endfor %}
+ </table>
+ </div>
+ <div class="actions"><div class="ui labeled icon deny button"><i class="times icon"></i> {{ _T('Close') }}</div></div>
+</div>
+<script type="text/javascript">
+
+ var _addLegenButton = function(selector) {
+ $(selector).append('<a id="btnlegend" class="ui tooltip" data-html="{{ _T("Show existing variables")|e('js') }}"><i class="circular inverted primary link icon info"></i> <span class="sr-only">{{ _T("Show existing variables")|e('js') }}</span></a>');
+ };
+
+ var _handleLegend = function(selector) {
+ if (typeof selector == 'undefined') {
+ selector = '{{ cur_ref }}';
+ }
+ $('#legende' + selector).modal().modal('hide');
+
+ $('#btnlegend').unbind('click').click(function(){
+ $('#legende' + selector).modal('show');
+ return false;
+ });
+ };
+</script>
{% if part == "dialog" %}
- <div id="telemetry_panel">
- <h3>{{ _T("Telemetry data are <strong>anonymous</strong>; nothing about your organization or its members will be sent.") }}</h3>
- <p>{{ _T("Nothing is automated in the process; it's up to you to send (or resend) data.") }}<br/>{{ _T("You can review below the raw data that would be send if you press the 'Send' button.") }}.<br/>{{ _T("Also note tha all data is sent over a <strong>HTTPS secured connection</strong>.") }}</p>
- <div class="tdata">
+ <div id="telemetry_panel" class="texts_legend ui modal">
+ <div class="header">{{ _T("Telemetry data are <strong>anonymous</strong>; nothing about your organization or its members will be sent.") }}</div>
+ <div class="scrolling content">
+ <p>{{ _T("Nothing is automated in the process; it's up to you to send (or resend) data.") }}<br/>{{ _T("You can review below the raw data that would be send if you press the 'Send' button.") }}.<br/>{{ _T("Also note tha all data is sent over a <strong>HTTPS secured connection</strong>.") }}</p>
+ <div class="tdata">
+ </div>
</div>
</div>
{% endif %}
{% if part == "jsdialog" %}
- $('#telemetry_panel').dialog({
+ $('#telemetry_panel').modal({
title: '{{ _T("Send telemetry information")|e('js') }}',
- buttons: {
- '{{ _T("Send")|e('js') }}': function() {
+ class: 'large',
+ actions: [{
+ text : '{{ _T("Send")|e('js') }}',
+ class : 'green approve',
+ icon : 'share',
+ click : function() {
$.ajax({
url: '{{ path_for('telemetrySend') }}',
method: 'POST',
{% include "elements/js/loader.js.twig" %},
success: function(data) {
if (data.success) {
- $('#telemetry_panel').dialog('close');
+ $('#telemetry_panel').modal('hide');
{% if orig is defined and orig == 'desktop' %}
$('#telemetry').remove();
if ($('#share a').length == 0) {
error: function() {
alert("{{ _T("An error occurred sending telemetry information :(")|e('js') }}");
}
- });
- },
- '{{ _T("Cancel")|e('js') }}': function() {
- $(this).dialog('close');
+ });}
+ }, {
+ text : '{{ _T("Cancel")|e('js') }}',
+ class : 'red cancel',
+ icon : 'times',
+ click : function() {
+ $(this).find('.tdata').empty();
}
- },
- maxHeight: $(window).height(),
- open: function(event, ui) {
- $(this).dialog('option', 'maxHeight', $(window).height());
- $(this).parent().prev('.ui-widget-overlay');
- },
- draggable: true,
- modal: true,
- resizable: true,
- width: ($(window).width() > 767 ? '50%' : '100%'),
- autoOpen: false,
- close: function(){
- $(this).find('.tdata').empty();
- }
+ }]
});
$('#telemetry').on('click', function(e) {
url: '{{ path_for('telemetryInfos') }}',
success: function(data) {
$('#telemetry_panel .tdata').append(data);
- $('#telemetry_panel').dialog('open');
+ $('#telemetry_panel').modal('show');
}
});
}
});
});
-{% endif %}
\ No newline at end of file
+{% endif %}
+++ /dev/null
-{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
-
-{% block content %}
-{% if action == 'edit' %}
- <form action="{{ path_for('doEditDynamicField', { 'form_name': form_name, 'id': df.getId() }) }}" method="post" class="ui form">
- <div class="ui top attached header">
- {{ _T("Edit field %field")|replace({ '%field': df.getName() }) }}
- </div>
- <div class="ui bottom attached segment">
- <div class="active content field">
- <div class="inline field">
- <label for="field_name">{{ _T("Name:") }}</label>
- <input type="text" name="field_name" id="field_name" value="{{ df.getName(false) }}"{if not $df|is_a:'Galette\DynamicFields\Separator'} required="required"{/if}/>
- </div>
- <div class="inline field">
- <label for="field_perm">{{ _T("Permissions:") }}</label>
- <select name="field_perm" id="field_perm" class="ui dropdown nochosen">
- {% for key, value in perm_names %}
- <option value="{{ key }}"{% if key == df.getPerm() %} selected="selected"{% endif %}>{{ value }}</option>
- {% endfor %}
- </select>
- </div>
- {% if df.hasData() %}
- <div class="inline field">
- <label for="field_required">{{ _T("Required:") }}</label>
- <select name="field_required" id="field_required" class="ui dropdown nochosen">
- <option value="0" {% if not df.isRequired() %}selected="selected"{% endif %}>{{ _T("No") }}</option>
- <option value="1" {% if df.isRequired() %}selected="selected"{% endif %}>{{ _T("Yes") }}</option>
- </select>
- </div>
- {% endif %}
- {% if df.hasWidth() %}
- <div class="inline field">
- <label for="field_width">{{ _T("Width:") }}</label>
- <input type="text" name="field_width" id="field_width" value="{{ df.getWidth() }}" size="3"/>
- </div>
- {% endif %}
- {% if df.hasHeight() %}
- <div class="inline field">
- <label for="field_height">{{ _T("Height:") }}</label>
- <input type="text" name="field_height" id="field_height" value="{{ df.getHeight() }}" size="3"/>
- </div>
- {% endif %}
- {% if df.hasSize() %}
- <div class="inline field">
- <label for="field_size">{{ _T("Size:") }}</label>
- <input type="text" name="field_size" id="field_size" value="{{ df.getSize() }}" size="3"/>
- {if $df|is_a:'Galette\DynamicFields\File'}
- <span class="exemple">{{ _T("Maximum file size, in Ko.") }}</span>
- {else}
- <span class="exemple">{{ _T("Maximum number of characters.") }}</span>
- {/if}
- </div>
- {% endif %}
- {% if df.isMultiValued() %}
- <div class="inline field">
- <label for="field_repeat">{{ _T("Repeat:") }}</label>
- <input type="text" name="field_repeat" id="field_repeat" value="{{ df.getRepeat() }}" size="3"/>
- <span class="exemple">{{ _T("Number of values or zero if infinite.") }}</span>
- </div>
- {% endif %}
- {% if df.hasFixedValues() %}
- <div class="inline field">
- <label for="fixed_values">{{ _T("Values:") }}</label>
- <textarea name="fixed_values" id="fixed_values" cols="20" rows="6">{{ df.getValues(true) }}</textarea>
- <br/><span class="exemple">{{ _T("Choice list (one entry per line).") }}</span>
- </div>
- {% endif %}
- <div class="field">
- <label for="field_information">{{ _T("Information:") }}</label>
- <textarea name="field_information" id="field_information" cols="20" rows="6">{{ df.getInformation() }}</textarea>
- <span class="tip">{{ _T("Extra information displayed along with dynamic field.") }}</span>
- </div>
- </div>
- </div>
-
- <div class="ui basic center aligned segment">
- <button type="submit" class="ui labeled icon primary button action">
- <i class="save icon"></i> {{ _T("Save") }}
- </button>
- {% include "components/forms/csrf.html.twig" %}
- </div>
- </form>
-{% elseif action == 'add' %}
- <form action="{{ path_for('doAddDynamicField', { 'form_name': form_name }) }}" method="post" enctype="multipart/form-data" title="{{ _T("New dynamic field") }}" class="ui form">
- {% if mode != 'ajax' %}
- <div class="ui top attached header">
- {{ _T("New dynamic field") }}
- </div>
- <div class="ui bottom attached segment">
- <div class="active content field">
- {% else %}
- <div class="cssform">
- {% endif %}
- <div class="inline field">
- <label for="field_name">{{ _T("Field name") }}</label>
- <input size="40" type="text" name="field_name" id="field_name" value="{% if df is defined %}{{ df.getName() }}{% endif %}"/>
- </div>
- <div class="inline field">
- <label for="field_perm">{{ _T("Visibility") }}</label>
- <select name="field_perm" id="field_perm" class="ui dropdown nochosen">
- {% set perm = 0 %}
- {% if df is defined %}
- {% set perm = df.getPerm() %}
- {% endif %}
- {% for key, value in perm_names %}
- <option value="{{ key }}"{% if key == perm %} selected="selected"{% endif %}>{{ value }}</option>
- {% endfor %}
- </select>
- </div>
- <div class="inline field">
- <label for="field_type">{{ _T("Type") }}</label>
- <select name="field_type" id="field_type" class="ui dropdown nochosen">
- {% set type = 0 %}
- {% if df is defined %}
- {% set type = df.getType() %}
- {% endif %}
- {html_options options=$field_type_names selected=$type}
- {% for key, value in field_type_names %}
- <option value="{{ key }}"{% if key == type %} selected="selected"{% endif %}>{{ value }}</option>
- {% endfor %}
- </select>
- </div>
- <div class="inline field">
- <label for="field_required">{{ _T("Required") }}</label>
- <select name="field_required" id="field_required" class="ui dropdown nochosen">
- <option value="0"{% if df is not defined or not df.isRequired() %} selected="selected"{% endif %}>{{ _T("No") }}</option>
- <option value="1"{% if df is defined and df.isRequired() %} selected="selected"{% endif %}>{{ _T("Yes") }}</option>
- </select>
- {% include "components/forms/csrf.html.twig" %}
- </div>
- {% if mode != 'ajax' %}
- </div>
- {% endif %}
- </div>
- <div class="ui basic center aligned segment">
- <button type="submit" name="valid" class="ui labeled icon primary button action">
- <i class="plus icon"></i> {{ _T("Add") }}
- </button>
- <input type="hidden" name="form_name" id="form_name" value="{{ form_name }}"/>
- </div>
- </form>
-{% endif %}
-{% endblock %}
-
-{% block javascripts %}
- <script>
- $('#field_information').summernote({
- lang: '{{ i18n.getID()|replace({ '_': '-'}) }}',
- height: 240,
- toolbar: [
- ['style', ['style']],
- ['font', ['bold', 'italic', 'strikethrough', 'clear']],
- ['para', ['ul', 'ol', 'paragraph']],
- ['insert', ['link', 'picture']],
- ['view', ['codeview', 'help']]
- ],
- styleTags: [
- 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'
- ]
- });
- $('#field_information').summernote('focus');
-
- </script>
-{% endblock %}
{% include 'components/forms/csrf.html.twig' %}
</div>
</form>
- {% include 'elements/replacements_legend.html.twig' with { 'legends': texts.getLegend(), 'cur_ref': cur_ref } %}
+ {% include 'modals/replacements_legend.html.twig' with { 'legends': texts.getLegend(), 'cur_ref': cur_ref } %}
{% endblock %}
{% block javascripts %}
+++ /dev/null
-{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
-
-{% block content %}
- <div id="confirm_removal"{% if mode == 'ajax' %} class="center"{% else %} title="{{ page_title }}"{% endif %}>
- <form action="{{ form_url }}" method="post">
- {% if mode != 'ajax' %}
- <div class="ui segment">
- <div class="content">
- {% if with_cascade is defined %}
- <div class="field inline">
- {% endif %}
- {% endif %}
- {% if with_cascade is defined %}
- <label for="cascade">{{ _T("Cascade delete") }}</label>
- <input type="checkbox" name="cascade" id="cascade" value="true" title="{{ _T("Delete all associated data") }}"/>
- {% endif %}
- {% if mode != 'ajax' %}
- {% if with_cascade is defined %}
- </div>
- {% endif %}
- {% if message is defined %}
- <div class="ui warning message">
- {% endif %}
- {% endif %}
- {% if message is defined %}
- <p>{{ message }}</p>
- {% endif %}
- {% if mode != 'ajax' %}
- {% if message is defined %}
- </div>
- {% endif %}
- <div class="ui red message">
- {% endif %}
- <p>{{ _T("Are you sure you want to proceed?") }}<br/>{{ _T("This can't be undone.") }}</p>
- {% if mode != 'ajax' %}
- </div>
- </div>
- </div>
- <div class="ui basic center aligned segment">
- {% else %}
- <div class="button-container">
- {% endif %}
- <input type="submit" id="delete" value="{{ _T("Remove") }}"{% if mode != 'ajax' %} class="ui primary button action"{% endif %}/>
- <a href="{{ cancel_uri }}" class="{% if mode != 'ajax' %}ui {% endif %}button" id="btncancel">{{ _T("Cancel") }}</a>
- <input type="hidden" name="confirm" value="1"/>
- {% if mode == 'ajax' %}<input type="hidden" name="ajax" value="true"/>{% endif %}
- {% for key, value in data %}
- {% if value is iterable %}
- {% for val in value %}
- <input type="hidden" name="{{ key }}[]" value="{{ val }}"/>
- {% endfor %}
- {% else %}
- <input type="hidden" name="{{ key }}" value="{{ value }}"/>
- {% endif %}
- {% endfor %}
- {% include 'components/forms/csrf.html.twig' %}
- </div>
- </form>
- </div>
-{% endblock %}
-
-{% block javascripts %}
-{% endblock %}
+++ /dev/null
-{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
-
-{% block content %}
-{% if members.list is defined or require_mass %}
- <form action="{% if contribution.id %}{{ path_for("doEditContribution", { "type": type, "id": contribution.id }) }}{% else %}{{ path_for("doAddContribution", { "type": type }) }}{% endif %}" enctype="multipart/form-data" method="post" class="ui form">
- {% if contribution.isTransactionPart() %}
- {assign var="mid" value=$contribution->transaction->member}
- <div class="ui top attached header">
- {{ _T("Related transaction information") }}
- </div>
- <div class="ui bottom attached segment">
- <div class="active content field">
- <table id="transaction_detail" class="listing ui celled table">
- <thead>
- <tr>
- <th colspan="5">
- {{ contribution.transaction.description }}
- <a
- href="{{ path_for("editTransaction", { "id": contribution.transaction.id }) }}"
- class="ui icon button tooltip"
- title="{{ _T("View transaction") }}"
- >
- <i class="columns icon"><span class="sr-only">{{ _T("View transaction") }}</span></i>
- </a>
- </th>
- </tr>
- <tr>
- <th class="listing">#</th>
- <th class="listing">{{ _T("Date") }}</th>
- <th class="listing">{{ _T("Member") }}</th>
- <th class="listing">{{ _T("Amount") }}</th>
- <th class="listing">{{ _T("Not dispatched amount") }}</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{ contribution.transaction.id }}</td>
- <td>{{ contribution.transaction.date }}</td>
- <td>{ memberName id="$mid"}</td>
- <td class="right">{{ contribution.transaction.amount }}</td>
- <td class="right">{{ contribution.transaction.getMissingAmount() }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- {% endif %}
- <div class="ui styled fluid accordion field">
- <div class="active title">
- <i class="icon dropdown"></i>
- {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
- {{ _T("Select contributor and membership fee type") }}
- {% else %}
- {{ _T("Select contributor and donation type") }}
- {% endif %}
- {% if contribution.isTransactionPart() and contribution.transaction.getMissingAmount() > 0 %}
- <a
- href="{{ path_for("addContribution", { "type": constant('Galette\\Entity\\Contribution::TYPE_FEE') }) }}?trans_id={{ contribution.transaction.id }}"
- class="ui icon button fright tooltip"
- title="{{ _T("Create a new fee that will be attached to the current transaction") }}">
- <i class="user check icon"></i>
- <span class="sr-only">{{ _T("New attached fee") }}</span>
- </a>
- <a
- href="{{ path_for("addContribution", { "type": "donation" }) }}?trans_id={{ contribution.transaction.id }}"
- class="ui icon button fright tooltip"
- title="{{ _T("Create a new donation that will be attached to the current transaction") }}">
- <i class="gift icon"></i>
- <span class="sr-only">{{ _T("New attached donation") }}</span>
- </a>
- {% endif %}
- </div>
- {% if not require_mass %}
- <div class="active content field">
- <div class="field inline">
- <label for="id_adh">{{ _T("Contributor:") }}</label>
- <select name="id_adh" id="id_adh" class="nochosen">
- {% if adh_selected == 0 %}
- <option value="">{{ _T("Search for name or ID and pick member") }}</option>
- {% endif %}
- {% for k,v in members.list %}
- <option value="{{ k }}"{% if contribution.member == k %} selected="selected"{% endif %}>{{ v }}</option>
- {% endfor %}
- </select>
- </div>
- {% endif %}
- <div class="field inline">
- <label for="id_type_cotis">{{ _T("Contribution type:") }}</label>
- <select name="id_type_cotis" id="id_type_cotis" class="ui dropdown nochosen"{% if required.id_type_cotis == 1 %} required="required"{% endif %}>
- {% if contribution.type %}
- {% set selectedid = contribution.type.id %}
- {% else %}
- {% set selectedid = null %}
- {% endif %}
- {html_options options=$type_cotis_options selected=$selectedid}
- {% for key, value in type_cotis_options %}
- <option value="{{ key }}"{% if key == selectedid %} selected="selected"{% endif %}>{{ value }}</option>
- {% endfor %}
- </select>
- </div>
- {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
- <noscript>
- <div class="button-container" id="reloadcont">
- <input type="submit" id="btnreload" name="btnreload" value="{{ _T("Reload") }}" title="{{ _T("Reload date information according to selected member and contribution type") }}" class="ui button"/>
- </div>
- </noscript>
- {% endif %}
- </div>
- </div>
-
- <div class="ui styled fluid accordion field">
- <div class="active title">
- <i class="icon dropdown"></i>
- {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
- {{ _T("Details of membership fee") }}
- {% else %}
- {{ _T("Details of donation") }}
- {% endif %}
- </div>
- <div class="active content field">
- <div class="field inline">
- <label for="montant_cotis">{{ _T("Amount:") }}</label>
- <input type="text" name="montant_cotis" id="montant_cotis" value="{{ contribution.amount }}" maxlength="10"{% if required.montant_cotis == 1 %} required="required"{% endif %}/>
- </div>
- {# payment type #}
- {% set ptype = contribution.payment_type %}
- {% if ptype == null %}
- {% set ptype = constant('Galette\\Entity\\PaymentType::CHECK') %}
- {% endif %}
- {% include 'components/forms/payment_types.html.twig' with { 'current': ptype, 'varname': 'type_paiement_cotis', 'show_inline': true } %}
- <div class="field inline">
- <label for="date_enreg">
- {{ _T("Record date:") }}
- </label>
- <div class="ui calendar" id="contribution-rangestart">
- <div class="ui input left icon">
- <i class="calendar icon"></i>
- <input type="text" name="date_enreg" id="date_enreg" value="{{ contribution.date }}" maxlength="10"{% if required.date_enreg == 1 %} required="required"{% endif %}>
- </div>
- </div>
- <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
- </div>
- <div class="field inline">
- <label for="date_debut_cotis">
- {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
- {{ _T("Start date of membership:") }}
- {% else %}
- {{ _T("Date of contribution:") }}
- {% endif %}
- </label>
- <div class="ui calendar" id="contribution-rangeend">
- <div class="ui input left icon">
- <i class="calendar icon"></i>
- <input type="text" name="date_debut_cotis" id="date_debut_cotis" value="{{ contribution.begin_date }}" maxlength="10"{% if required.date_debut_cotis == 1 %} required="required"{% endif %}/>
- </div>
- </div>
- <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
- </div>
- {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') %}
- <div class="field inline">
- {% if preferences.pref_membership_ext != "" %}
- <label for="duree_mois_cotis">{{ _T("Membership extension:") }}</label>
- <input type="text" name="duree_mois_cotis" id="duree_mois_cotis" value="{{ contribution.duration }}" maxlength="3"{% if required.date_fin_cotis == 1%} required="required"{% endif %}/>
- <span class="exemple">{{ _T("months") }}</span>
- {% else %}
- <label for="date_fin_cotis">{{ _T("End date of membership:") }}</label>
- <input type="text" name="date_fin_cotis" id="date_fin_cotis" value="{{ contribution.end_date }}" maxlength="10"{% if required.date_fin_cotis == 1 %} required="required"{% endif %}/>
- <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
- {% endif %}
- </div>
- {% endif %}
- <div class="field inline">
- <label for="info_cotis">{{ _T("Comments:") }}</label>
- <textarea name="info_cotis" id="info_cotis" cols="61" rows="6"{% if required.info_cotis is defined and required.info_cotis == 1 %} required="required"{% endif %}>{{ contribution.info }}</textarea>
- </div>
- </div>
- </div>
-
- {% if contribution.isTransactionPart() and contribution.transaction.getMissingAmount() %}
- <div class="ui styled fluid accordion field">
- <div class="active title">
- <i class="icon dropdown"></i>
- {{ _T("Transaction related") }}
- </div>
- <div class="active content field">
- <p>
- <span class="bline tooltip" title="{{ _T("Select a contribution type to create for dispatch transaction") }}">{{ _T("Dispatch type:") }}</span>
- <span class="tip">{{ _T("Select a contribution type to create for dispatch transaction") }}</span>
- <input type="radio" name="contrib_type" id="contrib_type_fee" value="{{ constant('Galette\\Entity\\Contribution::TYPE_FEE') }}" checked="checked"/> <label for="contrib_type_fee">{{ _T("Membership fee") }}</label>
- <input type="radio" name="contrib_type" id="contrib_type_donation" value="donation"/> <label for="contrib_type_donation">{{ _T("Donation") }}</label>
- </p>
- </div>
- </div>
- {% endif %}
- {% include 'components/dynamic_fields.html.twig' with { 'object': contribution } %}
- {% if not contribution.id and preferences.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_DISABLED') %}
- {% if not require_mass %}
- <div class="ui center aligned segment">
- <div class="inline field">
- <div class="ui toggle checkbox">
- <input type="checkbox" name="mail_confirm" id="mail_confirm" value="1" {if isset($smarty.post.mail_confirm) and $smarty.post.mail_confirm != ""}checked="checked"{/if}/>
- <label for="mail_confirm">
- {{ _T("Notify member") }}
- </label>
- <br/>
- <span class="exemple">
- {{ _T("Member will receive a notification by email, if he has an address.") }}
- </span>
- </div>
- </div>
- </div>
- {% endif %}
- {% endif %}
- {% if not require_mass %}
- <div class="ui basic center aligned segment">
- <button type="submit" name="valid" class="ui labeled icon primary button action">
- <i class="save icon"></i> {{ _T("Save") }}
- </button>
- <input type="hidden" name="id_cotis" value="{{ contribution.id }}"/>
- <input type="hidden" name="valid" value="1"/>
- <input type="hidden" name="trans_id" value="{% if contribution.transaction != NULL %}{{ contribution.transaction.id }}{% endif %}"/>
- </div>
- {% endif %}
- {% include "components/forms/csrf.html.twig" %}
- </form>
-{% else %} {# No members #}
- <div class="ui warning message" id="warningbox">
- <h3>{{ _T("No member registered!") }}</h3>
- <p>
- {{ _T("Unfortunately, there is no member in your database yet,") }}
- <br/>
- <a href="{{ path_for("addMember") }}">{{ _T("please create a member") }}</a>
- </p>
- </div>
-{% endif %}
-{% endblock %}
-
-{% block javascripts %}
-<script type="text/javascript">
- {% include "elements/js/choose_adh.js.twig" %}
-
- $(function() {
- /*$('#date_debut_cotis, #date_fin_cotis, #date_enreg').datepicker({
- changeMonth: true,
- changeYear: true,
- showOn: 'button',
- buttonText: '<i class="ui calendar alt icon"></i> <span class="sr-only">{{ _T("Select a date")|e("js") }}</span>'
- });*/
-
- {% if type == constant('Galette\\Entity\\Contribution::TYPE_FEE') and not contribution.id %}
- $('#id_adh, #id_type_cotis').on('change', function() {
- var _this = $(this);
- var _member = $('#id_adh').val();
- var _fee = $('#id_type_cotis').val();
-
- $.ajax({
- type: 'POST',
- dataType: 'json',
- url : '{{ path_for ("contributionDates") }}',
- data: {
- member_id: _member,
- fee_id: _fee
- },
- {% include "elements/js/loader.js.twig" %},
- success: function(res){
- $('#date_debut_cotis').val(res.date_debut_cotis);
- $('#date_fin_cotis').val(res.date_fin_cotis);
- },
- error: function() {
- alert("{{ _T("An error occurred retrieving dates :(")|e("js") }}");
- }
- });
-
- });
- {% endif %}
-
- {% if contribution.isTransactionPart() and contribution.transaction.getMissingAmount() %}
- $('#transaction_related').hide();
- $('#montant_cotis').on('keyup', function() {
- var _amount = {{ contribution.transaction.getMissingAmount() }};
- var _current = $(this).val();
- if (_current < _amount) {
- $('#transaction_related').show();
- } else if (_current > _amount) {
- alert('{{ _T("Contribution amount should be greater than %max")|replace({ '%max': contribution.transaction.getMissingAmount() })|e("js") }}');
- } else {
- $('#transaction_related').hide();
- }
- });
- {% endif %}
- });
-</script>
-{% endblock %}
-{% if mode == 'ajax' %}
- {% set extend = 'ajax.html.twig' %}
-{% else %}
- {% set extend = 'page.html.twig' %}
-{% endif %}
-{% extends extend %}
+{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
+
{% block content %}
<form action="{{ path_for("payments_filter", { "type": "contributions" }) }}" method="post" id="filtre" class="ui form">
<div class="ui segment">
+++ /dev/null
-{% extends (ajax) ? "ajax.html.twig" : "page.html.twig" %}
-
-{% block content %}
- <form action="{{ path_for('attendance_sheet') }}" id="sheet_details_form" method="POST" class="ui form">
- <div class="ui top attached header">
- {{ _T("Some details about your attendance sheet...") }} - <span>{{ _T("%s attendees")|replace({ '%s': selection|length }) }}</span>
- </div>
- <div class="ui bottom attached segment">
- <div class="active content field">
- <div class="inline field">
- <label for="sheet_type">{{ _T("Sheet type") }}</label>
- <input type="text" name="sheet_type" id="sheet_type" value="{{ _T("Attendance sheet") }}" required/>
- </div>
- <div class="inline field">
- <label for="sheet_title">{{ _T("Title") }}</label>
- <input type="text" name="sheet_title" id="sheet_title"/>
- </div>
- <div class="inline field">
- <label for="sheet_sub_title">{{ _T("Subtitle") }}</label>
- <input type="text" name="sheet_sub_title" id="sheet_sub_title"/>
- </div>
- <div class="inline field">
- <label for="sheet_date">{{ _T("Date") }}</label>
- <input type="text" name="sheet_date" id="sheet_date"/>
- <span class="exemple">{{ _T("(yyyy-mm-dd format)") }}</span>
- </div>
- <div class="inline field">
- <label for="sheet_photos">{{ _T("With photos?") }}</label>
- <input type="checkbox" name="sheet_photos" id="sheet_photos" value="1"/>
-{% for member in selection %}
- <input type="hidden" name="selection[]" value="{{ member }}"/>
-{% endfor %}
- {% include 'components/forms/csrf.html.twig' %}
- </div>
- </div>
- </div>
-{% if not ajax %}
- <div class="ui basic center aligned segment">
- <button type="submit" class="ui labeled icon primary button">
- <i class="file pdf icon" aria-hidden="true"></i>
- {{ _T("Generate") }}
- </button>
- </div>
-{% endif %}
-
- </form>
-{% endblock %}
+++ /dev/null
-{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
-
-{% block content %}
-<section id="plugin_install">
- <header>
- <h1>{{ _T("%plugin plugin installation")|replace({ '%plugin': plugin.name }) }}</h1>
- </header>
- <div>
- <form action="{{ path_for('pluginInitDb', { 'id': plugid }) }}" id="plugins_initdb_form" method="post">
- <h2>{{ page_title }}</h2>
-{% if mode == 'ajax' %}
- {% include 'elements/messages_inline.html.twig' %}
-{% endif %}
-
-
-
-{% if step == 1 %}
- <div id="installation_mode">
- <article id="mode_new" class="installation_mode">
- <h3>
- <input type="radio" name="install_type" value="{{ constant('Galette\\Core\\PluginInstall::INSTALL') }}" checked="checked" id="install"/>
- <label for="install">{{ _T("New installation") }}</label>
- </h3>
- <ul>
- <li>{{ _T("you're installing %name for the first time")|replace({ '%name': plugin.name }) }},</li>
- <li>{{ _T("you wish to erase an older version of of %name without keeping your data")|replace({ '%name': plugin.name }) }}.</li>
- </ul>
- </article>
- {% if update_scripts is defined and update_scripts|length > 0 %}
- <article id="mode_update" class="installation_mode">
- <h3>
- <input type="radio" name="install_type" value="{{ constant('Galette\\Core\\PluginInstall::UPDATE') }}" id="update"/>
- <label for="update">{{ _T("Update") }}</label>
- </h3>
- <ul>
- <li>{{ _T("you already have installed %name, and you want to upgrade to the latest version")|replace({ '%name': plugin.name }) }}.</li>
- </ul>
- <p id="warningbox">{{ _T("Warning: Don't forget to backup your current database.") }}</span>
- </article>
- {% endif %}
- </div>
-{% endif %}
-{% if step == 'i2' or step == 'u2' %}
- {{ results }}
-{% endif %}
-{% if step == 'u3' %}
- <fieldset class="cssform">
- <legend class="ui-state-active ui-corner-top">{{ _T("You current %name version is...")|replace({ '%name': plugin.name }) }}</legend>
- <ul class="leaders">
- {% set last = 0.00 %}
- {% for k, val in update_scripts %}
- <li>
- <span>
- <label for="upgrade-{{ val }}">
-
- {% if last == 0.00 %}
- {{ _T("older than %version")|replace({ '%version': val }) }}
- {% elseif last != val %}
- {{ _T("comprised between") }} {{ last }} {{ _T("and") }} {{ val }}
- {% else %}
- {{ val }}
- {% endif %}
- {% set last = val %}
- </label>
- </span>
- <span>
- <input type="radio" name="previous_version" value="{{ val }}" id="upgrade-{{ val }}" required/>
- </span>
- </li>
- {% endfor %}
- </ul>
- </fieldset>
-{% endif %}
-{% if step == 'i4' or step == 'u4' %}
- <p>{{ _T("(Errors on DROP and RENAME operations can be ignored)") }}</p>
- {% if error_detected|length > 0 %}
- <p id="errorbox">
- {% if step == 'i3' %}
- {{ _T("The tables are not totally created, it may be a permission problem.") }}
- {% else %}
- {{ _T("The tables have not been totally created, it may be a permission problem.") }}
- <br/>
- {{ _T("Your database is maybe not usable, try to restore the older version.") }}
- {% endif %}
- </p>
- {% endif %}
-{% endif %}
-{% if step == 'i5' or step =='u5' %}
- <p>
- {% if step == 'i5' %}
- {{ _T("Plugin '%name' has been successfully installed!")|replace({ '%name': plugin.name }) }}
- {% else %}
- {{ _T("Plugin '%name' has been successfully updated!")|replace({ '%name': plugin.name }) }}
- {% endif %}
- </p>
-{% endif %}
-{% if istep < 5 %}
- <p id="btn_box">
- <input type="hidden" name="plugid" value="{{ plugid }}"/>
- {% if istep > 1 and install_type is defined %}
- <input type="hidden" name="install_type" value="{{ install_type }}"/>
- {% endif %}
- {% if error_detected|length == 0 and istep >= 2 or istep > 2 %}
- <input type="hidden" name="install_dbperms_ok" value="1"/>
- {% endif %}
- {% if error_detected|length == 0 and istep >= 4 or istep > 4 %}
- <input type="hidden" name="install_dbwrite_ok" value="1"/>
- {% endif %}
- {% if error_detected|length > 0 %}
- <input type="submit" value="{{ _T("Retry") }}"/>
- {% else %}
- <button id="next" type="ui labeled icon button submit">{{ _T("Next step") }} <i class="forward icon"></i></button>
- {% endif %}
-{% else %}
- {% if mode == 'ajax' %}
- <a href="#" class="ui button" id="btnback">{{ _T("Close") }}</a>
- {% else %}
- <a href="{{ path_for('plugins') }}" class="ui labeled icon button" id="btnback"><i class="backward icon"></i> {{ _T("Back to plugins managment page") }}</a>
- {% endif %}
-{% endif %}
- {% include 'components/forms/csrf.html.twig' %}
- </p>
- </form>
- </div>
- <footer>
- <p>{{ _T("Steps:") }}</p>
- <ol>
- <li{% if step == 1 %} class="current"{% endif %}>{{ _T("Installation mode") }} - </li>
- <li{% if step == 'i2' or step == 'u2' %} class="current"{% endif %}>{{ _T("Access permissions to database") }} - </li>
- {% if install_type is defined and install_type == 'upgrade' %}
- <li{% if step == 'u3' %} class="current"{% endif %}>{{ _T("Version selection") }} - </li>
- </li>
- {% endif %}
- <li{% if step == 'i4' or step == 'u4' %} class="current"{% endif %}>{% if install_type is not defined or install_type == 'install' %}{{ _T("Database installation") }}{% else %}{{ _T("Database upgrade") }}{% endif %} - </li>
- <li{% if step == 'i5' or step == 'u5' %} class="current"{% endif %}>{{ _T("End!") }}</li>
- </ol>
- </footer>
-</section>
-{% endblock %}
{% else %}
var _initdb_dialog = function(res, _plugin){
var _title = '{{ _T("Plugin database initialization: %name")|e('js') }}';
- var _el = $('<div id="initdb" title="' + _title.replace('%name', _plugin) + '"> </div>');
- _el.appendTo('body').dialog({
- modal: true,
- hide: 'fold',
- width: '80%',
- height: 500,
- create: function (event, ui) {
- if ($(window ).width() < 767) {
- $(this).dialog('option', {
- 'width': '95%',
- 'draggable': false
- });
- }
- },
- close: function(event, ui){
- _el.remove();
- }
- });
+ $('body').modal({
+ title: _title.replace('%name', _plugin),
+ class: 'initdb-modal large coupled',
+ classContent: 'scrolling',
+ content: res,
+ actions: [{
+ text : '{{ _T("Cancel")|e('js') }}',
+ class : 'red cancel',
+ icon : 'times'
+ }]
+ }).modal('show');
_initdb_bindings(res);
};
var _initdb_bindings = function(res){
- $('#initdb').empty().append(res);
- $('#initdb input:submit, #initdb .button, #initdb input:reset' ).button();
+ //$('.initdb-modal' ).empty().append(res);
+ $('.initdb-modal input:submit, .initdb-modal .button, .initdb-modal input:reset' ).button();
_messagesEffects();
- $('#btnback').click(function(){
- $('#initdb').dialog('close');
- });
+ //$('#btnback').click(function(){
+ // $('#initdb').dialog('close');
+ //});
$("#plugins_initdb_form").submit(function(event) {
/* stop form from submitting normally */
event.preventDefault();
</form>
{% include "modals/telemetry.html.twig" with { part: "dialog" } %}
- {% include "elements/replacements_legend.html.twig" with { legends: preferences.getLegend(), cur_ref: 'prefs' } %}
+ {% include "modals/replacements_legend.html.twig" with { legends: preferences.getLegend(), cur_ref: 'prefs' } %}
{% endblock %}
{% block javascripts %}