File: /var/www/vhosts/creativefellows.nl/inekehamoen.creativefellows.nl/views/view.image.php
<?php
/*
* Get Header
*/
$show_header_spacer = false;
$header_class = "";
require_once 'inc/header.php';
/*
* Image
*/
$html = '<div class="grid-container">';
$html .= '<div class="grid-x grid-padding-x">';
// decription
$html .= '<div class="cell small-12 medium-6">';
$html .= '<h1 class="page__title page__title--text-left">'. $work->image(0)->name() .'</h1>';
$html .= $work->image(0)->description();
$html .= '</div>';
// image
$html .= '<div class="cell small-12 medium-6 portfolio__item portfolio__item--offset-1 ">';
$html .= $work->image(0)->image();
$html .= '</div>';
if( $cassetteForm = $data["cassette"]->getForm(2) )
{
$html .= '<div class="cell small-12 medium-12">';
// form has response
$has_valid_response = isset($_GET["h"]) && isset($_GET["id"]) ? $data["cassette"]->hasValidResponse($_GET["h"],$_GET["id"]) : false;
// form html
$html .= '<div class="grid-x grid-padding-x align-middle page__order-item">';
// $html .= '<div class="cell small-12">';
// $html .= '<h2>'. $cassetteForm->getFormName().'</h2>';
// $html .= '</div>';
if(isset($_GET["ReCaptcha"]) && $_GET["ReCaptcha"] == 0){
$html .= $data["config"]->getCaptchaError();
}
// Show response
if($has_valid_response === true)
{
$html .= '<div class="small-12 cell form-response">';
$html .= $cassetteForm->getResponseMessage();
$html .= '</div>';
}
// Show form
else
{
$html .= '<div class="cell small-12">';
$html .= '<h2>'. $cassetteForm->getFormName().'</h2>';
$html .= '</div>';
$html .= '<div class="cell small-12 form-outer" id="contact-general">';
$html .= str_replace(
["{afbeelding}","{fotonaam}","{project}"],
[$work->image(0)->imageUrl(),$work->image(0)->name(),$work->name()],
$cassetteForm->getFormHtml("","small-12 medium-6")
);
$html .= '</div>';
}
$html .= '</div>';
$html .= '</div>';
}
$html .= '</div>';
$html .= '</div>';
echo $data["config"]->wrapAsSection($html,null,"portfolio");
/*
* Get Footer
*/
require_once 'inc/footer.php';
?>