use Elementor\Controls_Manager;
use Elementor\Plugin;
+
class Setup {
public function register() {
add_action('elementor/widgets/widgets_registered', [$this, 'register_widgets']);
}
-
public function register_customisations() {
$this->_customise_sections();
]
);
+ $this->add_control(
+ 'link_url',
+ [
+ 'label' => __('Link url'),
+ 'type' => Controls_Manager::URL,
+ 'default' => ''
+ ]
+ );
+
+ $this->add_control(
+ 'link_text',
+ [
+ 'label' => __('Link text'),
+ 'type' => Controls_Manager::TEXTAREA,
+ 'default' => ''
+ ]
+ );
+
$this->add_control(
'images_desktop',
[
$id = 'header_slideshow_' . $this->get_id();
$title = $this->get_settings('title');
$body = $this->get_settings('body');
+ $linkUrl = $this->get_settings('link_url')['url'];
+ $linkText = $this->get_settings('link_text');
$images_desktop = $this->get_settings('images_desktop');
$images_mobile = $this->get_settings('images_mobile');
data-element_type="section">
<span class="header-slideshow-title"><?= $title ?></span>
<span class="header-slideshow-body"><?= $body ?></span>
+ <br>
+ <a href="<?= esc_url($linkUrl) ?>" class="text-block-cta btn"><?= $linkText ?></a>
</h1>
<?php endif; ?>
use function Roots\view;
use function Roots\asset;
-
class LinkCarousel extends _Base {
+ public function __construct($data = [], $args = null) {
+ parent::__construct($data, $args);
+ wp_register_script( 'cube-link-carousel', asset('scripts/link-carousel.js'), [ 'swiper' ], '1.0.0', true );
+ }
// Widget name / ID
public function get_name() {
return 'cube-link-carousel';
* @access public
* @return array Widget scripts dependencies.
*/
- public function get_script_depends() {
-
- wp_register_script(
- 'cube-link-carousel',
- asset('scripts/link-carousel.js'),
- ['jquery', 'swiper'], // Dependencies
- null, // Version
- true // In footer?
- );
-
+ public function get_script_depends()
+ {
// Using Swiper because it is already included and heavily used by Elementor
return [ 'cube-link-carousel' ];
--- /dev/null
+<?php
+
+namespace Cube\Forms;
+
+use Cube\Forms\Builder\Fields\Text;
+use Cube\Forms\Builder\Fields\Radio;
+
+use function Roots\asset;
+class Appointment extends Consultation
+{
+ public $doctors;
+ public function __construct() {
+ $this->set_form_title(__('Rendez-vous', 'ccv'));
+ $this->doctors = [
+ __('Première disponiblité') => [ 'legend' => 'La première date disponible vous sera proposée.', 'url' => @asset('images/doctors/premiere_dispo.jpg')],
+ __('Dr Martin GRAU ORTIZ') => [ 'legend' => 'Chirurgien orthopédiste spécialisé en chirurgie vertébrale.', 'url' => @asset('images/doctors/martin_grau_ortiz.jpg')],
+ __('Dr Guilhaume GENESTE') => [ 'legend' => 'Chirurgien orthopédiste spécialisé en chirurgie vertébrale.', 'url' => @asset('images/doctors/guilhaume_geneste.jpg')],
+ __('Dr Caroline HIRSCH') => [ 'legend' => 'Chirurgien orthopédiste spécialisé en chirurgie vertébrale.', 'url' => @asset('images/doctors/caroline_hirsch.jpg')],
+ __('Dr Grégory EDGARD-ROSA') => [ 'legend' => 'Chirurgien orthopédiste spécialisé en chirurgie vertébrale.', 'url' => @asset('images/doctors/gregory_edgard_rosa.jpg')]
+ ];
+ }
+
+ function register_fields() {
+ parent::register_fields();
+ $this->add_fields([
+ Radio::field('doctor', __('Choisissez un chirurgien', 'ccv'))
+ ->options([
+ __('Première disponiblité'),
+ __('Dr Martin GRAU ORTIZ'),
+ __('Dr Guilhaume GENESTE'),
+ __('Dr Caroline HIRSCH'),
+ __('Dr Grégory EDGARD-ROSA')
+ ]),
+ ]);
+ }
+}
\ No newline at end of file
'consultation' => Consultation::class,
'training' => Training::class,
'contact' => Contact::class,
+ 'appointment' => Appointment::class,
];
protected $fields = [];
public $builder;
+ public $doctors;
+
// Early setup called by Init.php in mu-plugin to register
// This is separated from init() so we can set up hooks for every request
// but only register scripts when we are going to display the form...
$this->register_fields();
$this->register_scripts();
- $this->builder = new FormBuilder($this->get_fields());
+ $this->builder = new FormBuilder($this->get_fields(),$this->doctors);
}
public function register_scripts() {
return $value;
}
-
}
--- /dev/null
+<?php
+
+namespace Cube\Forms\Builder\Fields;
+
+use Cube\Forms\Builder\Field;
+
+class Password extends Field
+{
+ public function render($settings) {
+ return '<input type="password" name="'. $this->get_name() .'" placeholder="'. $settings['placeholder'] .'" '. $settings['validation'] .'>';
+ }
+}
// HTML Form Builder
class Form extends Base
{
- public function __construct($fields) {
+ public function __construct($fields, $doctors) {
$this->fields = $fields;
+ $this->doctors = $doctors;
}
/**
use Cube\Forms\Builder\Fields\Date;
use Cube\Forms\Builder\Fields\Email;
use Cube\Forms\Builder\Fields\Hidden;
+use Cube\Forms\Builder\Fields\Password;
use Cube\Forms\Builder\Fields\Radio;
use Cube\Forms\Builder\Fields\Select;
use Cube\Forms\Builder\Fields\Text;
Text::field('country', __('Pays', 'ccv')),
Text::field('phone', __('Tel', 'ccv')),
Email::field('email', __('Email', 'ccv')),
- Radio::field('sex', __('Sexe', 'ccv'))
+ Radio::field('sex', __('Sexe :', 'ccv'))
->options([
_x('M', 'Sexe (M)', 'ccv'),
_x('F', 'Sexe (F)', 'ccv'),
]),
Text::field('age', __('Âge :', 'ccv')),
+ Date::field('birthdate', __('Date de naissance')),
Textarea::field('message', __('Avez vous un message (ou une demande) spécifique à nous formuler ?', 'ccv'))->required(false),
-
- // Special field: if a surgeon is selected, their e-mail address will be override the default delivery address
+ Text::field('size', __('Taille :', 'ccv')),
+ Text::field('weight', __('Poids :', 'ccv')),
+
+ // Social cover
+ Radio::field('social-cover', __('Couverture sociale :', 'ccv'))
+ ->options([
+ __('Sécurité sociale', 'ccv'),
+ __('Assurance privée', 'ccv'),
+ __('Régime de la CMU/ACS', 'ccv'),
+ __('Accident du travail', 'ccv'),
+ ]),
+
+ // Chirurgical solutions
+ Radio::field('chirurgical-solutions', __('Êtes-vous à la recherche de solutions chirurgicales pour votre problème de dos ?', 'ccv'))
+ ->options([
+ __('Oui, s\'il existe des solutions satisfaisantes', 'ccv'),
+ __('Non, pas encore à ce stade', 'ccv'),
+ ]),
+
+ // Special field: if a surgeon is selected, their e-mail address will be override the default delivery address
Select::field('surgeon', __('Chirurgien spécifique', 'ccv'))
->required(false)
->options([
'Dr Caroline HIRSH' => 'dr.hirsch@ccv-montpellier.fr',
]),
+ Date::field('work-accident', __('Si accident de travail à quelle date ? ')),
+
//=== IMAGERY
// This is a special case and will be output manually so only using this for the e-mail label
Radio::field('imagery-type', __('Imagerie', 'ccv'))->required(false),
Binary::field('strength-loss', __('Avez-vous une perte de force importante dans un des membres ?', 'ccv')),
Date::field('strength-loss-date', __('Si oui depuis quand ?', 'ccv'))->required(false),
+ Textarea::field('symptoms', __('Dites-nous en quelques mots ce qui vous invalide le plus dans vos symptômes :', 'ccv')),
+
//=== TREATMENTS
Textarea::field('medication', __('Indiquez ici les médicaments que vous avez pris pour vos douleurs (le cas échéant)', 'ccv'))->required(false),
- Binary::field('kine-osteo', __('Kinésithérapie ou ostéopathie', 'ccv')),
+ Binary::field('kine-osteo', __('Kinésithérapie ou ostéopathie', 'ccv')),
Binary::field('corset', __('Corset ou ceinture lombaire', 'ccv')),
Binary::field('hospitalisation', __('Séjour en hospitalisation', 'ccv')),
Binary::field('infiltration', __('Infiltration ou thermocoagulation', 'ccv')),
- Textarea::field('surgeries', __('Indiquez ici vos précédentes chirurgies de la colonne et leurs dates (le cas échéant)', 'ccv'))->required(false),
-
+ Binary::field('rheumatological', __('Suivi rhumatologique ou médecine spécialisée', 'ccv')),
+ Textarea::field('surgeries', __('Indiquez ici vos précédentes chirurgies de la colonne et leurs dates (le cas échéant)', 'ccv'))->required(false),
+
+ Radio::field('imagery-condition', __('', 'ccv'))
+ ->options([
+ __('J\'ai bien noté que mon dossier ne pourra être étudié si je fournis pas une IRM de moins de 6 mois', 'ccv'),
+ ]),
+
+ Text::field('link_1', __('Lien internet 1', 'ccv')),
+ Text::field('id_1', __('Identifiant', 'ccv')),
+ Password::field('pwd_1', __('Mot de passe', 'ccv')),
+ Text::field('link_2', __('Lien internet 2', 'ccv')),
+ Text::field('id_2', __('Identifiant', 'ccv')),
+ Password::field('pwd_2', __('Mot de passe', 'ccv')),
+ Text::field('link_3', __('Lien internet 3', 'ccv')),
+ Text::field('id_3', __('Identifiant', 'ccv')),
+ Password::field('pwd_3', __('Mot de passe', 'ccv')),
+ Text::field('link_4', __('Lien internet 4', 'ccv')),
+ Text::field('id_4', __('Identifiant', 'ccv')),
+ Password::field('pwd_4', __('Mot de passe', 'ccv')),
]);
}
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- width="30px" height="25px" viewBox="0 0 30 25" style="enable-background:new 0 0 30 25;" xml:space="preserve">
-<style type="text/css">
- .st0{fill:#FFFFFF;}
-</style>
-<g id="Phones-Mobile-Devices_Phone-Actions_phone-actions-ring" transform="translate(-618.833 -488)">
- <g id="Group_52" transform="translate(619.749 488.75)">
- <g id="phone-actions-ring">
- <path class="st0" d="M16.8,23.2c-0.9,0-1.8-0.3-2.7-0.8c0,0,0,0-0.1,0C9.8,19.6,6.2,16,3.4,11.8c-1.3-2-1-4.6,0.7-6.2l0.6-0.6
- c0.8-0.8,2.2-0.8,3,0l2.6,2.6c0.8,0.8,0.8,2.2,0,3C10.1,10.6,10,10.8,10,11c0,0.2,0.1,0.4,0.2,0.5l4.1,4.1c0.3,0.3,0.8,0.3,1.1,0
- c0.8-0.8,2.2-0.8,3,0l2.6,2.6c0.8,0.8,0.8,2.2,0,3l-0.6,0.6C19.3,22.7,18.1,23.2,16.8,23.2z M14.8,21.3
- C14.8,21.3,14.8,21.3,14.8,21.3L14.8,21.3c1.5,1,3.4,0.8,4.6-0.5l0.6-0.6c0.3-0.3,0.3-0.8,0-1.1l-2.6-2.6c-0.3-0.3-0.8-0.3-1.1,0
- c-0.8,0.8-2.2,0.8-3,0l-4.1-4.1c-0.4-0.4-0.6-0.9-0.6-1.5s0.2-1.1,0.6-1.5c0.3-0.3,0.3-0.8,0-1.1L6.7,5.9c-0.3-0.3-0.8-0.3-1.1,0
- L5,6.5C3.8,7.7,3.6,9.6,4.5,11C7.2,15.1,10.7,18.6,14.8,21.3z"/>
- <path class="st0" d="M17.7,13.1c-0.4,0-0.7-0.3-0.7-0.7c0-2-1.6-3.7-3.7-3.7c-0.4,0-0.7-0.3-0.7-0.7c0-0.4,0.3-0.7,0.7-0.7
- c0,0,0,0,0,0c2.8,0,5,2.2,5,5C18.4,12.8,18.1,13.1,17.7,13.1z"/>
- <path class="st0" d="M21.3,13.1c-0.4,0-0.7-0.3-0.7-0.7c0-4-3.3-7.3-7.3-7.3c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7
- c4.7,0,8.6,3.9,8.6,8.6C22,12.8,21.7,13.1,21.3,13.1z"/>
- <path class="st0" d="M24.9,13.1c-0.4,0-0.7-0.3-0.7-0.7c0-6-4.9-10.9-10.9-10.9c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7
- c6.7,0,12.2,5.5,12.2,12.2C25.6,12.8,25.3,13.1,24.9,13.1z"/>
- </g>
- </g>
-</g>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25.346" height="26.605" viewBox="0 0 25.346 26.605">
+ <defs>
+ <clipPath id="clip-path">
+ <rect id="Rectangle_375" data-name="Rectangle 375" width="25.346" height="26.605" fill="none" stroke="#fff" stroke-width="1.5"/>
+ </clipPath>
+ </defs>
+ <g id="Groupe_1253" data-name="Groupe 1253" transform="translate(0 0)">
+ <g id="Groupe_1252" data-name="Groupe 1252" transform="translate(0 0)" clip-path="url(#clip-path)">
+ <path id="Tracé_962" data-name="Tracé 962" d="M6.377,19.14A11.714,11.714,0,0,0,2.524,23.7" transform="translate(0.274 2.076)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
+ <path id="Tracé_963" data-name="Tracé 963" d="M22.5,23.9A11.627,11.627,0,0,0,12,17.25" transform="translate(1.302 1.871)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
+ <path id="Tracé_964" data-name="Tracé 964" d="M12.57,5.25S10.98,9.241,6.993,9.4a5.82,5.82,0,1,0,11.153,0C14.158,9.237,12.57,5.25,12.57,5.25Z" transform="translate(0.732 0.569)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
+ <circle id="Ellipse_115" data-name="Ellipse 115" cx="1.663" cy="1.663" r="1.663" transform="translate(0.831 12.47)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
+ <path id="Tracé_965" data-name="Tracé 965" d="M16.564,17.25a4.157,4.157,0,0,1-8.314,0" transform="translate(0.895 1.871)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
+ <path id="Tracé_966" data-name="Tracé 966" d="M3.75,12.84a3.325,3.325,0,0,1,2.494,3.221v5.819a2.494,2.494,0,0,0,2.494,2.494H10.4a2.5,2.5,0,0,0,2.494-2.494" transform="translate(0.407 1.393)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
+ <path id="Tracé_967" data-name="Tracé 967" d="M3.75,9.895a9.145,9.145,0,0,1,18.29,0v2.3a4.987,4.987,0,0,0,.4,1.964l1.529,3.559a1.662,1.662,0,0,1-.845,2.174,16.115,16.115,0,0,1-3.759,1.115" transform="translate(0.407 0.081)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
+ </g>
+ </g>
</svg>
textarea
@apply bg-white
-input[type="text"], input[type="email"], input[type="number"], select
+input[type="text"], input[type="email"], input[type="number"], input[type="password"], select
appearance: none
border: none
border-radius: 0
--- /dev/null
+.doctors-block
+ margin-bottom: 0
+ .form-field-input
+ gap: 43px 0
+ .img-block
+ width: 112px
+ img
+ width: 100%
// Change icon bg colour when selected
&:checked + .imagery-icon circle
fill: theme('colors.purple')
+
+.imagery-link-block
+ &:nth-child(1),
+ &:nth-child(2)
+ margin-bottom: 124px
+
+.social-cover-block,
+.chirurgical-solutions-block
+ .form-field-input
+ display: flex
+ gap: 1.5rem 0
+ label
+ margin: 0 !important
+
+.social-cover-block,
+.doctors-block
+ .parsley-errors-list
+ bottom: -4em
--- /dev/null
+@php /* @var $form \Cube\Forms\Builder\Form */ @endphp
+
+{{-- DOCTOR --}}
+@if($form->doctors)
+<div class="bg-white py-2v pl-4v pr-3v xs:px-2v">
+ <h2>{{ __('Votre demande', 'ccv') }}</h2>
+
+ <div class="spaced-lg mt-1v">
+ <div class="form-field">
+ <div class="form-field-title font-normal leading-tight mb-8 text-lg">{{ __('Choisissez un chirurgien') }}</div>
+ <div class="doctors-block">
+ <div class="form-field-input form-field-radio custom-checkbox mb-1 form-cols-2">
+ @foreach($form->doctors as $doctor => $infos)
+ <label>
+ <input type="radio" name="doctor" value="{{ $doctor }}" required class="ml-2">
+ <div class="flex align-center form-label">
+ <div class="img-block ml-3"><img src="{{ $infos['url'] }}" /></div>
+ <div class="ml-3 whitespace-normal">
+ <p class="font-normal leading-tight">{{ $doctor }}</p>
+ <span>{{ $infos['legend'] }}</span>
+ </div>
+ </div>
+ </label>
+ @endforeach
+ </div>
+
+ </div>
+ </div>
+ </div>
+</div>
+@endif
+
+@include('partials.content-form')
-{{-- CONSULTATION FORM --}}
@php /* @var $form \Cube\Forms\Builder\Form */ @endphp
-
-{{-- SYMPTOMS --}}
-<div class="bg-light text-block-body py-2v pl-4v pr-3v xs:px-2v">
- <h2>{{ __('1. Vos symptômes', 'ccv') }}</h2>
-
- @php $date_placeholder = __('JJ/MM/AAAA', 'ccv'); @endphp
-
- <div class="form-cols-2 mt-1v">
-
- <ul class="spaced-lg">
- <li>{!! $form->field('main-problem') !!}</li>
- <li>
- {!!
- $form->field('date-first-symptoms', [
- 'placeholder' => $date_placeholder,
- 'class' => 'flex items-center spaced-horizontal',
- 'title_class' => 'mb-0',
- 'input_class' => 'date-field-compact',
- 'flatpickr' => [
- 'maxDate' => 'today'
- ]
- ])
- !!}
- </li>
- <li>
- {!!
- $form->field('date-pain-since', [
- 'placeholder' => $date_placeholder,
- 'class' => 'flex items-center spaced-horizontal',
- 'title_class' => 'mb-0',
- 'input_class' => 'date-field-compact',
- 'flatpickr' => [
- 'maxDate' => 'today'
- ]
- ])
- !!}
- </li>
- <li>
- {!! $form->field('pain-arms-legs') !!}
-
- <div class="form-field mt-6 flex xs:flex-wrap">
- {!! $form->title('pain-arms-legs-detail', ['title_class' => 'pr-4']) !!}
- <div class="custom-checkbox -mt-2v pt-2 xs:mt-0 xs:w-full xs:text-center">
- <div class="pain-areas">
- <img src="@asset('images/consultation-body-outline.svg')" class="consultation-body-outline-image">
-
- <span class="absolute text-2xs font-medium" style="top: 5%; right: 70%">{{ __('Droite', 'ccv') }}</span>
- <span class="absolute text-2xs font-medium" style="top: 5%; left: 69%">{{ __('Gauche', 'ccv') }}</span>
-
- @foreach ($form->get_field('pain-arms-legs-detail')->get_options() as $option)
- <label title="{{ $option }}">
- <input type="checkbox" name="pain-arms-legs-detail[]" value="{{ $option }}">
- <span
- class="form-label">{{-- No label here but the element is needed so custom checkboxes work --}}</span>
- </label>
- @endforeach
- </div>
- </div>
- </div>
-
- </li>
- </ul>
-
- <ul class="spaced-lg">
- <li>{!! $form->field('main-pain') !!}</li>
- <li>{!! $form->field('tingling-numbness') !!}</li>
- <li>
- {!!
- $form->field('tingling-numbness-date', [
- 'placeholder' => $date_placeholder,
- 'class' => 'flex items-center spaced-horizontal',
- 'title_class' => 'mb-0',
- 'input_class' => 'date-field-compact',
- 'flatpickr' => [
- 'maxDate' => 'today'
- ]
- ])
- !!}
- </li>
- <li>{!! $form->field('strength-loss') !!}</li>
- <li>
- {!!
- $form->field('strength-loss-date', [
- 'placeholder' => $date_placeholder,
- 'class' => 'flex items-center spaced-horizontal',
- 'title_class' => 'mb-0',
- 'input_class' => 'date-field-compact',
- 'flatpickr' => [
- 'maxDate' => 'today'
- ]
- ])
- !!}
- </li>
- </ul>
-
- </div>
-
-</div>
-
-{{-- TREATMENTS --}}
-<div class="bg-white py-2v pl-4v pr-3v xs:px-2v">
- <h2>{{ __('2. Vos traitements réalisés', 'ccv') }}</h2>
-
- <div class="spaced-lg mt-1v">
- {!! $form->field('medication', ['title_class' => 'font-light']) !!}
-
- <div class="form-cols-4">
- {!! $form->field('kine-osteo') !!}
- {!! $form->field('corset') !!}
- {!! $form->field('hospitalisation') !!}
- {!! $form->field('infiltration') !!}
- </div>
-
- {!! $form->field('surgeries', ['title_class' => 'font-light']) !!}
- </div>
-
-</div>
-
-{{-- IMAGERY --}}
-<div class="bg-light py-2v pl-4v pr-3v xs:px-2v">
- <h2>{{ __('3. Votre imagerie', 'ccv') }}</h2>
-
- <p class="text-lg my-1v">
- {{ __("IRM, Scanner, Radiographies, faites-nous parvenir vos imageries les plus récentes en utilisant l'une des méthodes suivantes :", 'ccv') }}
- </p>
-
- <div class="form-cols-2">
-
- {{-- IMAGES FROM CD --}}
- <div class="imagery-type-wrapper flex mb-8">
- <input type="radio" id="imagery_cd" name="imagery-type" value="{{ __('Images sur CD (Purview)', 'ccv') }}">
- <label for="imagery_cd" class="imagery-icon">@svg('imagery-cd', 'w-22 md:w-20 sm:w-16')</label>
- <div class="ml-4">
- <div class="text-lg sm:text-base font-normal leading-tight mb-1">
- {{ __('Vos images sont sur un CD ?', 'ccv') }}
- </div>
- <p class="mt-0 sm:text-sm">
- {{ __("Envoyez-nous l'ensemble des fichiers contenus sur votre CD :", "ccv") }}
- </p>
-
- <a href="#purview_uploader" target="_blank" class="btn mt-6" data-lity
- data-update-imagery-type>{{ __('Parcourir', 'ccv') }}</a>
-
- {{-- IMAGE UPLOAD POPUP --}}
- <div id="purview_uploader" class="lity-hide spaced">
-
- <h3 class="text-lg font-body font-normal">
- {{ __('Envoyez vos images au CCV Montpellier en vue d’une téléconsultation', 'ccv') }}
- </h3>
-
- <p>
- {{ __('1. Munissez-vous du CD de votre examen (scanner, IRM, etc) et copiez-le sur votre ordinateur. Un dossier avec le nom du CD va être automatiquement généré.', 'ccv') }}
- </p>
-
- <p>
- {{ __('2. Glissez ce dossier dans la zone ci-dessous. Ou cliquez sur le bouton « Folders and Disks » et sélectionnez le dossier entier correspondant à votre CD.', 'ccv') }}
- <br>
- {{ __('Le téléchargement des images se fait automatiquement.', 'ccv') }}
- </p>
-
- <p>
- {{ __('Les fichiers de scanner et IRM comportent souvent de nombreuses images et le téléchargement peut prendre plusieurs minutes, c’est normal.', 'ccv') }}
- </p>
-
-
- <iframe style="overflow: hidden; margin: 20px auto 0; display: block;" xml="lang" src="https://image-en1.purview.net/dicomuploader.php?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwcm92aWRlclVJRCI6InBhY3NkYnNjbWdlbmVzdGUiLCJwdWJsaWNVUkxTZWNyZXQiOiJGSzcrdTRIeUMyR3VEOG1LTXNpY0JsNnU0S2RLM0dnRHc3ZlQzcSJ9.iLug1aMBnpHbNAXtLjqGZ_uY3bsQpadBIfqVZhUkZj8" height="620" width="100%" scrolling="no" data-service="uploader.purview"></iframe>
-{{-- <iframe class="block w-full overflow-hidden" height="320"--}}
-{{-- src="https://purview.ccv-montpellier.fr/client/scmgeneste/" scrolling="no"--}}
-{{-- data-service="uploader.purview"></iframe>--}}
-
- <p>
- {{ __('3. Une fois vos images envoyées, la barre de chargement disparait et le descriptif des images apparaît. Le CCV Montpellier aura accès de son côté à vos images.', 'ccv') }}
- </p>
-
- <p>
- {{ __('4. Vous pouvez fermer cette fenêtre et terminer de compléter le formulaire de demande d’avis médical.', 'ccv') }}
- </p>
- </div>
-
- </div>
- </div>
-
- {{-- IMAGES ONLINE --}}
- <div class="imagery-type-wrapper flex mb-8">
- <input type="radio" id="imagery_web" name="imagery-type" value="{{ __('Images en ligne', 'ccv') }}">
- <label for="imagery_web" class="imagery-icon">@svg('imagery-web', 'w-22 md:w-20 sm:w-16')</label>
- <div class="ml-4">
- <div class="text-lg sm:text-base font-normal leading-tight mb-1">
- {{ __('Vous avez reçu un lien pour consulter vos images en ligne ?', 'ccv') }}
- </div>
- <p class="mt-0 mb-0! pb-2 sm:text-sm">
- {{ __('Collez votre lien ci-dessous ainsi que vos identifiant et mot de passe :', 'ccv') }}
- </p>
- <textarea name="imagery-online" class="min-h-0 h-20" data-update-imagery-type></textarea>
- </div>
- </div>
-
- {{-- IMAGES FROM PHONE (NAS UPLOAD) --}}
- <div class="imagery-type-wrapper flex mb-8">
- {!! $form->input('imagery-phone-token') !!}
- {{-- ### NOTE: when this option isn't selected, the 'imagery-phone-token' field will be removed from the form --}}
- {{-- This field is matched based on the value of the translated text below, so make sure to update Consultation::pre_process() too --}}
- <input type="radio" id="imagery_phone" name="imagery-type" value="{{ __('Images téléversées depuis portable', 'ccv') }}">
- <label for="imagery_phone" class="imagery-icon">@svg('imagery-phone', 'w-22 md:w-20 sm:w-16')</label>
- <div class="ml-4">
- <div class="text-lg sm:text-base font-normal leading-tight mb-1">
- {{ __('Vous remplissez cette demande depuis votre téléphone ?', 'ccv') }}
- </div>
- <p class="mt-0 sm:text-sm">
- {{ __('Prenez vos images en photo et envoyez-les directement depuis votre téléphone :', 'ccv') }}
- </p>
-
- {{-- Results from AJAX upload (intially hidden) --}}
- <div id="phone_uploads_result" class="hidden text-sm mt-4">
- <p class="font-normal mb-2">
- {{ __('Images téléchargées :', 'ccv') }}
- </p>
- <ul>
- {{-- Populated by AJAX response --}}
- </ul>
- </div>
-
- <a href="#" class="btn mt-6" data-update-imagery-type id="phone-image-browse">{{ __('Parcourir', 'ccv') }}</a>
- </div>
- </div>
-
- {{-- IMAGES SENT BY POST --}}
- <div class="imagery-type-wrapper flex mb-8">
- <input type="radio" id="imagery_post" name="imagery-type" value="{{ __('Images envoyées par courrier', 'ccv') }}">
- <label for="imagery_post" class="imagery-icon">@svg('imagery-post', 'w-22 md:w-20 sm:w-16')</label>
- <div class="ml-4">
- <div class="text-lg sm:text-base font-normal leading-tight mb-1">
- {{ __('Vous pouvez aussi nous envoyer vos images par courrier :', 'ccv') }}
- </div>
- <p class="mt-4 sm:text-sm">
- CCV MONTPELLIER<br>
- AVIS MEDICAL<br>
- Clinique du parc - 50 Rue Emile Combes,<br>
- 34170 Castelnau-le-Lez<br>
- </p>
-
- <div class="custom-checkbox mt-6">
- <label>
- <input type="checkbox" id="images_sent_by_post">
- <span
- class="form-label text-xs">{{ __('Cochez cette case si vous envoyez vos images par courrier', 'ccv') }}</span>
- </label>
- </div>
- </div>
- </div>
- </div>
-
- <p class="text-xs italic">
- {{ __("Aucune demande d’avis ne pourra être étudiée sans imagerie médicale associée.", 'ccv') }}
- </p>
-
-</div>
-
-{{-- CONTACT DETAILS --}}
-<div class="bg-white py-2v pl-4v pr-3v xs:px-2v">
- <h2>{{ __('4. Vos informations', 'ccv') }}</h2>
-
- <div class="form-cols-2 mt-1v">
-
- <div class="spaced-lg">
- {!! $form->field('last-name', ['show_title' => false]) !!}
- {!! $form->field('first-name', ['show_title' => false]) !!}
- {!! $form->field('profession', ['show_title' => false]) !!}
- {!! $form->field('postcode', ['show_title' => false]) !!}
- {!! $form->field('city', ['show_title' => false]) !!}
- {!! $form->field('country', ['show_title' => false]) !!}
- {!! $form->field('phone', ['show_title' => false]) !!}
- {!! $form->field('email', ['show_title' => false]) !!}
- </div>
-
- <div class="spaced-lg">
- {!! $form->field('sex', ['class' => 'flex items-center spaced-horizontal', 'title_class' => 'font-light mb-0']) !!}
- {!! $form->field('age', [
- 'class' => 'flex items-center spaced-horizontal',
- 'title_class' => 'font-light mb-0',
- 'input_class' => 'flex items-center w-16',
- 'placeholder' => '',
- 'field_after' => __('ans', 'ccv')
- ]) !!}
- {!! $form->field('message', ['class' => 'mt-6', 'title_class' => 'font-light']) !!}
-
- <div class="mt-4">
- <div class="custom-checkbox mb-1">
- <label>
- <input type="checkbox" name="send-to-team" value="{{ __('Oui', 'ccv') }}" checked class="ml-2">
- <span class="form-label-reversed">{{ __("J'envoie ma demande à l'équipe du CCV", 'ccv') }}</span>
- </label>
- </div>
- {{ __("ou je souhaite l'envoyer à un chirurgien spécifique :", 'ccv') }}
-
- @php
- // The options for this field contains the e-mail address as the value but we don't want to expose that here
- // so we override options with a new array made up of just their names as both the key and value.
- // Once the form is processed, this will be used to look up the e-mail address.
- $surgeons = array_keys($form->get_field('surgeon')->get_options());
- $surgeons_options = array_combine($surgeons, $surgeons);
- @endphp
- {!! $form->field('surgeon', [
- 'class' => 'mt-4',
- 'show_title' => false,
- 'options' => $surgeons_options,
- 'placeholder' => [
- '' => __('Sélectionner', 'ccv') // First select option
- ]
- ]) !!}
- </div>
- </div>
-
- </div>
-
- {!!
- $form->button(__('Envoyer votre demande', 'ccv'), [
- 'class' => 'btn block mt-1v ml-auto',
- 'loading_text' => __('Envoi en cours...', 'ccv'),
- ])
- !!}
-
-</div>
-
-
-@push('afterform')
- <form action="https://ccvmontpellier34.synology.me/upload.php" id="phone-file-upload-form" method="post"
- enctype="multipart/form-data" style="visibility:hidden;height:1px;position:absolute;top:0;">
- <input type="file" multiple="multiple" name="files[]" id="phone-file-upload-field" accept="image/*" capture/>
- </form>
- <script>
- (function ($) {
- // Clicking browse triggers the file form. It opens the dialog to capture images or browse files
- $('#phone-image-browse').on('click touchend', function () {
- $('#phone-file-upload-field').click();
- });
- // If the field has been updated (e.g not canceled), submit the form
- $('#phone-file-upload-field').on('change', function () {
- var form_data = new FormData();
- var fileInput = document.getElementById('phone-file-upload-field');
-
- // Read selected files
- var totalfiles = fileInput.files.length;
- for (var index = 0; index < totalfiles; index++) {
- form_data.append('files[]', fileInput.files[index]);
- }
- form_data.append('token', '{{ $form->get_field('imagery-phone-token')->get_value() }}');
-
- var form = $('#phone-file-upload-form');
- var button = $('#phone-image-browse');
-
- button.text("{{ __("Chargement des fichiers", 'ccv') }}");
-
- // AJAX request
- $.ajax({
- url: form.attr('action'),
- type: form.attr('method'),
- data: form_data,
- dataType: 'json',
- contentType: false,
- processData: false,
- success: function (response) {
-
- if (parseInt(response.successful_uploads) > 0) {
-
- var $result = $('#phone_uploads_result');
-
- for (var i = 0; i < response.uploads.length; i++) {
- $result.find('ul').append('<li>— ' + response.uploads[i] + '</li>');
- }
-
- $result.show();
- }
-
- setTimeout(function () {
- button.text("{{ __("Parcourir", 'ccv') }}");
- }, 2000);
- button.text("{{ __("Chargement terminé", 'ccv') }}");
- }
- });
-
- return true;
- });
- })(jQuery);
- </script>
-@endpush
-
-{{-- Custom classes for form message container --}}
-@push('message_class')
- py-2v pl-4v pr-3v xs:px-2v
-@endpush
+@include('partials.content-form')
--- /dev/null
+@php /* @var $form \Cube\Forms\Builder\Form */ @endphp
+{{-- SYMPTOMS --}}
+<div class="bg-light text-block-body py-2v pl-4v pr-3v xs:px-2v">
+ <h2>{{ __('1. Vos symptômes', 'ccv') }}</h2>
+
+ @php $date_placeholder = __('JJ/MM/AAAA', 'ccv'); @endphp
+
+ <div class="form-cols-2 mt-1v">
+
+ <ul class="spaced-lg">
+ <li>{!! $form->field('main-problem') !!}</li>
+ <li>
+ {!!
+ $form->field('date-first-symptoms', [
+ 'placeholder' => $date_placeholder,
+ 'class' => 'flex items-center spaced-horizontal',
+ 'title_class' => 'mb-0',
+ 'input_class' => 'date-field-compact',
+ 'flatpickr' => [
+ 'maxDate' => 'today'
+ ]
+ ])
+ !!}
+ </li>
+ <li>
+ {!!
+ $form->field('date-pain-since', [
+ 'placeholder' => $date_placeholder,
+ 'class' => 'flex items-center spaced-horizontal',
+ 'title_class' => 'mb-0',
+ 'input_class' => 'date-field-compact',
+ 'flatpickr' => [
+ 'maxDate' => 'today'
+ ]
+ ])
+ !!}
+ </li>
+ <li>
+ {!! $form->field('pain-arms-legs') !!}
+
+ <div class="form-field mt-6 flex xs:flex-wrap">
+ {!! $form->title('pain-arms-legs-detail', ['title_class' => 'pr-4']) !!}
+ <div class="custom-checkbox -mt-2v pt-2 xs:mt-0 xs:w-full xs:text-center">
+ <div class="pain-areas">
+ <img src="@asset('images/consultation-body-outline.svg')" class="consultation-body-outline-image">
+
+ <span class="absolute text-2xs font-medium" style="top: 5%; right: 70%">{{ __('Droite', 'ccv') }}</span>
+ <span class="absolute text-2xs font-medium" style="top: 5%; left: 69%">{{ __('Gauche', 'ccv') }}</span>
+
+ @foreach ($form->get_field('pain-arms-legs-detail')->get_options() as $option)
+ <label title="{{ $option }}">
+ <input type="checkbox" name="pain-arms-legs-detail[]" value="{{ $option }}">
+ <span
+ class="form-label">{{-- No label here but the element is needed so custom checkboxes work --}}</span>
+ </label>
+ @endforeach
+ </div>
+ </div>
+ </div>
+
+ </li>
+ <li>{!! $form->field('main-pain') !!}</li>
+ </ul>
+
+ <ul class="spaced-lg">
+ <li>{!! $form->field('tingling-numbness') !!}</li>
+ <li>
+ {!!
+ $form->field('tingling-numbness-date', [
+ 'placeholder' => $date_placeholder,
+ 'class' => 'flex items-center spaced-horizontal',
+ 'title_class' => 'mb-0',
+ 'input_class' => 'date-field-compact',
+ 'flatpickr' => [
+ 'maxDate' => 'today'
+ ]
+ ])
+ !!}
+ </li>
+ <li>{!! $form->field('strength-loss') !!}</li>
+ <li>
+ {!!
+ $form->field('strength-loss-date', [
+ 'placeholder' => $date_placeholder,
+ 'class' => 'flex items-center spaced-horizontal',
+ 'title_class' => 'mb-0',
+ 'input_class' => 'date-field-compact',
+ 'flatpickr' => [
+ 'maxDate' => 'today'
+ ]
+ ])
+ !!}
+ </li>
+ {!! $form->field('symptoms', ['title_class' => 'font-light']) !!}
+ </ul>
+
+ </div>
+
+</div>
+
+{{-- TREATMENTS --}}
+<div class="bg-white py-2v pl-4v pr-3v xs:px-2v">
+ <h2>{{ __('2. Vos traitements réalisés', 'ccv') }}</h2>
+
+ <div class="spaced-lg mt-1v">
+ {!! $form->field('medication', ['title_class' => 'font-light']) !!}
+
+ <div class="form-cols-4">
+ {!! $form->field('kine-osteo') !!}
+ {!! $form->field('corset') !!}
+ {!! $form->field('hospitalisation') !!}
+ {!! $form->field('infiltration') !!}
+ </div>
+
+ {!! $form->field('rheumatological') !!}
+
+ {!! $form->field('surgeries', ['title_class' => 'font-light']) !!}
+ </div>
+
+</div>
+
+{{-- IMAGERY --}}
+<div class="bg-light py-2v pl-4v pr-3v xs:px-2v">
+ <h2>{{ __('3. Votre imagerie', 'ccv') }}</h2>
+
+ <div class="custom-checkbox my-1v">
+ <label>
+ <input type="checkbox" name="condition" required>
+ <span
+ class="form-label text-lg font-normal leading-tight">{{ __('J\'ai bien noté que mon dossier ne pourra être étudié si je fournis pas une IRM de moins de 6 mois', 'ccv') }}</span>
+ <span class="text-sm font-normal" style="margin-left: 33px;">{{ __('En cas de pathologies de scoliose, envoyez-nous impérativement une radiographie du rachis en totalité, en place de l\'IRM.', 'cvv') }}</span>
+ </label>
+ </div>
+
+ <p class="text-lg my-1v font-normal leading-tight">
+ {{ __("Faites-nous parvenir également vos imageries les plus récentes (Scanner, Radiographies...) en utilisant l'une des méthodes suivantes :", 'ccv') }}
+ </p>
+
+ <div class="form-cols-2">
+
+ {{-- IMAGES FROM CD --}}
+ <div class="imagery-type-wrapper flex mb-8">
+ <input type="radio" id="imagery_cd" name="imagery-type" value="{{ __('Images sur CD (Purview)', 'ccv') }}">
+ <label for="imagery_cd" class="imagery-icon">@svg('imagery-cd', 'w-22 md:w-20 sm:w-16')</label>
+ <div class="ml-4">
+ <div class="text-lg sm:text-base font-normal leading-tight mb-1">
+ {{ __('Vos images sont sur un CD ?', 'ccv') }}
+ </div>
+ <p class="mt-0 sm:text-sm">
+ {{ __("Envoyez-nous l'ensemble des fichiers contenus sur votre CD :", "ccv") }}
+ </p>
+
+ <a href="#purview_uploader" target="_blank" class="btn mt-6" data-lity
+ data-update-imagery-type>{{ __('Parcourir', 'ccv') }}</a>
+
+ {{-- IMAGE UPLOAD POPUP --}}
+ <div id="purview_uploader" class="lity-hide spaced">
+
+ <h3 class="text-lg font-body font-normal">
+ {{ __('Envoyez vos images au CCV Montpellier en vue d’une téléconsultation', 'ccv') }}
+ </h3>
+
+ <p>
+ {{ __('1. Munissez-vous du CD de votre examen (scanner, IRM, etc) et copiez-le sur votre ordinateur. Un dossier avec le nom du CD va être automatiquement généré.', 'ccv') }}
+ </p>
+
+ <p>
+ {{ __('2. Glissez ce dossier dans la zone ci-dessous. Ou cliquez sur le bouton « Folders and Disks » et sélectionnez le dossier entier correspondant à votre CD.', 'ccv') }}
+ <br>
+ {{ __('Le téléchargement des images se fait automatiquement.', 'ccv') }}
+ </p>
+
+ <p>
+ {{ __('Les fichiers de scanner et IRM comportent souvent de nombreuses images et le téléchargement peut prendre plusieurs minutes, c’est normal.', 'ccv') }}
+ </p>
+
+
+ <iframe style="overflow: hidden; margin: 20px auto 0; display: block;" xml="lang" src="https://image-en1.purview.net/dicomuploader.php?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwcm92aWRlclVJRCI6InBhY3NkYnNjbWdlbmVzdGUiLCJwdWJsaWNVUkxTZWNyZXQiOiJGSzcrdTRIeUMyR3VEOG1LTXNpY0JsNnU0S2RLM0dnRHc3ZlQzcSJ9.iLug1aMBnpHbNAXtLjqGZ_uY3bsQpadBIfqVZhUkZj8" height="620" width="100%" scrolling="no" data-service="uploader.purview"></iframe>
+ {{-- <iframe class="block w-full overflow-hidden" height="320"--}}
+ {{-- src="https://purview.ccv-montpellier.fr/client/scmgeneste/" scrolling="no"--}}
+ {{-- data-service="uploader.purview"></iframe>--}}
+
+ <p>
+ {{ __('3. Une fois vos images envoyées, la barre de chargement disparait et le descriptif des images apparaît. Le CCV Montpellier aura accès de son côté à vos images.', 'ccv') }}
+ </p>
+
+ <p>
+ {{ __('4. Vous pouvez fermer cette fenêtre et terminer de compléter le formulaire de demande d’avis médical.', 'ccv') }}
+ </p>
+ </div>
+
+ </div>
+ </div>
+
+ {{-- IMAGES SENT BY POST --}}
+ <div class="imagery-type-wrapper flex mb-8">
+ <input type="radio" id="imagery_post" name="imagery-type" value="{{ __('Images envoyées par courrier', 'ccv') }}">
+ <label for="imagery_post" class="imagery-icon">@svg('imagery-post', 'w-22 md:w-20 sm:w-16')</label>
+ <div class="ml-4">
+ <div class="text-lg sm:text-base font-normal leading-tight mb-1">
+ {{ __('Vous pouvez aussi nous envoyer vos images par courrier :', 'ccv') }}
+ </div>
+ <p class="mt-4 sm:text-sm">
+ CCV MONTPELLIER<br>
+ AVIS MEDICAL<br>
+ Clinique du parc - 50 Rue Emile Combes,<br>
+ 34170 Castelnau-le-Lez<br>
+ </p>
+
+ <div class="custom-checkbox mt-6">
+ <label>
+ <input type="checkbox" id="images_sent_by_post">
+ <span
+ class="form-label text-xs">{{ __('Cochez cette case si vous envoyez vos images par courrier', 'ccv') }}</span>
+ </label>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="mt-8">
+ {{-- IMAGES ONLINE --}}
+ <div class="imagery-type-wrapper mb-8">
+ <div class="flex mb-8">
+ <input type="radio" id="imagery_web" name="imagery-type" value="{{ __('Images en ligne', 'ccv') }}">
+ <label for="imagery_web" class="imagery-icon">@svg('imagery-web', 'w-22 md:w-20 sm:w-16')</label>
+ <div class="ml-4">
+ <div class="text-lg sm:text-base font-normal leading-tight mb-1">
+ {{ __('Vous avez reçu un lien pour consulter vos images en ligne ?', 'ccv') }}
+ </div>
+ <p class="mt-0 mb-0! pb-2 sm:text-sm">
+ {{ __('Collez votre lien ci-dessous ainsi que vos identifiant et mot de passe :', 'ccv') }}
+ </p>
+ </div>
+ </div>
+ <div class="ml-4">
+ <div class="form-cols-2 flex">
+ @for($i = 1; $i < 5; $i++)
+ <div class="mb-8 spaced-lg imagery-link-block">
+ {!! $form->field("link_$i", ['show_title' => false]) !!}
+ {!! $form->field("id_$i", ['show_title' => false]) !!}
+ {!! $form->field("pwd_$i", ['show_title' => false]) !!}
+ </div>
+ @endfor
+ </div>
+ </div>
+ </div>
+ </div>
+ <p class="text-xs italic ml-4">
+ {{ __("Aucune demande d’avis ne pourra être étudiée sans imagerie médicale associée.", 'ccv') }}
+ </p>
+</div>
+
+
+{{-- CONTACT DETAILS --}}
+<div class="bg-white py-2v pl-4v pr-3v xs:px-2v">
+ <h2>{{ __('4. Vos informations', 'ccv') }}</h2>
+
+ <div class="form-cols-2 mt-1v">
+
+ <div class="spaced-lg">
+ {!! $form->field('last-name', ['show_title' => false]) !!}
+ {!! $form->field('first-name', ['show_title' => false]) !!}
+ {!! $form->field('sex', ['class' => 'flex items-center spaced-horizontal', 'title_class' => 'font-light mb-0']) !!}
+ <div class="flex spaced-horizontal justify-between">
+ {!! $form->field('size', [
+ 'class' => 'flex items-center spaced-horizontal',
+ 'title_class' => 'font-light mb-0',
+ 'input_class' => 'flex items-center w-24',
+ 'placeholder' => '',
+ 'field_after' => __('cm', 'ccv')
+ ]) !!}
+ {!! $form->field('weight', [
+ 'class' => 'flex items-center spaced-horizontal',
+ 'title_class' => 'font-light mb-0',
+ 'input_class' => 'flex items-center w-24',
+ 'placeholder' => '',
+ 'field_after' => __('kg', 'ccv')
+ ]) !!}
+ </div>
+ {!! $form->field('profession', ['show_title' => false]) !!}
+ <div class="social-cover-block">
+ {!! $form->field('social-cover', [
+ 'class' => 'flex spaced-horizontal flex-wrap',
+ 'input_class' => 'form-cols-2 m-0'
+ ]) !!}
+ </div>
+ {!! $form->field('work-accident', [
+ 'class' => 'flex items-center spaced-horizontal',
+ 'placeholder' => $date_placeholder,
+ 'title_class' => 'font-light mb-0',
+ ]) !!}
+ {!! $form->field('postcode', ['show_title' => false]) !!}
+ {!! $form->field('city', ['show_title' => false]) !!}
+ {!! $form->field('country', ['show_title' => false]) !!}
+ </div>
+
+ <div class="spaced-lg">
+ {!! $form->field('phone', ['show_title' => false]) !!}
+ {!! $form->field('email', ['show_title' => false]) !!}
+ <div class="chirurgical-solutions-block">
+ {!! $form->field('chirurgical-solutions', [
+ 'input_class' => 'flex flex-col'
+ ]) !!}
+ </div>
+ {!! $form->field('message', ['class' => 'mt-6', 'title_class' => 'font-light']) !!}
+
+ <div class="mt-4">
+ <div class="custom-checkbox mb-1">
+ <label>
+ <input type="checkbox" name="send-to-team" value="{{ __('Oui', 'ccv') }}" checked class="ml-2">
+ <span class="form-label-reversed">{{ __("J'envoie ma demande à l'équipe du CCV", 'ccv') }}</span>
+ </label>
+ </div>
+ {{ __("ou je souhaite l'envoyer à un chirurgien spécifique :", 'ccv') }}
+
+ @php
+ // The options for this field contains the e-mail address as the value but we don't want to expose that here
+ // so we override options with a new array made up of just their names as both the key and value.
+ // Once the form is processed, this will be used to look up the e-mail address.
+ $surgeons = array_keys($form->get_field('surgeon')->get_options());
+ $surgeons_options = array_combine($surgeons, $surgeons);
+ @endphp
+ {!! $form->field('surgeon', [
+ 'class' => 'mt-4',
+ 'show_title' => false,
+ 'options' => $surgeons_options,
+ 'placeholder' => [
+ '' => __('Sélectionner', 'ccv') // First select option
+ ]
+ ]) !!}
+ </div>
+ </div>
+
+ </div>
+
+ {!!
+ $form->button(__('Envoyer votre demande', 'ccv'), [
+ 'class' => 'btn block mt-1v ml-auto',
+ 'loading_text' => __('Envoi en cours...', 'ccv'),
+ ])
+ !!}
+
+</div>
+
+
+@push('afterform')
+ <form action="https://ccvmontpellier34.synology.me/upload.php" id="phone-file-upload-form" method="post"
+ enctype="multipart/form-data" style="visibility:hidden;height:1px;position:absolute;top:0;">
+ <input type="file" multiple="multiple" name="files[]" id="phone-file-upload-field" accept="image/*" capture/>
+ </form>
+ <script>
+ (function ($) {
+ // Clicking browse triggers the file form. It opens the dialog to capture images or browse files
+ $('#phone-image-browse').on('click touchend', function () {
+ $('#phone-file-upload-field').click();
+ });
+ // If the field has been updated (e.g not canceled), submit the form
+ $('#phone-file-upload-field').on('change', function () {
+ var form_data = new FormData();
+ var fileInput = document.getElementById('phone-file-upload-field');
+
+ // Read selected files
+ var totalfiles = fileInput.files.length;
+ for (var index = 0; index < totalfiles; index++) {
+ form_data.append('files[]', fileInput.files[index]);
+ }
+ form_data.append('token', '{{ $form->get_field('imagery-phone-token')->get_value() }}');
+
+ var form = $('#phone-file-upload-form');
+ var button = $('#phone-image-browse');
+
+ button.text("{{ __("Chargement des fichiers", 'ccv') }}");
+
+ // AJAX request
+ $.ajax({
+ url: form.attr('action'),
+ type: form.attr('method'),
+ data: form_data,
+ dataType: 'json',
+ contentType: false,
+ processData: false,
+ success: function (response) {
+
+ if (parseInt(response.successful_uploads) > 0) {
+
+ var $result = $('#phone_uploads_result');
+
+ for (var i = 0; i < response.uploads.length; i++) {
+ $result.find('ul').append('<li>— ' + response.uploads[i] + '</li>');
+ }
+
+ $result.show();
+ }
+
+ setTimeout(function () {
+ button.text("{{ __("Parcourir", 'ccv') }}");
+ }, 2000);
+ button.text("{{ __("Chargement terminé", 'ccv') }}");
+ }
+ });
+
+ return true;
+ });
+ })(jQuery);
+ </script>
+@endpush
+
+{{-- Custom classes for form message container --}}
+@push('message_class')
+ py-2v pl-4v pr-3v xs:px-2v
+@endpush