<?php


?>

<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />

    <title>Was This Helpful Feedback</title>

    <link rel="shortcut icon" href="/resources/img/favicon.ico" />

    <!-- Stylesheets -->
    <link rel="stylesheet" href="/resources/bootstrap/3.3.6/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/resources/font-awesome/css/font-awesome.min.css"/>
    <!--<link rel="stylesheet" href="https://cdn.wolterskluwer.io/wk.css/0.13.x/with-bootstrap.min.css" type="text/css"/>-->
    <style>
		body {
			background-color: #555;
		}
		#wth-title {
			margin-left: 15px;
		}
		h1 {
			color: #fff;
			font-size: 18px;
		}
		#wth-closebutton {
			float:right;
			padding: 10px 10px 0px 0px;
		}
		.fa-close {
			color: #fff;
		}
		.submitbtn {
			font-family: 'Roboto', sans-serif;
		}
	</style>
    <!-- Javascript -->
</head>


<body id="mainBody">
		<!-- ===== Header ===== -->
    <div class="container-fluid">
		<div class="row">
			<div id="wth-title">
				<div style="display:inline-block"><h1 id="greeting"></h1></div>
				<div style="display:inline-block" id="wth-closebutton"><a href="#" onclick="parent.hideIframe();"><i class="fa fa-close fa-lg"></i></a></div>
			</div>
		</div>


		<form name="contactform" method="post" action="thankyou.php?">
			<input type="hidden" class="form-control" id="url" name="url" />
			<input type="hidden" class="form-control" id="helpful" name="helpful" />

			<div class="form-group">
				<div class="input-group">
					<textarea rows="5" cols="45" class="form-control" id="comment" name="comment" value=url placeholder="Optional: Please let us know how we can improve this page."></textarea>
				</div>
			</div>

			<button type="submit"
					id="feedbackSubmit"
					class="btn btn-success btn-lg"
					data-loading-text="Sending..."
					style="display: block; margin-top: 10px; text-align:right" onclick="parent.hideIframe();parent.hideHelpfulPodShowThankyou();">
				<i class="fa fa-send-o pull-left">&nbsp;<span class="submitbtn">&nbsp;Submit</span></i>
			</button>

		</form>

		<!-- ===== Contact Form ===== -->

<script>
	document.getElementById("url").value = document.referrer;
	var wthValue = getParamValue('wth');
	document.getElementById("helpful").value = wthValue;
	if (wthValue == "true") {
		document.getElementById("greeting").innerHTML = "Glad we could help!";
	} else {
		document.getElementById("greeting").innerHTML = "Sorry you didnt find what you need.";
	}

	function getParamValue(paramName)
	{
		var url = window.location.search.substring(1); //get rid of "?" in querystring
		var qArray = url.split('&'); //get key-value pairs
		for (var i = 0; i < qArray.length; i++)
		{
			var pArr = qArray[i].split('='); //split key and value
			if (pArr[0] == paramName)
				return pArr[1]; //return value
		}
	}
</script>
</body>

</html>
