<link href="assets/css/pages/wizard/wizard-4.css" rel="stylesheet" type="text/css" />

<!-- begin:: Content -->
						<div class="kt-container  kt-container--fluid  kt-grid__item kt-grid__item--fluid">
							<div class="kt-wizard-v4" id="kt_wizard_v4" data-ktwizard-state="step-first">

								<!--begin: Form Wizard Nav -->
								<div class="kt-wizard-v4__nav">
									<div class="kt-wizard-v4__nav-items">

										<!--doc: Replace A tag with SPAN tag to disable the step link click -->
										<div class="kt-wizard-v4__nav-item" data-ktwizard-type="step" data-ktwizard-state="current">
											<div class="kt-wizard-v4__nav-body">
												<div class="kt-wizard-v4__nav-number">
													1
												</div>
												<div class="kt-wizard-v4__nav-label">
													<div class="kt-wizard-v4__nav-label-title">
														Nuova campagna
													</div>
													<div class="kt-wizard-v4__nav-label-desc">
														Dettagli campagna
													</div>
												</div>
											</div>
										</div>
										<div class="kt-wizard-v4__nav-item" data-ktwizard-type="step">
											<div class="kt-wizard-v4__nav-body">
												<div class="kt-wizard-v4__nav-number">
													2
												</div>
												<div class="kt-wizard-v4__nav-label">
													<div class="kt-wizard-v4__nav-label-title">
														Layout campagna
													</div>
													<div class="kt-wizard-v4__nav-label-desc">
														Carica gli asset grafici
													</div>
												</div>
											</div>
										</div>
										<div class="kt-wizard-v4__nav-item" data-ktwizard-type="step">
											<div class="kt-wizard-v4__nav-body">
												<div class="kt-wizard-v4__nav-number">
													3
												</div>
												<div class="kt-wizard-v4__nav-label">
													<div class="kt-wizard-v4__nav-label-title">
														Domande e sharing
													</div>
													<div class="kt-wizard-v4__nav-label-desc">
														Fase pre-form
													</div>
												</div>
											</div>
										</div>
										<div class="kt-wizard-v4__nav-item" data-ktwizard-type="step">
											<div class="kt-wizard-v4__nav-body">
												<div class="kt-wizard-v4__nav-number">
													4
												</div>
												<div class="kt-wizard-v4__nav-label">
													<div class="kt-wizard-v4__nav-label-title">
														Profilazione post-form
													</div>
													<div class="kt-wizard-v4__nav-label-desc">
														Profilazione dettagliata
													</div>
												</div>
											</div>
										</div>
										<div class="kt-wizard-v4__nav-item" data-ktwizard-type="step">
											<div class="kt-wizard-v4__nav-body">
												<div class="kt-wizard-v4__nav-number">
													5
												</div>
												<div class="kt-wizard-v4__nav-label">
													<div class="kt-wizard-v4__nav-label-title">
														Personalizza il form
													</div>
													<div class="kt-wizard-v4__nav-label-desc">
														Modulo e salvataggio
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>

								<!--end: Form Wizard Nav -->
								<div class="kt-portlet">
									<div class="kt-portlet__body kt-portlet__body--fit">
										<div class="kt-grid">
											<div class="kt-grid__item kt-grid__item--fluid kt-wizard-v4__wrapper">

												<!--begin: Form Wizard Form-->
												<form class="kt-form" id="kt_form" action="be_services/campaigns/create_campaign.php" enctype="multipart/form-data" method="POST">

													<!--begin: Form Wizard Step 1-->
													<div class="kt-wizard-v4__content" data-ktwizard-type="step-content" data-ktwizard-state="current">
														<div class="kt-heading kt-heading--md">Dati di base della campagna</div>
														<div class="kt-form__section kt-form__section--first">
															<div class="kt-wizard-v4__form">
																<div class="form-group">
																	<label>Nome della campagna</label>
													<input type="text" class="form-control" name="campaignName" placeholder="Inserisci il nome della campagna">
																</div>
																<div class="form-group">
																	<label>Link campagna (gli spazi saranno sostituiti da trattini) - NON potrà essere modificato</label>
													<input type="text" class="form-control" name="campaignLink" placeholder="Inserisci il link della campagna">
																</div>

																<div class="form-group">
																	<label>Titolo della campagna (TITLE pagina)</label>
													<input type="text" class="form-control" name="campaignTitle" placeholder="Inserisci il titolo">
																</div>

																<div class="form-group">
																	<label>Descrizione della campagna (DESCRIPTION pagina)</label>
													<input type="text" class="form-control" name="campaignDescription" placeholder="Inserisci la descrizione">
																</div>

																<div class="form-group">
																	<label>Azienda promotrice della campagna</label>
													<input type="text" class="form-control" name="agencyName" placeholder="Inserisci il nome dell'azienda">
																</div>
																<div class="form-group">
																	<label>Utente / Cliente campagna</label>
													<select class="form-control kt-select2" id="kt_select2_2" name="campaignOwner">
													<option></option>
