{% extends 'layout.twig' %}

{% import 'messagesysteme.twig' as msgSyst %}
{% import 'champs.twig' as form %}

{% block css %}
	<link rel="stylesheet" href="../vendor/almasaeed2010/adminlte/plugins/toastr/toastr.min.css">
{% endblock %}

{% block content %}
	<div class="row">
        <div class="col col-12 col-sm-12">
            <div class="card card-primary card-outline card-tabs">
              <div class="card-header p-0 pt-1 border-bottom-0">
                <ul class="nav nav-tabs" id="custom-tabs-three-tab" role="tablist">
                  <li class="nav-item">
                    <a class="nav-link" id="custom-tabs-three-home-tab" href="?p=admin_config">{{ trad.admin_config1 }}</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link active" id="custom-tabs-three-profile-tab" href="?p=admin_config6">{{ trad.admin_config6 }}</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" id="custom-tabs-three-messages-tab" href="?p=admin_config2">{{ trad.admin_config2 }}</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" id="custom-tabs-three-settings-tab" href="?p=admin_config3">{{ trad.admin_config3 }}</a>
                  </li>
				  <li class="nav-item">
                    <a class="nav-link" id="custom-tabs-three-profile-tab" href="?p=admin_config7">{{ trad.admin_config7 }}</a>
                  </li>
				  <li class="nav-item">
                    <a class="nav-link" id="custom-tabs-three-settings-tab" href="?p=admin_config4">{{ trad.admin_config4 }}</a>
                  </li>
				  <li class="nav-item">
                    <a class="nav-link" id="custom-tabs-three-settings-tab" href="?p=admin_config5" >{{ trad.admin_config5 }}</a>
                  </li>
                </ul>
              </div>
              <div class="card-body">
				  <div class="tab-pane active" id="fa-icons">
					<form enctype="multipart/form-data" action="?p=admin_config6" id="nom_formulaire" method="post">
						<input type="hidden" name="p" value="admin_config6" />
						<section id="paramdefaut">
							<h4 class="page-header">{{ trad.default_parameter_values_title }}</h4>
							<p>{{ trad.explain_default_parameter }}</p>

							<!-- Type d'affichage des ressources -->
							<div class="form-group row col-sm-12">
								<label class="col col-sm-6" for="area_list_format">{{ trad.explain_area_list_format }}</label>
								<div class="col col-sm-5">
									<select class="form-control" name="area_list_format">
										<option value="list" {% if settings.area_list_format == 'list' %} selected {% endif %}>{{ trad.liste_area_list_format }}</option>
										<option value="select" {% if settings.area_list_format == 'select' %} selected {% endif %}>{{ trad.select_area_list_format }}</option>
										<option value="item" {% if settings.area_list_format == 'item' %} selected {% endif %}>{{ trad.item_area_list_format }}</option>
									</select>
								</div>
								<div class="col col-sm-1"><button type="button" class="btn btn-warning btn-md" data-bs-toggle="modal" data-bs-target="#modal-warning" data-texte="Confirmer la synchronisation du type d'affichage avec tout les utilisateurs ?" data-idsynchro="3"><i class="icon fa fa-sync"></i></button></div>
							</div>

							<hr>
							<!-- Site / Domaine et ressource par défaut -->
							{% if settings.module_multisite == 'Oui' %}
								<div class="form-group row col-sm-12">
									<label class="col col-sm-6" for="default_css">{{ trad.default_site }}</label>
									<div class="col col-sm-6">
										<select class="form-control" id="id_site" name="id_site" onchange="modifier_liste_domaines();modifier_liste_ressources(2)">
											<option value="-1">{{ trad.choose_a_site }}</option>
											{{ d.optionSite | raw }}
										</select>
									</div>
								</div>
							{% else %}
								<input type="hidden" id="id_site" name="id_site" value="-1" />
							{% endif %}
							<div id="div_liste_domaines"></div>
							<div id="div_liste_ressources"></div>
							<div style="text-align:center;"><button type="button" class="btn btn-warning btn-md col col-sm-1" data-bs-toggle="modal" data-bs-target="#modal-warning" data-texte="Confirmer la synchronisation du thème avec tout les utilisateurs ?" data-idsynchro="4"><i class="icon fa fa-sync"></i></button></div>

							<hr>
							<!-- Style -->
							<div class="form-group row col-sm-12">
								<label class="col col-sm-6" for="default_css">{{ trad.explain_css }}</label>
								<div class="col col-sm-5">
									<select class="form-control" name="default_css">
										{{ d.optionTheme | raw }}
									</select>
								</div>
								<div class="col col-sm-1"><button type="button" class="btn btn-warning btn-md" data-bs-toggle="modal" data-bs-target="#modal-warning" data-texte="Confirmer la synchronisation du thème avec tout les utilisateurs ?" data-idsynchro="1"><i class="icon fa fa-sync"></i></button></div>
							</div>
							<hr>
							<!--Langue  -->
							<div class="form-group row col-sm-12">
								<label class="col col-sm-6" for="default_language">{{ trad.choose_language }}</label>
								<div class="col col-sm-5">
									<select class="form-control" name="default_language">
										{{ d.optionLangue | raw }}
									</select>
								</div>
								<div class="col col-sm-1"><button type="button" class="btn btn-warning btn-md" data-bs-toggle="modal" data-bs-target="#modal-warning" data-texte="Confirmer la synchronisation de la langue avec tout les utilisateurs ?" data-idsynchro="2"><i class="icon fa fa-sync"></i></button></div>
							</div>
						</section>

						<hr>
