Current path: home/webdevt/cryptoimpot.fr/module/Application/view/application/information/
?? Go up: /home/webdevt/cryptoimpot.fr/module/Application/view/application
<?php
$this->headTitle()->append('Information sur les exchanges');
$this->HeadLink()->appendStylesheet('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/css/bootstrap-select.css');
$this->headScript()
->appendFile('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js')
->appendFile('https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js')
;
//<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
//<link rel="stylesheet" href="" />
//<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
$form = $this->form;
$echanges = $form->get('exchanges');
$echanges->setAttribute('class', 'form-control');
$echanges->setAttribute('placeholder', 'Sélectionnez les exchanges que vous utilisez pour trader de la crypto');
//$echanges->setAttribute('data-style', 'btn-primary');
//$echanges->setAttribute('data-width', 'auto');
$echanges->setLabel('Sélectionnez les exchanges que vous utilisez pour trader de la crypto');
$csrf = $form->get('csrf');
$formButton = $form->get('submit');
$formButton->setAttribute('class', 'btn btn-primary btn btn-block');
$form->setAttribute('class', 'form-horizontal');
$form->prepare();
// Configure Errors Helper
$errorsHelper = $this->plugin('formelementerrors');
$errorsHelper
->setMessageOpenFormat('<div class="help-block">')
->setMessageSeparatorString('</div><div class="help-block">')
->setMessageCloseString('</div>');
?>
<div class="container" style="background-color: #FFFFFF; padding: 15px;">
<div class="row">
<div class="col">
<h2>Informations sur les exchanges</h2>
</div>
</div>
<?php echo $this->form()->openTag($form) ?>
<div class="form-group row">
<div class="col">
<?php
// Champs avec erreur
$erreurNom = '';
?>
<?php if ($this->formElementErrors($echanges)) : ?>
<div id="title-error" class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h3>Formulaire non valide</h3>
<ul>
<?php if ($this->formElementErrors($echanges)) : ?>
<li>
<?php echo $this->formElementErrors($echanges) ?></li>
<?php
//$nom->setAttribute('class', $nom->getAttribute('class') . ' alert-danger');
$erreurNom = 'has-error';
?>
<?php endif ?>
</ul>
</div>
<?php endif ?>
</div>
</div>
<dl class="zend-form">
<!-- Echanges -->
<div id="select-exchange-container" class="form-group <?php echo $erreurNom ?>">
<?php echo $this->formLabel($echanges) ?>
<?php echo $this->formSelect($echanges) ?>
</div>
<!-- ./ Echanges -->
<!-- Csrf -->
<?php echo $this->formHidden($csrf) ?>
<!-- ./ Csrf -->
<?php // echo $this->formHidden($ordre) ?>
<div class="form-group row <?php echo $erreurNom ?>">
<div class="offset-lg-4 col-lg-4">
<?php echo $this->formButton($formButton) ?>
</div>
</div>
</dl>
<?php echo $this->form()->closeTag() ?>
</div>
<script>
$(function () {
<?php /* https://developer.snapappointments.com/bootstrap-select/examples/#multiple-select-boxes */ ?>
$('#echanges').selectpicker(
{
actionsBox: true,
selectAllText: 'Tout sélectionner',
deselectAllText: 'Tout désélectionner',
noneSelectedText: 'Aucun exchange séléctionné',
selectedTextFormat: 'count > 8',
countSelectedText: function (nbSelected, nbTotal) {
return nbSelected + ' exchanges sélectionnés';
},
}
).selectpicker('toggle');
<?php if (!empty($this->arrayIdExchanges)) : ?>
//$('#echanges').selectpicker('val', ["<?= implode('","', $this->arrayIdExchanges) ?>"]);
<?php endif; ?>
//$('#select-exchange-container').removeClass('d-none');
});
</script>