<?php
													$setClienti = $connection->query("SELECT * FROM customers ORDER BY name ASC");
													while($set = $setClienti->fetch())
													{
													?>
														<option value="<?php echo $set['id']; ?>"><?php echo $set['name']; ?></option>
													<?php	
													}
													?>
												</select>
																</div>
																<div class="form-group">
																	<label>Lingua della campagna</label>
													<select class="form-control kt-select2" id="kt_select2_3" name="campaignLanguage">
													<option></option>
<?php
													$setClienti = $connection->query("SELECT * FROM languages ORDER BY name ASC");
													while($set = $setClienti->fetch())
													{
													?>
														<option value="<?php echo $set['id']; ?>"><?php echo $set['name']; ?></option>
													<?php	
													}
													?>
												</select>
																</div>

																<div class="form-group">
																	<label>Colore principale</label>
																<input class="form-control" type="color" value="#006acc" id="main-color" name="main-color">
															</div>
																<div class="form-group">
																	<label>Colore bordi</label>
																<input class="form-control" type="color" value="#0084ff" id="border-color" name="border-color">
															</div>

<!-- TODO: usare range invece di due campi separati
	<div class="form-group">
																	<label>Validità campagna</label>
																	<input type="text" class="form-control" name="campaignStartDate" id="kt_daterangepicker_1" readonly placeholder="Seleziona la data" />
																</div>
															-->
																<div class="form-group">
																	<label>Inizio campagna</label>
																	<input type="text" class="form-control" name="campaignStartDate" id="kt_datetimepicker_1" readonly placeholder="Seleziona la data" />
																</div>
																<div class="form-group">
																	<label>Fine campagna</label>
																	<input type="text" class="form-control" name="campaignEndDate" id="kt_datetimepicker_2" readonly placeholder="Seleziona la data" />
																</div>
																
															</div>
														</div>
													</div>
													
											
										

													<!--end: Form Wizard Step 1-->

													<!--begin: Form Wizard Step 2-->
													<div class="kt-wizard-v4__content" data-ktwizard-type="step-content">
														<div class="kt-heading kt-heading--md">Carica gli elementi grafici per la campagna</div>
														<div class="kt-form__section kt-form__section--first">
															<div class="kt-wizard-v4__form">
																<div class="form-group row">
											<label class="col-form-label col-lg-3 col-sm-12">Immagine di sfondo - 1920x1080</label>
											<div class="col-lg-9 col-md-9 col-sm-12">
												<div class="dropzone dropzone-default" id="kt_dropzone_1">
													<div class="dropzone-msg dz-message needsclick">
														<h3 class="dropzone-msg-title">Drop files here or click to upload.</h3>
														<span class="dropzone-msg-desc"></span>
													</div>
												</div>
											</div>
										</div>
																<div class="form-group row">
											<label class="col-form-label col-lg-3 col-sm-12">Immagine frontale (desktop) - 480x600</label>
											<div class="col-lg-9 col-md-9 col-sm-12">
												<div class="dropzone dropzone-default" id="kt_dropzone_2">
													<div class="dropzone-msg dz-message needsclick">
														<h3 class="dropzone-msg-title">Drop files here or click to upload.</h3>
														<span class="dropzone-msg-desc"></span>
													</div>
												</div> 
											</div>
										</div>

										<div class="form-group row">
											<label class="col-form-label col-lg-3 col-sm-12">Immagine frontale (mobile) - 720x200</label>
											<div class="col-lg-9 col-md-9 col-sm-12">
												<div class="dropzone dropzone-default" id="kt_dropzone_3">
													<div class="dropzone-msg dz-message needsclick">
														<h3 class="dropzone-msg-title">Drop files here or click to upload.</h3>
														<span class="dropzone-msg-desc"></span>
													</div>
												</div> 
											</div>
										</div>

										<div class="form-group row">
											<label class="col-form-label col-lg-3 col-sm-12">Regolamento</label>
											<div class="col-lg-9 col-md-9 col-sm-12">
												<div class="dropzone dropzone-default" id="kt_dropzone_4">
													<div class="dropzone-msg dz-message needsclick">
														<h3 class="dropzone-msg-title">Drop files here or click to upload.</h3>
														<span class="dropzone-msg-desc"></span>
													</div>
												</div>
											</div>
										</div>

										<div class="form-group row">
											<label class="col-form-label col-lg-3 col-sm-12">Privacy policy</label>
											<div class="col-lg-9 col-md-9 col-sm-12">
												<div class="dropzone dropzone-default" id="kt_dropzone_5">
													<div class="dropzone-msg dz-message needsclick">
														<h3 class="dropzone-msg-title">Drop files here or click to upload.</h3>
														<span class="dropzone-msg-desc"></span>
													</div>
												</div>
											</div>
										</div>

										<div class="form-group row">
											<label class="col-form-label col-lg-3 col-sm-12">Cookie Policy</label>
											<div class="col-lg-9 col-md-9 col-sm-12">
												<div class="dropzone dropzone-default" id="kt_dropzone_6">
													<div class="dropzone-msg dz-message needsclick">
														<h3 class="dropzone-msg-title">Drop files here or click to upload.</h3>
														<span class="dropzone-msg-desc"></span>
													</div>
												</div>
											</div>
										</div>
																
																
														</div>
													</div>
												</div>

													<!--end: Form Wizard Step 2-->

													<!--begin: Form Wizard Step 3-->
													<div class="kt-wizard-v4__content" data-ktwizard-type="step-content">
														<div class="kt-heading kt-heading--md">Opzioni sharing Whatsapp</div>
