### English
-[![Download most recent Galette release (1.0.1)](https://img.shields.io/badge/1.0.1-Latest_Galette-ffb619.svg?logo=php&logoColor=white&style=for-the-badge)](https://download.tuxfamily.org/galette/galette-1.0.1.tar.bz2)
+[![Download most recent Galette release (1.0.2)](https://img.shields.io/badge/1.0.2-Latest_Galette-ffb619.svg?logo=php&logoColor=white&style=for-the-badge)](https://download.tuxfamily.org/galette/galette-1.0.2.tar.bz2)
[![Download Galette development (nightly) build](https://img.shields.io/badge/nightly-Galette_development-ffb619.svg?logo=php&logoColor=white&style=for-the-badge)](https://download.tuxfamily.org/galette/galette-dev.tar.bz2)
Galette is a membership management web application towards non profit organizations; released under GPLv3.
### Français
-[![Télécharger la version de Galette la plus récente (1.0.1)](https://img.shields.io/badge/1.0.1-Dernière_Galette-ffb619.svg?logo=php&logoColor=white&style=for-the-badge)](https://download.tuxfamily.org/galette/galette-1.0.1.tar.bz2)
+[![Télécharger la version de Galette la plus récente (1.0.2)](https://img.shields.io/badge/1.0.2-Dernière_Galette-ffb619.svg?logo=php&logoColor=white&style=for-the-badge)](https://download.tuxfamily.org/galette/galette-1.0.2.tar.bz2)
[![Télécharger la version de développement (nighly) de Galette](https://img.shields.io/badge/nightly-Galette_développement-ffb619.svg?logo=php&logoColor=white&style=for-the-badge)](https://download.tuxfamily.org/galette/galette-dev.tar.bz2)
Galette est un outil de gestion d’adhérents et de cotisations en ligne à destination des associations, sous license GPLV3.
last = None
for tagref in tagrefs:
tag = tagref.tag
- if valid_version(tag.tag):
+ if tag != None and valid_version(tag.tag):
#last minor version is always the last one :)
if last == None or tag.tag > last:
last = tag.tag
Changes
-------
+1.0.1 -> 1.0.2
+
+- Public pages access restriction (CVE-2024-24761)
+- Remove useless class from templates and fix social networks search dropdown
+- Ensure language is changed when login from cron; closes #1769
+- Make replacements icon in PDF Model more visible
+- Fix possible issue on group creation
+- Fix URL redirection
+
1.0.0 -> 1.0.1
- Title in members list causes an error
}
define('GALETTE_NIGHTLY', false);
-define('GALETTE_VERSION', 'v1.0.1');
+define('GALETTE_VERSION', 'v1.0.2');
//Version to display
if (!defined('GALETTE_HIDE_VERSION')) {
*/
$authenticate = new Authenticate($container);
-/**
- * Show public pages middleware
- *
- * @param $request
- * @param $response
- * @param $next
- * @return mixed
- */
-$showPublicPages = function (Request $request, RequestHandler $handler) use ($container) {
- $response = $handler->handle($request);
- $login = $container->get('login');
- $preferences = $container->get('preferences');
-
- if (!$preferences->showPublicPages($login)) {
- $this->get('flash')->addMessage('error', _T("Unauthorized"));
-
- return $response
- ->withStatus(403)
- ->withHeader(
- 'Location',
- $this->get(RouteParser::class)->urlFor('slash')
- );
- }
-
- return $response;
-};
+//FIXME: remove in 1.1.0; routes/groups should call middleware directly
+$showPublicPages = new \Galette\Middleware\PublicPages($container);
//Maintenance middleware
if (Galette::MODE_MAINT === GALETTE_MODE && !$container->get('login')->isSuperAdmin()) {
->withHeader('Location', $routeparser->urlFor('publicList', $args));
}
);
-})->add($showPublicPages);
+})->add(\Galette\Middleware\PublicPages::class);
if ($this->login->isLogged()) {
$urlRedirect = null;
if ($this->session->urlRedirect !== null) {
- $urlRedirect = $this->getGaletteBaseUrl($request) . $this->session->urlRedirect;
+ $urlRedirect = $this->session->urlRedirect;
$this->session->urlRedirect = null;
}
}
}
- /**
- * Get base URL fixed for proxies
- *
- * @param Request $request PSR Request
- *
- * @return string
- */
- private function getGaletteBaseUrl(Request $request)
- {
- $routeContext = RouteContext::fromRequest($request);
-
- $url = preg_replace(
- [
- '|index\.php|',
- '|https?://' . $_SERVER['HTTP_HOST'] . '(:\d+)?' . '|'
- ],
- ['', ''],
- $routeContext->getBasePath()
- );
- if (strlen($url) && substr($url, -1) !== '/') {
- $url .= '/';
- }
- return $url;
- }
-
/**
* Get route arguments
* php-di bridge pass each variable, not an array of all arguments
if (isset($post['managers'])) {
$managers_id = $post['managers'];
$managers = $m->getArrayList($managers_id);
- $group->setManagers($managers);
+ if (is_array($managers)) {
+ $group->setManagers($managers);
+ }
}
//handle group members
if (isset($post['members'])) {
$members_id = $post['members'];
$members = $m->getArrayList($members_id);
- $group->setMembers($members);
+ if (is_array($members)) {
+ $group->setMembers($members);
+ }
}
$store = $group->store();
* @param string $name Service name
* @param Preferences $preferences Preferences instance
*
- * @return void
+ * @return bool
*/
- public function logCron($name, Preferences $preferences)
- {
- //known cronable files
- $ok = array('reminder');
-
- if (in_array($name, $ok)) {
- $this->logged = true;
- $this->cron = true;
- $this->login = 'cron';
- $this->lang = $preferences->pref_lang;
- } else {
- trigger_error('Not authorized!', E_USER_ERROR);
- }
- }
+ abstract public function logCron(string $name, Preferences $preferences): bool;
/**
* Log out user and unset variables
$this->impersonated = false;
}
+ /**
+ * Authenticate from cron
+ *
+ * @param string $name Service name
+ * @param Preferences $preferences Preferences instance
+ *
+ * @return bool
+ */
+ public function logCron(string $name, Preferences $preferences): bool
+ {
+ //known cronable files
+ $ok = array('reminder');
+
+ if (in_array($name, $ok)) {
+ $this->logged = true;
+ $this->cron = true;
+ $this->login = 'cron';
+ $this->name = 'cron';
+ $this->lang = $preferences->pref_lang;
+ $this->i18n->changeLanguage($this->lang);
+ return true;
+ } else {
+ trigger_error('Not authorized!', E_USER_ERROR);
+ }
+ }
+
/**
* Log out user and unset variables
*
--- /dev/null
+<?php
+
+/**
+ * Copyright © 2003-2024 The Galette Team
+ *
+ * This file is part of Galette (https://galette.eu).
+ *
+ * Galette is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Galette is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Galette. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Core
+ * @package Galette
+ *
+ * @author Johan Cwiklinski <johan@x-tnd.be>
+ * @copyright 2024 The Galette Team
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
+ * @link https://galette.eu
+ */
+
+namespace Galette\Middleware;
+
+use Galette\Core\Login;
+use Galette\Core\Preferences;
+use Psr\Http\Message\ServerRequestInterface as Request;
+use Psr\Http\Message\ResponseInterface as Response;
+use Psr\Http\Server\RequestHandlerInterface as RequestHandler;
+use Analog\Analog;
+use DI\Container;
+use RKA\Session;
+use Slim\Flash\Messages;
+use Slim\Routing\RouteContext;
+use Slim\Routing\RouteParser;
+
+/**
+ * Galette Slim middleware for public pages access
+ *
+ * @category Core
+ * @package Galette
+ *
+ * @author Johan Cwiklinski <johan@x-tnd.be>
+ * @copyright 2024 The Galette Team
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
+ * @link https://galette.eu
+ */
+class PublicPages
+{
+ /**
+ * @var Messages
+ */
+ protected Messages $flash;
+
+ /**
+ * @var Login
+ */
+ private Login $login;
+
+ /**
+ * @var RouteParser
+ */
+ private RouteParser $routeparser;
+
+ /**
+ * @var Preferences
+ */
+ private Preferences $preferences;
+
+ /**
+ * Constructor
+ *
+ * @param Container $container Container instance
+ */
+ public function __construct(Container $container)
+ {
+ $this->login = $container->get('login');
+ $this->flash = $container->get('flash');
+ $this->routeparser = $container->get(RouteParser::class);
+ $this->preferences = $container->get('preferences');
+ }
+
+ /**
+ * Middleware invokable class
+ *
+ * @param Request $request PSR7 request
+ * @param RequestHandler $handler PSR7 request handler
+ *
+ * @return Response
+ */
+ public function __invoke(Request $request, RequestHandler $handler): Response
+ {
+ $response = new \Slim\Psr7\Response();
+
+ if (!$this->preferences->showPublicPages($this->login)) {
+ $this->flash->addMessage('error_detected', _T("Unauthorized"));
+ return $response
+ ->withHeader(
+ 'Location',
+ $this->routeparser->urlFor('slash')
+ )->withStatus(302);
+ }
+
+ return $handler->handle($request);
+ }
+}
{% extends "components/forms/select.html.twig" %}
{% block element %}
- <select name="activite_adh" id="activite_adh" class="ui dropdown nochosen"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required is defined and required == 1 %} required="required"{% endif %}>
+ <select name="activite_adh" id="activite_adh" class="ui dropdown"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required is defined and required == 1 %} required="required"{% endif %}>
<option value="1" {% if member.isActive() == 1 %}selected="selected"{% endif %}>{{ _T("Active") }}</option>
<option value="0" {% if member.isActive() == 0 %}selected="selected"{% endif %}>{{ _T("Inactive") }}</option>
</select>
{% extends "components/forms/select.html.twig" %}
{% block element %}
- <select name="pref_lang" id="pref_lang" class="ui dropdown nochosen lang"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required.pref_lang is defined and required.pref_lang == 1 %} required="required"{% endif %}>
+ <select name="pref_lang" id="pref_lang" class="ui dropdown lang"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required.pref_lang is defined and required.pref_lang == 1 %} required="required"{% endif %}>
{% for langue in languages %}
<option value="{{ langue.getID() }}"{% if member.language == langue.getID() %} selected="selected"{% endif %}>{{ langue.getName() }}</option>
{% endfor %}
<div class="field">
{% endif %}
<label for="{{ varname }}">{% if label is defined %}{{ label }}{% else %}{{ _T("Payment type:") }}{% endif %}</label>
- <select name="{{ varname }}" id="{{ varname }}" class="ui search dropdown nochosen">
+ <select name="{{ varname }}" id="{{ varname }}" class="ui search dropdown">
{% if empty is defined %}
<option value="{{ empty.value }}">{{ empty.label }}</option>
{% endif %}
<div id="crop_focus_field" class="extra ui basic fitted segment displaynone">
<div class="inline field">
<label for="crop_focus">{{ _T("Cropping focus") }}</label>
- <select name="crop_focus" id="crop_focus" class="ui dropdown nochosen">
+ <select name="crop_focus" id="crop_focus" class="ui dropdown">
<option value="center">{{ _T("Center") }}</option>
<option value="top">{{ _T("Top") }}</option>
<option value="bottom">{{ _T("Bottom") }}</option>
id="{{ id }}"
{% if required is defined and required == true %} required="required"{% endif %}
{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}
- class="ui search dropdown nochosen"
+ class="ui search dropdown"
>
{% for option_value, option_label in values %}
<option
{% extends "components/forms/select.html.twig" %}
{% block element %}
- <select name="id_statut" id="id_statut" class="ui dropdown nochosen"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required.id_statut is defined and required.id_statut == 1 %} required="required"{% endif %}>
+ <select name="id_statut" id="id_statut" class="ui dropdown"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required.id_statut is defined and required.id_statut == 1 %} required="required"{% endif %}>
{% for key, value in statuts %}
<option value="{{ key }}"{% if key == member.status %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
{% block element %}
{% set values = "" %}
- <select name="titre_adh" id="titre_adh" class="ui dropdown nochosen"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required is defined and required == true %} required="required"{% endif %}>
+ <select name="titre_adh" id="titre_adh" class="ui dropdown"{% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}{% if required is defined and required == true %} required="required"{% endif %}>
<option value="{% if required is defined and required == true %}-1{% endif %}">{{ _T("Not supplied") }}</option>
{% for title in titles_list %}
<option value="{{ title.id }}"{% if member.title != null and member.title.id == title.id %} selected="selected"{% endif %}>{{ title.long }}</option>
</td>
<td class="left" data-col-label="{% if class == 'ContributionsTypes' %}{{ _T("Extends membership?") }}{% else %}{{ _T("Priority") }}{% endif %}">
{% if class == 'ContributionsTypes' %}
- <select name="{{ fields.third }}" class="ui dropdown nochosen">
+ <select name="{{ fields.third }}" class="ui dropdown">
<option value="0" selected="selected">{{ _T("No") }}</option>
<option value="1">{{ _T("Yes") }}</option>
</select>
{% if model.id > 4 %}
<div class="field">
<label for="type_{{ model.id }}">{{ _T("Type") }}</label>
- <select name="model_type" id="type_{{ model.id }}" class="ui dropdown nochosen" required>
+ <select name="model_type" id="type_{{ model.id }}" class="ui dropdown" required>
<option value="">{{ _T("Select") }}</option>
<option value="{{ constant('Galette\\Entity\\PdfModel::INVOICE_MODEL') }}">{{ _T("Invoice") }}</option>
<option value="{{ constant('Galette\\Entity\\PdfModel::RECEIPT_MODEL') }}">{{ _T("Receipt") }}</option>
<label>{{ _T("Add new social network") }}</label>
<div class="combo-social fields">
<div class="field">
- <select name="social_new_type_1" id="social_new_type_1" class="socials_dropdown ui search dropdown nochosen">
- <option value="">{{ _T("Choose or enter your own...") }}</option>
+ <div id="social_new_type_1" class="jsonly search-dropdown socials-dropdown ui input">
+ <input id="social_new_type_input_1" type="hidden" name="social_new_type_1" value="">
+ <i class="jsonly displaynone dropdown icon" aria-hidden="true"></i>
+ <div class="jsonly displaynone default text">{{ _T("Choose or enter your own...") }}</div>
+ <div class="jsonly displaynone menu">
{% for social_type in osocials.getSystemTypes(false) %}
- <option value="{{ social_type }}">{{ osocials.getSystemType(social_type) }}</option>
+ <div class="item" data-value="{{ social_type }}">{{ osocials.getSystemType(social_type) }}</div>
{% endfor %}
- </select>
+ </div>
+ </div>
</div>
<div class="field">
- <input type="text" name="social_new_value_1" id="social_new_value_1" value="" size="50"/>
+ <input type="text" name="social_new_value_1" id="social_new_value_1" value="" size="50" class="value"/>
</div>
</div>
<a href="#" class="ui tiny green labeled icon button action addsocial">
{{ _T("Add") }}
</a>
</div>
- <script type="text/javascript">
- var _dropdown = function(selector) {
- if ( !selector ) {
- selector = '.socials_dropdown';
- }
-
- $(selector).dropdown({
- allowAdditions: true
- });
- }
-
- var _rmFilter = function(elt) {
- if ( typeof elt == 'undefined') {
- elt = $('#social .stored');
- }
- elt.find('.delsocial').click(function(e){
- e.preventDefault();
- var _this = $(this);
- _this.parents('.field.stored').remove();
- });
- }
-
- $(function(){
- _rmFilter();
- _dropdown();
-
- $('a.addsocial').click(function(e) {
- e.preventDefault();
-
- var _newindex = $(this).parents('.addsocial').find('.combo-social:last select').attr('id').replace('social_new_type_', '');
- ++_newindex;
- $(this).parents('.addsocial').find ('.combo-social:last')
- .clone() // copy
- .insertAfter('#social .combo-social:last') // where
- .find('select').attr('id', 'social_new_type_' + _newindex).attr('name', 'social_new_type_' + _newindex)
- .parent().parent().parent().find('input').attr('id', 'social_new_value_' + _newindex).attr('name', 'social_new_value_' + _newindex)
- ;
-
- _dropdown();
- });
- });
- </script>
{% endblock %}
</div>
{% else %}
{{ pgroup.getName() }}
<input type="hidden" name="parent_group" value="{{ pgroup.getId() }}"/>
{% else %}
- <div class="ui search compact selection dropdown nochosen">
+ <div class="ui search compact selection dropdown">
<input type="hidden" name="parent_group" id="parent_group" value="{% if pgroup is defined %}{{ pgroup.getId() }}{% endif %}">
<i class="dropdown icon" aria-hidden="true"></i>
<div class="text">{% if pgroup is defined %}{{ pgroup.getName() }}{% endif %}</div>
--- /dev/null
+var _dropdownSocials = function() {
+ $('.socials-dropdown').dropdown({
+ allowAdditions: true,
+ onNoResults: function(searchValue) {
+ $(this).dropdown('set value', searchValue);
+ }
+ });
+}
+
+var _rmSocial = function(elt) {
+ if ( typeof elt == 'undefined') {
+ elt = $('#social .stored');
+ }
+ elt.find('.delsocial').click(function(e){
+ e.preventDefault();
+ var _this = $(this);
+ _this.parents('.field.stored').remove();
+ });
+}
+
+$(function(){
+ _rmSocial();
+ _dropdownSocials();
+
+ $('a.addsocial').click(function(e) {
+ e.preventDefault();
+
+ var _newindex = $(this).parents('.addsocial').find('.combo-social:last .socials-dropdown').attr('id').replace('social_new_type_', '');
+ ++_newindex;
+ $(this).parents('.addsocial').find ('.combo-social:last')
+ .clone() // copy
+ .insertAfter('#social .combo-social:last') // where
+ .find('.socials-dropdown').attr('id', 'social_new_type_' + _newindex).dropdown('clear')
+ .find('input:not(.search)').attr('id', 'social_new_type_input_' + _newindex).attr('name', 'social_new_type_' + _newindex)
+ .parent().parent().parent().find('input.value').attr('id', 'social_new_value_' + _newindex).attr('name', 'social_new_value_' + _newindex).val('')
+ ;
+
+ _dropdownSocials();
+ });
+});
var cropping = { ratio: '{{ preferences.pref_member_picture_ratio }}' };
var focus_select = '<div class="ui basic horizontally fitted segment form"><div class="field">';
- focus_select += '<select name="crop_focus_ajax" id="crop_focus_ajax" class="ui dropdown nochosen">';
+ focus_select += '<select name="crop_focus_ajax" id="crop_focus_ajax" class="ui dropdown">';
focus_select += '<option value="center">{{ _T("Center") }}</option>';
focus_select += '<option value="top">{{ _T("Top") }}</option>';
focus_select += '<option value="bottom">{{ _T("Bottom") }}</option>';
<script type="text/javascript">
var _addLegendButton = function(selector) {
- $(selector).append('<a class="btnlegend"><i class="circular inverted primary link icon info tooltip" aria-hidden="true"></i> <span class="ui special popup">{{ _T("Show existing variables")|e('js') }}</span></a>');
+ $(selector).append('<i class="btnlegend circular inverted primary link icon info tooltip" aria-hidden="true"></i> <span class="ui special popup">{{ _T("Show existing variables")|e('js') }}</span>');
};
var _handleLegend = function(selector) {
</div>
<div class="field">
<label for="field_filter">{{ _T('in:') }}</label>
- <select name="field_filter" class="ui search dropdown nochosen">
+ <select name="field_filter" class="ui search dropdown">
{% for key, value in field_filter_options %}
<option value="{{ key }}"{% if key == filters.field_filter %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="field">
<label for="membership_filter">{{ _T('Membership status') }}</label>
- <select id="membership_filter" name="membership_filter" class="ui search dropdown nochosen">
+ <select id="membership_filter" name="membership_filter" class="ui search dropdown">
{% for key, value in membership_filter_options %}
<option value="{{ key }}"{% if key == filters.membership_filter %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="field">
<label for="filter_account">{{ _T('Account activity') }}</label>
- <select id="filter_account" name="filter_account" class="ui search dropdown nochosen">
+ <select id="filter_account" name="filter_account" class="ui search dropdown">
{% for key, value in filter_accounts_options %}
<option value="{{ key }}"{% if key == filters.filter_account %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="field">
<label for="group_filter">{{ _T('Member of group') }}</label>
- <select name="group_filter" id="group_filter" class="ui search dropdown nochosen">
+ <select name="group_filter" id="group_filter" class="ui search dropdown">
<option value="0">{{ _T('Select a group') }}</option>
{% for group in filter_groups_options %}
<option value="{{ group.getId() }}"{% if filters.group_filter == group.getId() %} selected="selected"{% endif %}>{{ group.getIndentName()|raw }}</option>
</div>
<div class="field">
<label for="status">{{ _T('Status') }}</label>
- <select name="status[]" id="status" multiple="" class="ui search dropdown nochosen">
+ <select name="status[]" id="status" multiple="" class="ui dropdown">
<option value="">{{ _T('Status') }}</option>
{% for key, value in statuts %}
<option value="{{ key }}"{% if key in filters.status %} selected="selected"{% endif %}>{{ value }}</option>
</div>
<div class="active content">
<div class="field">
- <select name="groups_logical_operator" class="operator_selector ui search dropdown nochosen">
+ <select name="groups_logical_operator" class="operator_selector ui search dropdown">
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_AND") }}"{% if filters.groups_search_log_op == constant("Galette\\Filters\\AdvancedMembersList::OP_AND") %} selected="selected"{% endif %}>{{ _T('In all selected groups') }}</option>
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_OR") }}"{% if filters.groups_search_log_op == constant("Galette\\Filters\\AdvancedMembersList::OP_OR") %} selected="selected"{% endif %}>{{ _T('In any of selected groups') }}</option>
</select>
<i class="arrows alternate icon" aria-hidden="true"></i>
</div>
<div>
- <select name="groups_search[]" class="group_selector ui search dropdown nochosen">
+ <select name="groups_search[]" class="group_selector ui search dropdown">
<option value="">{{ _T('Select a group') }}</option>
{% for group in filter_groups_options %}
<option value="{{ group.getId() }}"{% if gs.group == group.getId() %} selected="selected"{% endif %}>{{ group.getName() }}</option>
<div class="two fields">
<div class="field">
<label for="contributions_types">{{ _T('Type') }}</label>
- <select name="contributions_types[]" id="contributions_types" multiple="" class="ui dropdown nochosen">
+ <select name="contributions_types[]" id="contributions_types" multiple="" class="ui dropdown">
<option value="">{{ _T('Type') }}</option>
{% for key, value in contributions_types %}
</div>
<div class="field">
<label for="payments_types">{{ _T('Payment type') }}</label>
- <select name="payments_types[]" id="payments_types" multiple="" class="ui dropdown nochosen">
+ <select name="payments_types[]" id="payments_types" multiple="" class="ui dropdown">
<option value="">{{ _T('Payment type') }}</option>
{% for key, value in payments_types %}
<option value="{{ key }}"{% if key == filters.payments_types %} selected="selected"{% endif %}>{{ value }}</option>
{% elseif get_class(field) == "Galette\\DynamicFields\\Text" %}
<textarea name="cds_{{ field.getId() }}" id="cds_{{ field.getId() }}">{% if attribute(filters.contrib_dynamic, fid) is defined %}{{ attribute(filters.contrib_dynamic, fid) }}{% endif %}</textarea>
{% elseif get_class(field) == "Galette\\DynamicFields\\Choice" %}
- <select name="cdsc_{{ field.getId() }}[]" id="cdsc_{{ field.getId() }}" multiple="multiple" class="ui dropdown nochosen">
+ <select name="cdsc_{{ field.getId() }}[]" id="cdsc_{{ field.getId() }}" multiple="multiple" class="ui dropdown">
<option value="">{{ _T('Select') }}</option>
{% for k, choice in field.getValues() %}
<option value="{{ k }}"{% if attribute(filters.contrib_dynamic, fid) is defined and k in attribute(filters.contrib_dynamic, fid) %} selected="selected"{% endif %}>{{ choice }}</option>
<i class="arrows alternate icon" aria-hidden="true"></i>
</div>
<div class="inline fields">
- <select name="free_logical_operator[]" class="operator_selector ui selection dropdown nochosen">
+ <select name="free_logical_operator[]" class="operator_selector ui selection dropdown">
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_AND") }}"{% if fs.log_op == constant("Galette\\Filters\\AdvancedMembersList::OP_AND") %} selected="selected"{% endif %}>{{ _T('and') }}</option>
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_OR") }}"{% if fs.log_op == constant("Galette\\Filters\\AdvancedMembersList::OP_OR") %} selected="selected"{% endif %}>{{ _T('or') }}</option>
</select>
- <div class="field_selector ui search selection dropdown origselect nochosen">
+ <div class="field_selector ui search selection dropdown origselect">
<input type="hidden" name="free_field[]" value="{{ fs.field }}">
<i class="dropdown icon"></i>
<div class="text">{{ _T('Select a field') }}</div>
<div class="data inline fields">
<input type="hidden" name="free_type[]" value="{% if cur_field is defined %}{{ cur_field.getType() }}{% endif %}"/>
{% if cur_field is defined and (get_class(cur_field) == "Galette\\DynamicFields\\Choice" or type == constant("Galette\\DynamicFields\\DynamicField::CHOICE")) %}
- <select name="free_query_operator[]" class="free_operator ui selection dropdown nochosen">
+ <select name="free_query_operator[]" class="free_operator ui selection dropdown">
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") %} selected="selected"{% endif %}>{{ _T('is') }}</option>
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_NOT_EQUALS") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_NOT_EQUALS") %} selected="selected"{% endif %}>{{ _T('is not') }}</option>
</select>
- <select name="free_text[]" class="free_text ui search dropdown nochosen">
+ <select name="free_text[]" class="free_text ui search dropdown">
{% if cur_field is defined and get_class(cur_field) == "Galette\\DynamicFields\\Choice" %}
{% for key, value in cur_field.getValues() %}
<option value="{{ key }}"{% if key == fs.search %} selected="selected"{% endif %}>{{ value }}</option>
{% endif %}
</select>
{% elseif cur_field is defined and (get_class(cur_field) == "Galette\\DynamicFields\\Date" or type == constant("Galette\\DynamicFields\\DynamicField::DATE")) %}
- <select name="free_query_operator[]" class="free_operator ui selection dropdown nochosen">
+ <select name="free_query_operator[]" class="free_operator ui selection dropdown">
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") %} selected="selected"{% endif %}>{{ _T('is') }}</option>
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_BEFORE") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_BEFORE") %} selected="selected"{% endif %}>{{ _T('before') }}</option>
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_AFTER") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_AFTER") %} selected="selected"{% endif %}>{{ _T('after') }}</option>
<input type="text" name="free_text[]" value="{{ fs.search|date(_T('Y-m-d')) }}" class="modif_date" maxlength="10" size="10"/>
<span class="exemple">{{ _T('(yyyy-mm-dd format)') }}</span>
{% elseif cur_field is defined and (get_class(cur_field) == "Galette\\DynamicFields\\Boolean" or type == constant("Galette\\DynamicFields\\DynamicField::BOOLEAN")) %}
- <select name="free_query_operator[]" class="free_operator ui selection dropdown nochosen">
+ <select name="free_query_operator[]" class="free_operator ui selection dropdown">
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") %} selected="selected"{% endif %}>{{ _T('is') }}</option>
</select>
<input type="radio" name="free_text[]" id="free_text_yes" value="1"{% if fs.search == 1 %} checked="checked"{% endif %}/><label for="free_text_yes">{{ _T('Yes') }}</label>
<input type="radio" name="free_text[]" id="free_text_no" value="0"{% if fs.search == 0 %} checked="checked"{% endif %}/><label for="free_text_no">{{ _T('No') }}</label>
{% else %}
- <select name="free_query_operator[]" class="free_operator ui selection dropdown nochosen">
+ <select name="free_query_operator[]" class="free_operator ui selection dropdown">
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_EQUALS") %} selected="selected"{% endif %}>{{ _T('is') }}</option>
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_CONTAINS") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_CONTAINS") %} selected="selected"{% endif %}>{{ _T('contains') }}</option>
<option value="{{ constant("Galette\\Filters\\AdvancedMembersList::OP_NOT_EQUALS") }}"{% if fs.qry_op == constant("Galette\\Filters\\AdvancedMembersList::OP_NOT_EQUALS") %} selected="selected"{% endif %}>{{ _T('is not') }}</option>
_options += '<option value="' + key + '">' + _field.values[key] + '</option>';
}
}
- _html += '<select name="free_text[]" class="ui search selection dropdown nochosen">' + _options + '</select>';
+ _html += '<select name="free_text[]" class="ui search selection dropdown">' + _options + '</select>';
break;
case '{{ constant('Galette\\DynamicFields\\DynamicField::DATE') }}':
_html = _getOperatorSelector(['op_equals', 'op_before', 'op_after']);
var _operator = _operators[list[i]];
_options += '<option value="' + _operator.id + '">' + _operator.name + '</option>';
}
- return '<select name="free_query_operator[]" class="free_operator ui selection dropdown nochosen">' + _options + '</select>';
+ return '<select name="free_query_operator[]" class="free_operator ui selection dropdown">' + _options + '</select>';
}
var _initSortable = function(){
</div>
<div class="column">
<span data-prop-label="{{ _T("Permissions") }}" class="access" title="{{ _T("Change '%field' permissions")|replace({'%field': field.label}) }}">
- <select name="{{ fid }}_visible" id="{{ fid }}_visible" class="ui dropdown nochosen">
+ <select name="{{ fid }}_visible" id="{{ fid }}_visible" class="ui dropdown">
<option value="{{ constant('Galette\\Entity\\FieldsConfig::NOBODY') }}"{% if field.visible == constant('Galette\\Entity\\FieldsConfig::NOBODY') %} selected="selected"{% endif %}>{{ _T("Inaccessible") }}</option>
<option value="{{ constant('Galette\\Entity\\FieldsConfig::ADMIN') }}"{% if field.visible == constant('Galette\\Entity\\FieldsConfig::ADMIN') %} selected="selected"{% endif %}>{{ _T("Administrator") }}</option>
<option value="{{ constant('Galette\\Entity\\FieldsConfig::STAFF') }}"{% if field.visible == constant('Galette\\Entity\\FieldsConfig::STAFF') %} selected="selected"{% endif %}>{{ _T("Staff member") }}</option>
</div>
<div class="inline field">
<label for="field_perm">{{ _T("Permissions:") }}</label>
- <select name="field_perm" id="field_perm" class="ui dropdown nochosen">
+ <select name="field_perm" id="field_perm" class="ui dropdown">
{% for key, value in perm_names %}
<option value="{{ key }}"{% if key == df.getPerm() %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
{% 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">
+ <select name="field_required" id="field_required" class="ui dropdown">
<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>
<div class="inline field">
<label for="field_perm">{{ _T("Visibility") }}</label>
- <select name="field_perm" id="field_perm" class="ui dropdown nochosen">
+ <select name="field_perm" id="field_perm" class="ui dropdown">
{% set perm = 0 %}
{% if df is defined %}
{% set perm = df.getPerm() %}
</div>
<div class="inline field">
<label for="field_type">{{ _T("Type") }}</label>
- <select name="field_type" id="field_type" class="ui dropdown nochosen">
+ <select name="field_type" id="field_type" class="ui dropdown">
{% set type = 0 %}
{% if df is defined %}
{% set type = df.getType() %}
</div>
<div class="inline field">
<label for="field_required">{{ _T("Required") }}</label>
- <select name="field_required" id="field_required" class="ui dropdown nochosen">
+ <select name="field_required" id="field_required" class="ui dropdown">
<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>
{% if not require_mass %}
<div class="inline field">
<label for="id_adh">{{ _T("Contributor:") }}</label>
- <div id="id_adh" class="jsonly search-dropdown ui input nochosen paginated">
+ <div id="id_adh" class="jsonly search-dropdown ui input paginated">
<input id="id_adh_input" type="hidden" name="id_adh" value="{{ contribution.member is not null ? contribution.member }}" placeholder="{{ _T("Member ID") }}">
<i class="jsonly displaynone dropdown icon" aria-hidden="true"></i>
<span class="ui mini compact icon disabled button prev-results"><i class="jsonly displaynone chevron circle left icon disabled button tooltip" title="{{ _T("Load previous members...") }}" aria-hidden="true"></i></span>
{% endif %}
<div class="inline field{% if required.id_type_cotis is defined and required.id_type_cotis == 1 %} required{% endif %}">
<label for="id_type_cotis">{{ _T("Contribution type:") }}</label>
- <div id="id_type_cotis" class="ui dropdown selection nochosen">
+ <div id="id_type_cotis" class="ui dropdown selection">
{% if contribution.type %}
{% set selectedid = contribution.type.id %}
{% else %}
<div class="four fields">
<div class="field">
<label for="date_field">{{ _T("Show contributions by") }}</label>
- <select name="date_field" id="date_field" class="ui search dropdown nochosen">
+ <select name="date_field" id="date_field" class="ui search dropdown">
<option value="{{ constant("Galette\\Filters\\ContributionsList::DATE_BEGIN") }}"{% if filters.date_field == constant('Galette\\Filters\\ContributionsList::DATE_BEGIN') %} selected="selected"{% endif %}>{{ _T("Begin") }}</option>
<option value="{{ constant("Galette\\Filters\\ContributionsList::DATE_END") }}"{% if filters.date_field == constant('Galette\\Filters\\ContributionsList::DATE_END') %} selected="selected"{% endif %}>{{ _T("End") }}</option>
<option value="{{ constant("Galette\\Filters\\ContributionsList::DATE_RECORD") }}"{% if filters.date_field == constant('Galette\\Filters\\ContributionsList::DATE_RECORD') %} selected="selected"{% endif %}>{{ _T("Record") }}</option>
{% set users = history.getUsersList() %}
{% if users|length > 0 %}
<label for="user_filter">{{ _T("Member") }}</label>
- <select name="user_filter" id="user_filter" class="ui search dropdown nochosen">
+ <select name="user_filter" id="user_filter" class="ui search dropdown">
<option value="0"{% if history.filters.user_filter == 0 %} selected="selected"{% endif %}>{{ _T("Select an user") }}</option>
{% for user in users %}
<option value="{{ user }}"{% if history.filters.user_filter == user %} selected="selected"{% endif %}>{{ user }}</option>
{% set actions = history.getActionsList() %}
{% if actions|length > 0 %}
<label for="action_filter">{{ _T("Action") }}</label>
- <select name="action_filter" id="action_filter" class="ui search dropdown nochosen">
+ <select name="action_filter" id="action_filter" class="ui search dropdown">
<option value="0">{{ _T("Select an action") }}</option>
{% for action in actions %}
<option value="{{ action|escape }}"{% if history.filters.action_filter == action %} selected="selected"{% endif %}>{{ action|escape }}</option>
<div class="three fields">
<div class="field">
<label for="sender">{{ _T("Sender") }}</label>
- <select name="sender" id="sender" class="ui dropdown nochosen">
+ <select name="sender" id="sender" class="ui dropdown">
<option value="{{ constant('Galette\\Core\\GaletteMail::SENDER_PREFS') }}">{{ _T("from preferences") }}</option>
{% if not login.isSuperAdmin() %}
<option value="{{ constant('Galette\\Core\\GaletteMail::SENDER_CURRENT') }}">{{ _T("current logged in user") }}</option>
</div>
</div>
<span id="parent_id_elt" class="">
- <div id="parent_id" class="jsonly search-dropdown ui input nochosen paginated">
+ <div id="parent_id" class="jsonly search-dropdown ui input paginated">
<input id="parent_id_input" type="text" name="parent_id" value="{{ member.isDuplicate() and member.parent is defined and member.parent is not null ? member.parent.id }}" placeholder="{{ _T("Member ID") }}">
<i class="jsonly displaynone dropdown icon" aria-hidden="true"></i>
<span class="ui mini compact icon disabled button prev-results"><i class="jsonly displaynone chevron circle left icon disabled button tooltip" title="{{ _T("Load previous members...") }}" aria-hidden="true"></i></span>
<div class="ui center aligned yellow segment">
<div class="inline field">
<label for="redirect_on_create">{{ _T("After member creation:") }}</label>
- <select name="redirect_on_create" id="redirect_on_create"i class="ui search dropdown nochosen">
+ <select name="redirect_on_create" id="redirect_on_create"i class="ui search dropdown">
<option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_DEFAULT') }}"{% if preferences.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_DEFAULT') %} selected="selected"{% endif %}>{{ _T("create a new contribution (default action)") }}</option>
<option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_TRANS') }}"{% if preferences.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_TRANS') %} selected="selected"{% endif %}>{{ _T("create a new transaction") }}</option>
<option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_NEW') }}"{% if preferences.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_NEW') %} selected="selected"{% endif %}>{{ _T("create another new member") }}</option>
{% block javascripts %}
<script type="text/javascript">
{% include "elements/js/choose_adh.js.twig" with {"js_chosen_id": "#parent_id"} %}
+ {% include "elements/js/choose_social.js.twig" %}
$(function() {
$('#company_field.nocompany').addClass('displaynone');
</div>
<div class="field">
<label for="field_filter">{{ _T('in:') }}</label>
- <select name="field_filter" id="field_filter" class="ui search dropdown nochosen">
+ <select name="field_filter" id="field_filter" class="ui search dropdown">
{% for key, value in field_filter_options %}
<option value="{{ key }}"{% if key == filters.field_filter %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="field">
<label for="filter_str">{{ _T('among:') }}</label>
- <select name="membership_filter" class="ui search dropdown nochosen">
+ <select name="membership_filter" class="ui search dropdown">
{% for key, value in membership_filter_options %}
<option value="{{ key }}"{% if key == filters.membership_filter %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="flexend field">
<label for="filter_account" class="visually-hidden">{{ _T('among:') }}</label>
- <select name="filter_account" class="ui search dropdown nochosen">
+ <select name="filter_account" class="ui search dropdown">
{% for key, value in filter_accounts_options %}
<option value="{{ key }}"{% if key == filters.filter_account %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="flexend field">
<label for="group_filter" class="visually-hidden">{{ _T('among:') }}</label>
- <select name="group_filter" class="ui search dropdown nochosen">
+ <select name="group_filter" class="ui search dropdown">
<option value="0">{{ _T('Select a group') }}</option>
{% for group in filter_groups_options %}
<option value="{{ group.getId() }}"{% if filters.group_filter == group.getId() %} selected="selected"{% endif %}>{{ group.getIndentName()|raw }}</option>
</div>
</div>
<label for="pref_postal_staff_member">{{ _T("Staff member") }}</label>
- <select name="pref_postal_staff_member" id="pref_postal_staff_member" class="ui search dropdown nochosen">
+ <select name="pref_postal_staff_member" id="pref_postal_staff_member" class="ui search dropdown">
<option value="-1">{{ _T("-- Choose a staff member --") }}</option>
{% for staff in staff_members %}
<option value="{{ staff.id }}"{% if staff.id == pref.pref_postal_staff_member %} selected="selected"{% endif %}>{{ staff.name }} ({{ staff.sstatus }})</option>
<div class="column">
<div class="{% if required.pref_lang is defined and required.pref_lang == 1 %}required {% endif %}field">
<label for="pref_lang" >{{ _T("Default language:") }}</label>
- <select name="pref_lang" id="pref_lang" class="lang ui search dropdown nochosen"{% if required.pref_lang is defined and required.pref_lang == 1 %} required="required"{% endif %}>
+ <select name="pref_lang" id="pref_lang" class="lang ui search dropdown"{% if required.pref_lang is defined and required.pref_lang == 1 %} required="required"{% endif %}>
{% for langue in languages %}
<option value="{{ langue.getID() }}" {% if pref.pref_lang == langue.getID() %}selected="selected"{% endif %}>{{ langue.getName()|capitalize }}</option>
{% endfor %}
</div>
{#<div class="field">
<label for="pref_theme">{{ _T("Default theme:") }}</label>
- <select name="pref_theme" id="pref_theme" class="ui search dropdown nochosen">
+ <select name="pref_theme" id="pref_theme" class="ui search dropdown">
{% for theme in themes %}
<option value="{{ theme }}" {% if pref.pref_theme == theme %}selected="selected"{% endif %}>{{ theme|capitalize }}</option>
{% endfor %}
</div>#}
<div class="{% if required.pref_numrows is defined and required.pref_numrows == 1 %}required {% endif %}field">
<label for="pref_numrows">{{ _T("Lines / Page:") }}</label>
- <select name="pref_numrows" id="pref_numrows" class="ui search dropdown nochosen"{% if required.pref_numrows is defined and required.pref_numrows == 1 %} required="required"{% endif %}>
+ <select name="pref_numrows" id="pref_numrows" class="ui search dropdown"{% if required.pref_numrows is defined and required.pref_numrows == 1 %} required="required"{% endif %}>
{% for key, value in pref_numrows_options %}
<option value="{{ key }}"{% if key == pref.pref_numrows %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="field">
<label for="pref_redirect_on_create">{{ _T("After member creation:") }}</label>
- <select name="pref_redirect_on_create" id="pref_redirect_on_create" class="ui search dropdown nochosen">
+ <select name="pref_redirect_on_create" id="pref_redirect_on_create" class="ui search dropdown">
<option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_DEFAULT') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_DEFAULT') %} selected="selected"{% endif %}>{{ _T("create a new contribution (default action)") }}</option>
<option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_TRANS') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_TRANS') %} selected="selected"{% endif %}>{{ _T("create a new transaction") }}</option>
<option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_NEW') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_NEW') %} selected="selected"{% endif %}>{{ _T("create another new member") }}</option>
</div>
<div class="{% if required.pref_log is defined and required.pref_log == 1 %}required {% endif %}field">
<label for="pref_log">{{ _T("Logging level:") }}</label>
- <select name="pref_log" id="pref_log" class="ui search dropdown nochosen"{% if required.pref_log is defined and required.pref_log == 1 %} required="required"{% endif %}>
+ <select name="pref_log" id="pref_log" class="ui search dropdown"{% if required.pref_log is defined and required.pref_log == 1 %} required="required"{% endif %}>
<option value="{{ constant('Galette\\Core\\Preferences::LOG_DISABLED') }}" {% if pref.pref_log == constant('Galette\\Core\\Preferences::LOG_DISABLED') %}selected="selected"{% endif %}>{{ _T("Disabled") }}</option>
<option value="{{ constant('Galette\\Core\\Preferences::LOG_ENABLED') }}" {% if pref.pref_log == constant('Galette\\Core\\Preferences::LOG_ENABLED') %}selected="selected"{% endif %}>{{ _T("Enabled") }}</option>
</select>
</div>
<div class="field">
<label for="pref_filter_account">{{ _T("Default account filter:") }}</label>
- <select name="pref_filter_account" id="pref_filter_account" class="ui search dropdown nochosen">
+ <select name="pref_filter_account" id="pref_filter_account" class="ui search dropdown">
{% for key, value in accounts_options %}
<option value="{{ key }}"{% if key == pref.pref_filter_account %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="field">
<label for="pref_default_paymenttype">{{ _T("Default payment type:") }}</label>
- <select name="pref_default_paymenttype" id="pref_default_paymenttype" class="ui search dropdown nochosen">
+ <select name="pref_default_paymenttype" id="pref_default_paymenttype" class="ui search dropdown">
{% for key, value in paymenttypes %}
<option value="{{ key }}"{% if key == pref.pref_default_paymenttype %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div id="publicpages_visibility" class="field{% if not pref.pref_bool_publicpages %} displaynone{% endif %}">
<label for="pref_publicpages_visibility">{{ _T("Show public pages for") }}</label>
- <select name="pref_publicpages_visibility" id="pref_publicpages_visibility" class="ui search dropdown nochosen">
+ <select name="pref_publicpages_visibility" id="pref_publicpages_visibility" class="ui search dropdown">
<option value="{{ constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PUBLIC') }}"{% if pref.pref_publicpages_visibility == constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PUBLIC') %} selected="selected"{% endif %}>{{ _T("Everyone") }}</option>
<option value="{{ constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_RESTRICTED') }}"{% if pref.pref_publicpages_visibility == constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_RESTRICTED') %} selected="selected"{% endif %}>{{ _T("Up to date members") }}</option>
<option value="{{ constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PRIVATE') }}"{% if pref.pref_publicpages_visibility == constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PRIVATE') %} selected="selected"{% endif %}>{{ _T("Admin and staff only") }}</option>
</div>
<div id="pref_member_picture_ratio_field" class="inline field{% if pref.pref_force_picture_ratio != 1 %} displaynone{% endif %}">
<label for="pref_member_picture_ratio">{{ _T("Select a ratio") }}</label>
- <select name="pref_member_picture_ratio" id="pref_member_picture_ratio" class="ui dropdown nochosen">
+ <select name="pref_member_picture_ratio" id="pref_member_picture_ratio" class="ui dropdown">
<option value="square_ratio"{% if pref.pref_member_picture_ratio == 'square_ratio' %} selected="selected"{% endif %}>{{ _T("Square (1:1)") }}</option>
<option value="portrait_ratio"{% if pref.pref_member_picture_ratio == 'portrait_ratio' %} selected="selected"{% endif %}>{{ _T("Portrait (3:4)") }}</option>
<option value="landscape_ratio"{% if pref.pref_member_picture_ratio == 'landscape_ratio' %} selected="selected"{% endif %}>{{ _T("Landscape (4:3)") }}</option>
<div class="column">
<div class="field{% if required.pref_statut is defined and required.pref_statut == 1 %} required{% endif %}">
<label for="pref_statut">{{ _T("Default membership status:") }}</label>
- <select name="pref_statut" id="pref_statut" class="ui search dropdown nochosen"{% if required.pref_statut is defined and required.pref_statut == 1 %} required="required"{% endif %}>
+ <select name="pref_statut" id="pref_statut" class="ui search dropdown"{% if required.pref_statut is defined and required.pref_statut == 1 %} required="required"{% endif %}>
{% for key, value in statuts %}
<option value="{{ key }}"{% if key == pref.pref_statut %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</div>
<div class="field">
<label for="pref_card_address">{{ _T("Address type:") }}</label>
- <select name="pref_card_address" id="pref_card_address" class="ui search dropdown nochosen">
+ <select name="pref_card_address" id="pref_card_address" class="ui search dropdown">
<option value="0" {% if pref.pref_card_address == 0 %}selected="selected"{% endif %}>{{ _T("Email") }}</option>
<option value="5" {% if pref.pref_card_address == 5 %}selected="selected"{% endif %}>{{ _T("Zip - Town") }}</option>
<option value="6" {% if pref.pref_card_address == 6 %}selected="selected"{% endif %}>{{ _T("Nickname") }}</option>
</div>
<div class="inline field">
<label for="pref_password_strength" title="{{ _T("Enforce password strength") }}">{{ _T("Password strength:") }}</label>
- <select name="pref_password_strength" id="pref_password_strength" class="ui dropdown nochosen">
+ <select name="pref_password_strength" id="pref_password_strength" class="ui dropdown">
<option value="{{ constant('Galette\\Core\\Preferences::PWD_NONE') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_NONE') %} selected="selected"{% endif %}>{{ _T("None (default)") }}</option>
<option value="{{ constant('Galette\\Core\\Preferences::PWD_WEAK') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_WEAK') %} selected="selected"{% endif %}>{{ _T("Weak") }}</option>
<option value="{{ constant('Galette\\Core\\Preferences::PWD_MEDIUM') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_MEDIUM') %} selected="selected"{% endif %}>{{ _T("Medium") }}</option>
{% block javascripts %}
<script type="text/javascript">
+ {% include "elements/js/choose_social.js.twig" %}
+
$(function(){
{% if pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_SMTP') %}
$('#smtp_parameters').addClass('displaynone');
</div>
<div class="field inline{% if required.id_adh is defined and required.id_adh == 1 %} required{% endif %}">
<label for="id_adh" >{{ _T("Originator:") }}</label>
- <div id="id_adh" class="jsonly search-dropdown ui input nochosen paginated"{% if required.id_adh is defined and required.id_adh == 1 %} required="required"{% endif %}>
+ <div id="id_adh" class="jsonly search-dropdown ui input paginated"{% if required.id_adh is defined and required.id_adh == 1 %} required="required"{% endif %}>
<input id="id_adh_input" type="text" name="id_adh" value="{{ transaction.member is not null ? transaction.member }}" placeholder="{{ _T("Member ID") }}">
<i class="jsonly displaynone dropdown icon" aria-hidden="true"></i>
<span class="ui mini compact icon disabled button prev-results"><i class="jsonly displaynone chevron circle left icon disabled button tooltip" title="{{ _T("Load previous members...") }}" aria-hidden="true"></i></span>
var _bindFomanticComponents = function() {
var
$sidebar = $('.ui.sidebar'),
- $dropdown = $('.ui.dropdown:not(.navigation, .autosubmit, .nochosen), select:not(.nochosen)'),
+ $dropdown = $('.ui.dropdown:not(.navigation, .autosubmit), select'),
$dropdownNav = $('.ui.dropdown.navigation'),
$accordion = $('.ui.accordion'),
$checkbox = $('.ui.checkbox, .ui.radio.checkbox'),
display: none !important;
}
+.ui.corner.label .icon.btnlegend {
+ cursor: pointer;
+}
+
/* Content using visually-hidden is read by screen readers */
.visually-hidden {
position: absolute !important;
/*------------------------
Search dropdown
-------------------------*/
+.ui.form .fields .field .ui.input.search input,
+.ui.search.selection.dropdown > input.search {
+ width: 100%;
+}
.ui.search.selection.paginated.dropdown {
> .ui.mini.button {
display: none;
}
- > input.search {
- width: 100%;
- }
&.visible > .ui.mini.button {
display: block;
margin-right: 0;