<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* theme_learts/register.html.twig */
class __TwigTemplate_d31099ca551c4ded88df6498d1c7ce4e2db858361d516cc9b7b3506a394d227d extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'extracss' => [$this, 'block_extracss'],
'pageheader' => [$this, 'block_pageheader'],
'wrapper' => [$this, 'block_wrapper'],
'javascript' => [$this, 'block_javascript'],
];
}
protected function doGetParent(array $context)
{
// line 1
return $this->loadTemplate((("theme_" . twig_constant("config_theme")) . "/base.html.twig"), "theme_learts/register.html.twig", 1);
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "theme_learts/register.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "theme_learts/register.html.twig"));
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_extracss($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extracss"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extracss"));
// line 4
echo " <style type=\"text/css\">
\t\tlabel {
\t\t\tcursor: pointer;
\t\t\tmargin-bottom: .25rem;
\t\t}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 12
public function block_pageheader($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageheader"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageheader"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 14
public function block_wrapper($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "wrapper"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "wrapper"));
// line 15
echo " <div class=\"page-header section\" style=\"background-image: url('/assets/theme_";
echo twig_escape_filter($this->env, twig_constant("config_theme"), "html", null, true);
echo "/img/bg2.jpg');\">
<div class=\"filter\"></div>
<div class=\"container\" style=\"margin-top:100px;\">
<div class=\"row\">
<div class=\"col-lg-8 offset-lg-2 col-md-8 offset-md-2 col-10 offset-1 p-4 border rounded p-2 bg-white text-black-50\">
<form autocomplete=\"off\" method=\"post\">
";
// line 22
if (twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 22, $this->source); })()), "user", [], "any", false, false, false, 22)) {
// line 23
echo " <div class=\"mb-3 text-center text-bold\">
Du er allerede logget inn som ";
// line 24
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 24, $this->source); })()), "user", [], "any", false, false, false, 24), "username", [], "any", false, false, false, 24), "html", null, true);
echo ", <a class=\"text-bold\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
echo "\">Logg ut!</a>
</div>
";
} else {
// line 27
echo "
<h1 class=\"h3 mb-3 font-weight-normal\">Oppgi ønsket brukernavn og passord</h1>
<div class=\"row\">
<div class=\"col-lg-6\">
<label for=\"inputEmail\">Brukernavn</label>
<input autocomplete=\"off\" type=\"email\" placeholder=\"Din email-adresse\" value=\"\" name=\"email\" id=\"inputEmail\" class=\"form-control mb-4\" required autofocus>
</div>
<div class=\"col-lg-6\">
<label for=\"inputPassword\">Passord</label>
<input autocomplete=\"off\" type=\"password\" placeholder=\"Ditt passord\" name=\"password\" id=\"inputPassword\" class=\"form-control mb-4\" required>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-4\">
<label for=\"inputFirstname\">Fornavn</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"firstname\" id=\"inputFirstname\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-5\">
<label for=\"inputLastname\">Etternavn</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"lastname\" id=\"inputLastname\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-3\">
<label for=\"inputPhone\">Mobil</label>
<input autocomplete=\"off\" type=\"number\" value=\"\" name=\"phone\" id=\"inputPhone\" class=\"form-control mb-4\" required>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-5\">
<label>Adresse</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"address\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-2\">
<label>Postnr</label>
<input onchange=\"findPostalname(this.value)\" autocomplete=\"off\" type=\"number\" value=\"\" name=\"postalnumber\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-5\">
<label>Poststed</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"postalname\" class=\"form-control mb-4\" required>
</div>
</div>
<button class=\"btn btn-lg btn-success\" type=\"submit\">
Registrèr meg!
</button>
<div class=\"row mt-4\">
<div class=\"col-lg-12 text-center\">
<a class=\"text-bold\" href=\"";
// line 74
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
echo "\">
Logg inn!
</a>
</div>
</div>
";
}
// line 81
echo " </form>
<div class=\"mt-3 text-danger\">
<a class=\"text-bold\">
";
// line 84
echo (isset($context["message"]) || array_key_exists("message", $context) ? $context["message"] : (function () { throw new RuntimeError('Variable "message" does not exist.', 84, $this->source); })());
echo "
</a>
</div>
</div>
</div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 93
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 94
echo "<script>
\tfunction titleCase(string) {
\treturn string[0].toUpperCase() + string.slice(1).toLowerCase();
}
\tfunction findPostalname(pnr) {
\t\$('[name=\"postalname\"]').LoadingOverlay('show');
\t\$.get('/ajax/findPostalname/' + pnr, function(json) {
\ttry {
\tlogg(json);
\t\$('[name=\"postalname\"]').LoadingOverlay('hide');
\tif (json.response.valid === true) {
\tvar postalname = titleCase(json.response.result);
\t\$('[name=\"postalname\"]').val(postalname);
} else {
\t\$('[name=\"postalname\"]').val('#####');
}
} catch(e) {
\tconsole.log(e);
}
});
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "theme_learts/register.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 230 => 94, 220 => 93, 202 => 84, 197 => 81, 187 => 74, 138 => 27, 130 => 24, 127 => 23, 125 => 22, 114 => 15, 104 => 14, 86 => 12, 70 => 4, 60 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'theme_' ~ constant('config_theme') ~ '/base.html.twig' %}
{% block extracss %}
<style type=\"text/css\">
\t\tlabel {
\t\t\tcursor: pointer;
\t\t\tmargin-bottom: .25rem;
\t\t}
</style>
{% endblock %}
{% block pageheader %}{% endblock %}
{% block wrapper %}
<div class=\"page-header section\" style=\"background-image: url('/assets/theme_{{ constant('config_theme') }}/img/bg2.jpg');\">
<div class=\"filter\"></div>
<div class=\"container\" style=\"margin-top:100px;\">
<div class=\"row\">
<div class=\"col-lg-8 offset-lg-2 col-md-8 offset-md-2 col-10 offset-1 p-4 border rounded p-2 bg-white text-black-50\">
<form autocomplete=\"off\" method=\"post\">
{% if app.user %}
<div class=\"mb-3 text-center text-bold\">
Du er allerede logget inn som {{ app.user.username }}, <a class=\"text-bold\" href=\"{{ path('app_logout') }}\">Logg ut!</a>
</div>
{% else %}
<h1 class=\"h3 mb-3 font-weight-normal\">Oppgi ønsket brukernavn og passord</h1>
<div class=\"row\">
<div class=\"col-lg-6\">
<label for=\"inputEmail\">Brukernavn</label>
<input autocomplete=\"off\" type=\"email\" placeholder=\"Din email-adresse\" value=\"\" name=\"email\" id=\"inputEmail\" class=\"form-control mb-4\" required autofocus>
</div>
<div class=\"col-lg-6\">
<label for=\"inputPassword\">Passord</label>
<input autocomplete=\"off\" type=\"password\" placeholder=\"Ditt passord\" name=\"password\" id=\"inputPassword\" class=\"form-control mb-4\" required>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-4\">
<label for=\"inputFirstname\">Fornavn</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"firstname\" id=\"inputFirstname\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-5\">
<label for=\"inputLastname\">Etternavn</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"lastname\" id=\"inputLastname\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-3\">
<label for=\"inputPhone\">Mobil</label>
<input autocomplete=\"off\" type=\"number\" value=\"\" name=\"phone\" id=\"inputPhone\" class=\"form-control mb-4\" required>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-5\">
<label>Adresse</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"address\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-2\">
<label>Postnr</label>
<input onchange=\"findPostalname(this.value)\" autocomplete=\"off\" type=\"number\" value=\"\" name=\"postalnumber\" class=\"form-control mb-4\" required>
</div>
<div class=\"col-lg-5\">
<label>Poststed</label>
<input autocomplete=\"off\" type=\"text\" value=\"\" name=\"postalname\" class=\"form-control mb-4\" required>
</div>
</div>
<button class=\"btn btn-lg btn-success\" type=\"submit\">
Registrèr meg!
</button>
<div class=\"row mt-4\">
<div class=\"col-lg-12 text-center\">
<a class=\"text-bold\" href=\"{{ path('app_login') }}\">
Logg inn!
</a>
</div>
</div>
{% endif %}
</form>
<div class=\"mt-3 text-danger\">
<a class=\"text-bold\">
{{ message | raw }}
</a>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascript %}
<script>
\tfunction titleCase(string) {
\treturn string[0].toUpperCase() + string.slice(1).toLowerCase();
}
\tfunction findPostalname(pnr) {
\t\$('[name=\"postalname\"]').LoadingOverlay('show');
\t\$.get('/ajax/findPostalname/' + pnr, function(json) {
\ttry {
\tlogg(json);
\t\$('[name=\"postalname\"]').LoadingOverlay('hide');
\tif (json.response.valid === true) {
\tvar postalname = titleCase(json.response.result);
\t\$('[name=\"postalname\"]').val(postalname);
} else {
\t\$('[name=\"postalname\"]').val('#####');
}
} catch(e) {
\tconsole.log(e);
}
});
}
</script>
{% endblock %}
", "theme_learts/register.html.twig", "/var/www/html/webtoprint/SymfonyTemplate/templates/theme_learts/register.html.twig");
}
}