<div class="form-group row">
<label class="col-3 col-form-label">Testo condivisione</label>
													<div class="col-9">
														<input type="text" name="sharingText" size="50">
													</div>
												</div>


<div class="form-group row">
					<label class="col-3 col-form-label">Set di commenti</label>									
				<div class=" col-lg-4 col-md-9 col-sm-12">
												
												<select class="form-control kt-select2" id="kt_select2_1" name="comment_set">
													<option></option>
<?php
													$setCommenti = $connection->query("SELECT * FROM comments_sets ORDER BY set_name ASC");
													while($set = $setCommenti->fetch())
													{
													?>
														<option value="<?php echo $set['id']; ?>"><?php echo $set['set_name']; ?></option>
													<?php	
													}
													?>
												</select>
											</div>									
												
</div>

<div class="form-group row">
					<label class="col-3 col-form-label">Set di redirect</label>									
				<div class=" col-lg-4 col-md-9 col-sm-12">
												
												<select class="form-control kt-select2" id="kt_select2_1" name="redirect_set">
													<option></option>
<?php
													$setRedirect = $connection->query("SELECT * FROM redirect_sets ORDER BY set_name ASC");
													while($set = $setRedirect->fetch())
													{
													?>
														<option value="<?php echo $set['id']; ?>"><?php echo $set['set_name']; ?></option>
													<?php	
													}
													?>
												</select>
											</div>									
												
</div>

														<div class="kt-heading kt-heading--md">Opzioni raccolta risposte</div>
<div class="form-group row">
														<label class="col-3 col-form-label">Salva le risposte</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" name="saveAnswer">
																<span></span>
															</label>
														</span>
													</div>
												
</div>
														<div class="kt-heading kt-heading--md">Seleziona un set di domande</div>

														<div class="form-group row">
											
											<div class=" col-lg-4 col-md-9 col-sm-12">
												
												<select class="form-control kt-select2" id="kt_select2_1" name="question_set">
													<option></option>