<!--
						<section id="infobulle">
							<h4 class="page-header">{{ trad.display_info_bulle_msg }}</h4>
							<input type="radio" name="display_info_bulle" value="0" id="label_2a" {% if settings.display_info_bulle == '0' %} checked {% endif %} /> <label for="label_2a">{{ trad.info_bulle0 }}</label><br>
							<input type="radio" name="display_info_bulle" value="1" id="label_2b" {% if settings.display_info_bulle == '1' %} checked {% endif %} /> <label for="label_2b">{{ trad.info_bulle1 }}</label><br>
							<input type="radio" name="display_info_bulle" value="2" id="label_2c" {% if settings.display_info_bulle == '2' %} checked {% endif %} /> <label for="label_2c">{{ trad.info_bulle2 }}</label><br>
						</section>

						<hr>
-->
						<section id="menugauche">
							<h4 class="page-header">{{ trad.display_menu }}</h4>
							<p>{{ trad.display_menu_1 }}</p>
							<input type="radio" name="menu_gauche" value="0" id="label_3a" {% if settings.menu_gauche == '0' %} checked {% endif %} /> <label for="label_3a">{{ trad.display_menu_2 }}</label><br>
							<input type="radio" name="menu_gauche" value="1" id="label_3b" {% if settings.menu_gauche == '1' %} checked {% endif %} /> <label for="label_3b">{{ trad.display_menu_3 }}</label><br>
							<input type="radio" name="menu_gauche" value="2" id="label_3c" {% if settings.menu_gauche == '2' %} checked {% endif %} /> <label for="label_3c">{{ trad.display_menu_4 }}</label><br>
						</section>

						<hr>

						<section id="display_planning_resa">
							<h4 class="page-header">{{ trad.display_planning_resa }}</h4>

							<table class="table table-condensed">
								<tbody>
									<tr>
										<th style="width: 150px"></th>
										<th style="width: 100px">{{trad.statut_non_connecte}}</th>
										<th style="width: 100px">{{trad.statut_visitor}}</th>
										<th style="width: 100px">{{trad.statut_user}}</th>
										<th style="width: 100px">{{trad.statut_user_administrator}}</th>
										<th style="width: 100px">{{trad.statut_administrator}}</th>
									</tr>
									<tr>
										<th>{{ trad.sum_by_creator }}</th>
										<td>
											<select class="form-control" name="display_beneficiaire_nc">
												<option value="0" {% if settings.display_beneficiaire_nc == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_beneficiaire_nc == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_beneficiaire_nc == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_beneficiaire_vi">
												<option value="0" {% if settings.display_beneficiaire_vi == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_beneficiaire_vi == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_beneficiaire_vi == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_beneficiaire_us">
												<option value="0" {% if settings.display_beneficiaire_us == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_beneficiaire_us == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_beneficiaire_us == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_beneficiaire_gr">
												<option value="0" {% if settings.display_beneficiaire_gr == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_beneficiaire_gr == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_beneficiaire_gr == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_beneficiaire_ad">
												<option value="0" {% if settings.display_beneficiaire_ad == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_beneficiaire_ad == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_beneficiaire_ad == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
									</tr>
									<tr>
										<th>{{ trad.horaires }}</th>
										<td>
											<select class="form-control" name="display_horaires_nc">
												<option value="0" {% if settings.display_horaires_nc == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_horaires_nc == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_horaires_nc == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_horaires_vi">
												<option value="0" {% if settings.display_horaires_vi == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_horaires_vi == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_horaires_vi == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_horaires_us">
												<!--<option value="0" {% if settings.display_horaires_us == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>-->
												<option value="1" {% if settings.display_horaires_us == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_horaires_us == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_horaires_gr">
												<!--<option value="0" {% if settings.display_horaires_gr == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>-->
												<option value="1" {% if settings.display_horaires_gr == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_horaires_gr == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_horaires_ad">
												<!--<option value="0" {% if settings.display_horaires_ad == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>-->
												<option value="1" {% if settings.display_horaires_ad == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_horaires_ad == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
									</tr>
									<tr>
										<th>{{ trad.namebooker }}</th>
										<td>
											<select class="form-control" name="display_short_description_nc">
												<option value="0" {% if settings.display_short_description_nc == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_short_description_nc == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_short_description_nc == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_short_description_vi">
												<option value="0" {% if settings.display_short_description_vi == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_short_description_vi == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_short_description_vi == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_short_description_us">
												<option value="0" {% if settings.display_short_description_us == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_short_description_us == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_short_description_us == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_short_description_gr">
												<option value="0" {% if settings.display_short_description_gr == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_short_description_gr == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_short_description_gr == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_short_description_ad">
												<option value="0" {% if settings.display_short_description_ad == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_short_description_ad == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_short_description_ad == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
									</tr>
									<tr>
										<th>{{ trad.match_descr }}</th>
										<td>
											<select class="form-control" name="display_full_description_nc">
												<option value="0" {% if settings.display_full_description_nc == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_full_description_nc == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_full_description_nc == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_full_description_vi">
												<option value="0" {% if settings.display_full_description_vi == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_full_description_vi == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_full_description_vi == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_full_description_us">
												<option value="0" {% if settings.display_full_description_us == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_full_description_us == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_full_description_us == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_full_description_gr">
												<option value="0" {% if settings.display_full_description_gr == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_full_description_gr == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_full_description_gr == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_full_description_ad">
												<option value="0" {% if settings.display_full_description_ad == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_full_description_ad == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_full_description_ad == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
									</tr>
									<tr>
										<th>{{ trad.type }}</th>
										<td>
											<select class="form-control" name="display_type_nc">
												<option value="0" {% if settings.display_type_nc == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_type_nc == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_type_nc == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_type_vi">
												<option value="0" {% if settings.display_type_vi == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_type_vi == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_type_vi == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_type_us">
												<option value="0" {% if settings.display_type_us == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_type_us == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_type_us == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_type_gr">
												<option value="0" {% if settings.display_type_gr == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_type_gr == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_type_gr == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_type_ad">
												<option value="0" {% if settings.display_type_ad == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_type_ad == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_type_ad == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
									</tr>
									<tr>
										<th>{{ trad.participants }}</th>
										<td>
											<select class="form-control" name="display_participants_nc">
												<option value="0" {% if settings.display_participants_nc == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_participants_nc == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_participants_nc == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_participants_vi">
												<option value="0" {% if settings.display_participants_vi == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_participants_vi == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_participants_vi == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_participants_us">
												<option value="0" {% if settings.display_participants_us == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_participants_us == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_participants_us == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_participants_gr">
												<option value="0" {% if settings.display_participants_gr == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_participants_gr == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_participants_gr == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
										<td>
											<select class="form-control" name="display_participants_ad">
												<option value="0" {% if settings.display_participants_ad == '0' %} selected {% endif %}>{{ trad.afficher_non }}</option>
												<option value="1" {% if settings.display_participants_ad == '1' %} selected {% endif %}>{{ trad.afficher_oui }}</option>
												<option value="2" {% if settings.display_participants_ad == '2' %} selected {% endif %}>{{ trad.afficher_popup }}</option>
											</select>
										</td>
									</tr>
								</tbody>
							</table>

						</section>

						<hr>

						<section id="liensemail">
							<h4 class="page-header">{{ trad.display_level_email_msg1 }}</h4>
							<p>{{ trad.display_level_email_msg2 |raw}}</p>
							<input type="radio" name="display_level_email" value="0" id="label_6a" {% if settings.display_level_email == '0' %} checked {% endif %} /> <label for="label_6a">{{ trad.visu_fiche_description0 }}</label><br>
							<input type="radio" name="display_level_email" value="1" id="label_6b" {% if settings.display_level_email == '1' %} checked {% endif %} /> <label for="label_6b">{{ trad.visu_fiche_description1 }}</label><br>
							<input type="radio" name="display_level_email" value="2" id="label_6c" {% if settings.display_level_email == '2' %} checked {% endif %} /> <label for="label_6c">{{ trad.visu_fiche_description2 }}</label><br>
							<input type="radio" name="display_level_email" value="3" id="label_6d" {% if settings.display_level_email == '3' %} checked {% endif %} /> <label for="label_6d">{{ trad.visu_fiche_description3 }}</label><br>
							<input type="radio" name="display_level_email" value="4" id="label_6e" {% if settings.display_level_email == '4' %} checked {% endif %} /> <label for="label_6e">{{ trad.visu_fiche_description4 }}</label><br>
							{% if settings.module_multisite == 'Oui' %}
								<input type="radio" name="display_level_email" value="5" id="label_6f" {% if settings.display_level_email == '5' %} checked {% endif %} /> <label for="label_6f">{{ trad.visu_fiche_description5 }}</label><br>
							{% endif %}
							<input type="radio" name="display_level_email" value="6" id="label_6g" {% if settings.display_level_email == '6' %} checked {% endif %} /> <label for="label_6g">{{ trad.visu_fiche_description6 }}</label><br>
						</section>

						<hr>

						<section id="popup">
							<h4 class="page-header">{{ trad.display_level_view_entry }}</h4>
							<input type="radio" name="display_level_view_entry" value="0" id="label_7a" {% if settings.display_level_view_entry == '0' %} checked {% endif %} /> <label for="label_7a">{{ trad.display_level_view_entry_0 }}</label><br>
							<input type="radio" name="display_level_view_entry" value="1" id="label_7b" {% if settings.display_level_view_entry == '1' %} checked {% endif %} /> <label for="label_7b">{{ trad.display_level_view_entry_1 }}</label><br>
						</section>

						<hr>

						<section id="remplissagedescriptionbreve">
							<h4 class="page-header">{{ trad.remplissage_description_breve_msg }}</h4>
							<input type="radio" name="remplissage_description_breve" value="0" id="label_8a" {% if settings.remplissage_description_breve == '0' %} checked {% endif %} /> <label for="label_8a">{{ trad.remplissage_description_breve0 }}</label><br>
							<input type="radio" name="remplissage_description_breve" value="1" id="label_8b" {% if settings.remplissage_description_breve == '1' %} checked {% endif %} /> <label for="label_8b">{{ trad.remplissage_description_breve1 }}</label><br>
							<input type="radio" name="remplissage_description_breve" value="2" id="label_8c" {% if settings.remplissage_description_breve == '2' %} checked {% endif %} /> <label for="label_8c">{{ trad.remplissage_description_breve2 }}</label><br>
						</section>

						<hr>

						<section id="remplissagedescripcomplete">
							<h4 class="page-header">{{ trad.remplissage_description_complete_msg }}</h4>
							<input type="radio" name="remplissage_description_complete" value="2" id="label_9c" {% if settings.remplissage_description_complete == '2' %} checked {% endif %} /> <label for="label_9c">{{ trad.remplissage_description_complete2 }}</label><br>
							<input type="radio" name="remplissage_description_complete" value="0" id="label_9a" {% if settings.remplissage_description_complete == '0' %} checked {% endif %} /> <label for="label_9a">{{ trad.remplissage_description_complete0 }}</label><br>
							<input type="radio" name="remplissage_description_complete" value="1" id="label_9b" {% if settings.remplissage_description_complete == '1' %} checked {% endif %} /> <label for="label_9b">{{ trad.remplissage_description_complete1 }}</label><br>
						</section>

						<hr>

						<section id="ouvertureimpression">
							<h4 class="page-header">{{ trad.pview_new_windows_msg }}</h4>
							<input type="radio" name="pview_new_windows" value="0" id="label_10a" {% if settings.pview_new_windows == '0' %} checked {% endif %} /> <label for="label_10a">{{ trad.pview_new_windows0 }}</label><br>
							<input type="radio" name="pview_new_windows" value="1" id="label_10b" {% if settings.pview_new_windows == '1' %} checked {% endif %} /> <label for="label_10b">{{ trad.pview_new_windows1 }}</label><br>
						</section>

						<hr>

						<section id="ouvertureimpression">
							<h4 class="page-header">Affichage plannings divers</h4>

							<table class="table table-condensed">
								<tbody>
									<tr>
										<th style="width: 300px"></th>
										<th style="width: 50px">Afficher</th>
										<th>Ne pas afficher</th>
										<th></th>
									</tr>
									<tr>
										<td>{{ trad.legend_msg }}</td>
										<td><input type="radio" name="legend" value="0" id="label_11a" {% if settings.legend == '0' %} checked {% endif %} /></td>
										<td><input type="radio" name="legend" value="1" id="label_11b" {% if settings.legend == '1' %} checked {% endif %} /></td>
										<td></td>
									</tr>
									<tr>
										<td>{{ trad.imprimante_msg }}</td>
										<td><input type="radio" name="imprimante" value="0" id="label_12a" {% if settings.imprimante == '0' %} checked {% endif %} /></td>
										<td><input type="radio" name="imprimante" value="1" id="label_12b" {% if settings.imprimante == '1' %} checked {% endif %} /></td>
										<td></td>
									</tr>
									<tr>
										<td>{{ trad.affichage_pdf }}</td>
										<td><input type="radio" name="pdf" value="1" id="label_14a" {% if settings.pdf == '1' %} checked {% endif %} /></td>
										<td><input type="radio" name="pdf" value="0" id="label_14b" {% if settings.pdf == '0' %} checked {% endif %} /></td>
										<td></td>
									</tr>
									<tr>
										<td>{{ trad.holidays_msg }}</td>
										<td><input type="radio" name="show_holidays" value="Oui" id="label_13a" {% if settings.show_holidays == 'Oui' %} checked {% endif %} /></td>
										<td><input type="radio" name="show_holidays" value="Non" id="label_13b" {% if settings.show_holidays == 'Non' %} checked {% endif %} /></td>
										<td>
											<select class="form-control" name="holidays_zone">
												<option>{{ trad.holidays_zone_msg }}</option>
												{{ d.optionVacances | raw }}
											</select>
										</td>
									</tr>
								</tbody>
							</table>

						</section>

						<hr>

						<section id="ouvertureimpression">
							<h4 class="page-header">Affichage de la page de connexion</h4>

							<!-- Choix affichage de la page de connexion -->
							<div class="form-group row col-sm-12">
								<label class="col col-sm-6" for="login_template">Template de la page de connexion</label>
								<div class="col col-sm-6">
									<select class="form-control" name="login_template">
										<option value="1" {% if settings.login_template == '1' %} selected {% endif %}>1 - Centré</option>
										<option value="2" {% if settings.login_template == '2' %} selected {% endif %}>2 - A droite</option>
									</select>
								</div>
							</div>

							<table class="table table-condensed">
								<tbody>
									<tr>
										<th style="width: 300px"></th>
										<th style="width: 50px">Afficher</th>
										<th>Ne pas afficher</th>
										<th></th>
									</tr>
									<tr>
										<td>Logo</td>
										<td><input type="radio" name="login_logo" value="1" id="label_11a" {% if settings.login_logo == '1' %} checked {% endif %} /></td>
										<td><input type="radio" name="login_logo" value="0" id="label_11b" {% if settings.login_logo == '0' %} checked {% endif %} /></td>
										<td></td>
									</tr>
									<tr>
										<td>{{trad.company}}</td>
										<td><input type="radio" name="login_nom" value="1" id="label_12a" {% if settings.login_nom == '1' %} checked {% endif %} /></td>
										<td><input type="radio" name="login_nom" value="0" id="label_12b" {% if settings.login_nom == '0' %} checked {% endif %} /></td>
										<td></td>
									</tr>
								</tbody>
							</table>

							<p>{{ trad.choisir_image_login }}</p>
							<div class="form-group row col-sm-12">
								<label class="col col-sm-4" for="doc_file">{{ trad.select_fichier }}</label>
								<div class="col col-sm-8">
									<input type="file" name="doc_file" />
								</div>
							</div>
							{% if settings.image_connexion %}
								<div class="form-group row col-sm-12">
									<img src="{{d.dossierLogo}}{{ settings.image_connexion }}" alt="logo" title="{{ trad.dLogo }}"/>
									<div class="col col-sm-8">
										{{ trad.supprimer_logo }} <input type="checkbox" name="sup_img" />
									</div>
								</div>
							{% endif %}

						</section>

						<hr>

						<section id="default_report_days_msg">
							<h4 class="page-header">{{ trad.default_report_days_msg }}</h4>
							{{ form.input('default_report_days', trad.default_report_days_explain, settings.default_report_days, {classGroup: 'col-sm-12', classLabel: 'col-sm-6', classInput: 'col-sm-6 control-label', type: 'number'}) }}
							<br>
						</section>

						<hr>

						<section id="formulaire_reservation">
							<h4 class="page-header">{{ trad.formulaire_reservation }}</h4>
							{{ form.input('longueur_liste_ressources_max', trad.longueur_liste_ressources, settings.longueur_liste_ressources_max, {classGroup: 'col-sm-12', classLabel: 'col-sm-6', classInput: 'col-sm-6 control-label', type: 'number'}) }}
							<br>
						</section>

						<div style="text-align:center;">
							<input class="btn btn-primary" type="submit" name="ok" value="{{ trad.save }}" />
						</div>
					</form>
				  </div><!-- /.tab-pan -->
			  </div><!-- /.card-body -->

			</div><!-- /.card-primary -->
		</div><!-- /.col -->
	</div><!-- /.row -->



	<div class="modal fade" id="modal-warning" style="display: none;" aria-hidden="true">
	  <form action="?p=admin_config6" id="formmodal">
        <div class="modal-dialog">
          <div class="modal-content bg-warning">
            <div class="modal-header">
              <h4 class="modal-title">Synchronisation</h4>
              <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">×</span>
              </button>
            </div>
            <div class="modal-body">
              <span class="modaltexte" id="modaltexte"></span><span class="modalidsync" id="modalidsync" hidden></span>
            </div>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">{{trad.NO}}</button>
				<button type="submit" id="liensup" class="btn btn-outline-dark">{{trad.YES}}</button>
            </div>
          </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
	  </form>
    </div><!-- /.modal -->


{% endblock %}

{% block javascript %}
	<script src="../vendor/almasaeed2010/adminlte/plugins/toastr/toastr.min.js"></script>
	<script type="text/javascript">
		function modifier_liste_domaines(){
			$.ajax({
				url: "../compte/my_account_modif_listes.php",
				type: "get",
				dataType: "html",
				data: {
					id_site: $('#id_site').val(),
					default_area : '{{ settings.default_area }}',
					session_login:'{{ d.nomUtilisateur }}',
					use_site:'{{ d.use_site }}',
					type:'domaine',
				},
				success: function(returnData){
					$("#div_liste_domaines").html(returnData);
				},
				error: function(e){
					alert(e);
				}
			});
		}
		function modifier_liste_ressources(action){
			$.ajax({
				url: "../compte/my_account_modif_listes.php",
				type: "get",
				dataType: "html",
				data: {
					id_area:$('id_area').serialize(true),
					default_room : '{{ settings.default_room }}',
					type:'ressource',
					action:+action,
				},
				success: function(returnData){
					$("#div_liste_ressources").html(returnData);
				},
				error: function(e){
					alert(e);
				}
			});
		}
		modifier_liste_domaines();
		modifier_liste_ressources(1);

		// Modal
		$('#modal-warning').on('show.bs.modal', function (event) {
			var button = $(event.relatedTarget) // Button that triggered the modal
			var idsynchro = button.data('idsynchro')// Extract info from data-* attributes
			var texte = button.data('texte')
		    // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
		    // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
		    var modal = $(this)
		    modal.find('.modalidsync').text(idsynchro)
			modal.find('.modaltexte').text(texte)
		})

		$(function(){
			$('#formmodal').submit(function(e) {
			  e.preventDefault()
			  var $form = $(this)
			  var v=document.getElementById('modalidsync').innerHTML
			  $.post($form.attr('action'), $form.serialize())
			  .done(function(data) {
				$('#html').html(data);
				$('#modal-warning').modal('hide');
				document.location.href='?p=admin_config6&sync='+v;
			  })
			  .fail(function() {
				alert('Une erreur est survenue : GRRJS')
			  })
			})

			{%if d.enregistrement%}
				{%if d.enregistrement == 1 %}
					toastr.success("{{trad.message_records}}")
				{% else %}
					toastr.warning("{{d.enregistrement|raw}}")
				{%endif%}
			{%endif%}
		})

	</script>

{% endblock %}