<?php
													$setDomande = $connection->query("SELECT * FROM questions_sets ORDER BY set_name ASC");
													while($set = $setDomande->fetch())
													{
													?>
														<option value="<?php echo $set['id']; ?>"><?php echo $set['set_name']; ?></option>
													<?php	
													}
													?>
												</select>
											</div>
										</div>

														
												</div>

													<!--end: Form Wizard Step 3-->

													<!--begin: Form Wizard Step 4-->
													<div class="kt-wizard-v4__content" data-ktwizard-type="step-content">
														<div class="kt-heading kt-heading--md">Opzioni raccolta risposte</div>
<div class="form-group row">
														<label class="col-3 col-form-label">Abilitare la profilazione?</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" name="saveAnswerAfter" class="switchProfilazione">
																<span></span>
															</label>
														</span>
													</div>
												
</div>

<div class="profilazione" style="display:none">
														<div class="kt-heading kt-heading--md">Seleziona un set di domande</div>

														<div class="form-group row">
											
											<div class=" col-lg-4 col-md-9 col-sm-12">
												
												<select class="form-control kt-select2" id="kt_select2_1" name="question_set_after">
													<option></option>
<?php
													$setDomande = $connection->query("SELECT * FROM profilation_sets ORDER BY set_name ASC");
													while($set = $setDomande->fetch())
													{
													?>
														<option value="<?php echo $set['id']; ?>"><?php echo $set['set_name']; ?></option>
													<?php	
													}
													?>
												</select>
											</div>
										</div>

														

</div>

												</div>

													<!--end: Form Wizard Step 4-->


													<!--begin: Form Wizard Step 5-->
													<div class="kt-wizard-v4__content" data-ktwizard-type="step-content">
														<div class="kt-heading kt-heading--md">Imposta i campi del form</div>
														<div class="kt-form__section kt-form__section--first">
															<div class="kt-wizard-v4__review">
																<div class="kt-wizard-v4__review-item">
																	<div class="kt-wizard-v4__review-title">
																		Impostazione campi raccolta dati
																	</div>
																	<div class="kt-wizard-v4__review-content">
																		<div class="form-group row">
																			<label class="col-3 col-form-label">Sesso</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_sesso">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">Nome</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_nome">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">Cognome</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_cognome">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">Email</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_email">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">Data di nascita</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_nascita">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">Nazione</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_nazione">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">CAP</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_cap">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">Città</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_citta">
																<span></span>
															</label>
														</span>
													</div>
												</div>

												<div class="form-group row">

													<label class="col-3 col-form-label">Cellulare</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_cellulare">
																<span></span>
															</label>
														</span>
													</div>
												</div>
																	</div>
																</div>
																<div class="kt-wizard-v4__review-item">
																	<div class="kt-wizard-v4__review-title">
																		Impostazione accettazione privacy
																	</div>
																	
																	<?php 
																	for($pr = 1; $pr <= 8; $pr++)
																	{
																	?>

																	<div class="form-group row">

													<label class="col-3 col-form-label">Privacy <?php echo $pr; ?></label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_privacy<?php echo $pr; ?>">
																<span></span>
															</label>
														</span>
													</div>
												</div>

<?php 																		
																	}
																	?>

												<!-- <div class="form-group row">

													<label class="col-3 col-form-label">Privacy 2</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_privacy2">
																<span></span>
															</label>
														</span>
													</div>
												</div>
											-->
<!--
												<div class="form-group row">

													<label class="col-3 col-form-label">Privacy 3</label>
													<div class="col-3">
														<span class="kt-switch kt-switch--icon">
															<label>
																<input type="checkbox" checked="checked" name="f_privacy3">
																<span></span>
															</label>
														</span>
													</div>
												</div>
																
															-->
																</div>
															</div>
														</div>
													</div>

													<!--end: Form Wizard Step 4-->

													<!--begin: Form Actions -->
													<div class="kt-form__actions">
														<button class="btn btn-secondary btn-md btn-tall btn-wide kt-font-bold kt-font-transform-u" data-ktwizard-type="action-prev">
															Indietro
														</button>
														<button class="btn btn-success btn-md btn-tall btn-wide kt-font-bold kt-font-transform-u" data-ktwizard-type="action-submit">
															Crea campagna
														</button>
														<button class="btn btn-brand btn-md btn-tall btn-wide kt-font-bold kt-font-transform-u" data-ktwizard-type="action-next">
															Prosegui
														</button>
													</div>

													<!--end: Form Actions -->
												</form>

												<!--end: Form Wizard Form-->
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>

