var/cache/dev/twig/04/04ca017ca3ef4032be60148ffc6e3c0df0ebf137f2e5cdadaed509ca665fa250.php line 50

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* theme_learts/register.html.twig */
  14. class __TwigTemplate_d31099ca551c4ded88df6498d1c7ce4e2db858361d516cc9b7b3506a394d227d extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'extracss' => [$this'block_extracss'],
  24.             'pageheader' => [$this'block_pageheader'],
  25.             'wrapper' => [$this'block_wrapper'],
  26.             'javascript' => [$this'block_javascript'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return $this->loadTemplate((("theme_" twig_constant("config_theme")) . "/base.html.twig"), "theme_learts/register.html.twig"1);
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""theme_learts/register.html.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""theme_learts/register.html.twig"));
  41.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  44.         
  45.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  46.     }
  47.     // line 3
  48.     public function block_extracss($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""extracss"));
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""extracss"));
  55.         // line 4
  56.         echo "    <style type=\"text/css\">
  57. \t\tlabel {
  58. \t\t\tcursor: pointer;
  59. \t\t\tmargin-bottom: .25rem;
  60. \t\t}
  61.     </style>
  62. ";
  63.         
  64.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  65.         
  66.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  67.     }
  68.     // line 12
  69.     public function block_pageheader($context, array $blocks = [])
  70.     {
  71.         $macros $this->macros;
  72.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  73.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageheader"));
  74.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  75.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageheader"));
  76.         
  77.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  78.         
  79.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  80.     }
  81.     // line 14
  82.     public function block_wrapper($context, array $blocks = [])
  83.     {
  84.         $macros $this->macros;
  85.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  86.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""wrapper"));
  87.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  88.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""wrapper"));
  89.         // line 15
  90.         echo "    <div class=\"page-header section\" style=\"background-image: url('/assets/theme_";
  91.         echo twig_escape_filter($this->envtwig_constant("config_theme"), "html"nulltrue);
  92.         echo "/img/bg2.jpg');\">
  93.         <div class=\"filter\"></div>
  94.         <div class=\"container\" style=\"margin-top:100px;\">
  95.             <div class=\"row\">
  96.                 <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\">
  97.                     <form autocomplete=\"off\" method=\"post\">
  98.                         ";
  99.         // line 22
  100.         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"falsefalsefalse22)) {
  101.             // line 23
  102.             echo "                            <div class=\"mb-3 text-center text-bold\">
  103.                                 Du er allerede logget inn som ";
  104.             // line 24
  105.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse24), "username", [], "any"falsefalsefalse24), "html"nulltrue);
  106.             echo ", <a class=\"text-bold\" href=\"";
  107.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
  108.             echo "\">Logg ut!</a>
  109.                             </div>
  110.                         ";
  111.         } else {
  112.             // line 27
  113.             echo "
  114.                             <h1 class=\"h3 mb-3 font-weight-normal\">Oppgi ønsket brukernavn og passord</h1>
  115.                             <div class=\"row\">
  116.                                 <div class=\"col-lg-6\">
  117.                                     <label for=\"inputEmail\">Brukernavn</label>
  118.                                     <input autocomplete=\"off\" type=\"email\" placeholder=\"Din email-adresse\" value=\"\" name=\"email\" id=\"inputEmail\" class=\"form-control mb-4\" required autofocus>
  119.                                 </div>
  120.                                 <div class=\"col-lg-6\">
  121.                                     <label for=\"inputPassword\">Passord</label>
  122.                                     <input autocomplete=\"off\" type=\"password\" placeholder=\"Ditt passord\" name=\"password\" id=\"inputPassword\" class=\"form-control mb-4\" required>
  123.                                 </div>
  124.                             </div>
  125.                             <div class=\"row\">
  126.                                 <div class=\"col-lg-4\">
  127.                                     <label for=\"inputFirstname\">Fornavn</label>
  128.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"firstname\" id=\"inputFirstname\" class=\"form-control mb-4\" required>
  129.                                 </div>
  130.                                 <div class=\"col-lg-5\">
  131.                                     <label for=\"inputLastname\">Etternavn</label>
  132.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"lastname\" id=\"inputLastname\" class=\"form-control mb-4\" required>
  133.                                 </div>
  134.                                 <div class=\"col-lg-3\">
  135.                                     <label for=\"inputPhone\">Mobil</label>
  136.                                     <input autocomplete=\"off\" type=\"number\" value=\"\" name=\"phone\" id=\"inputPhone\" class=\"form-control mb-4\" required>
  137.                                 </div>
  138.                             </div>
  139.                             <div class=\"row\">
  140.                                 <div class=\"col-lg-5\">
  141.                                     <label>Adresse</label>
  142.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"address\" class=\"form-control mb-4\" required>
  143.                                 </div>
  144.                                 <div class=\"col-lg-2\">
  145.                                     <label>Postnr</label>
  146.                                     <input onchange=\"findPostalname(this.value)\" autocomplete=\"off\" type=\"number\" value=\"\" name=\"postalnumber\" class=\"form-control mb-4\" required>
  147.                                 </div>
  148.                                 <div class=\"col-lg-5\">
  149.                                     <label>Poststed</label>
  150.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"postalname\" class=\"form-control mb-4\" required>
  151.                                 </div>
  152.                             </div>
  153.                             <button class=\"btn btn-lg btn-success\" type=\"submit\">
  154.                                 Registrèr meg!
  155.                             </button>
  156.                             <div class=\"row mt-4\">
  157.                                 <div class=\"col-lg-12 text-center\">
  158.                                     <a class=\"text-bold\" href=\"";
  159.             // line 74
  160.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
  161.             echo "\">
  162.                                         Logg inn!
  163.                                     </a>
  164.                                 </div>
  165.                             </div>
  166.                         ";
  167.         }
  168.         // line 81
  169.         echo "                    </form>
  170.                     <div class=\"mt-3 text-danger\">
  171.                         <a class=\"text-bold\">
  172.                             ";
  173.         // line 84
  174.         echo (isset($context["message"]) || array_key_exists("message"$context) ? $context["message"] : (function () { throw new RuntimeError('Variable "message" does not exist.'84$this->source); })());
  175.         echo "
  176.                         </a>
  177.                     </div>
  178.                 </div>
  179.             </div>
  180.         </div>
  181.     </div>
  182. ";
  183.         
  184.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  185.         
  186.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  187.     }
  188.     // line 93
  189.     public function block_javascript($context, array $blocks = [])
  190.     {
  191.         $macros $this->macros;
  192.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  193.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  194.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  195.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  196.         // line 94
  197.         echo "<script>
  198. \tfunction titleCase(string) {
  199. \treturn string[0].toUpperCase() + string.slice(1).toLowerCase();
  200. }
  201. \tfunction findPostalname(pnr) {
  202. \t\$('[name=\"postalname\"]').LoadingOverlay('show');
  203. \t\$.get('/ajax/findPostalname/' + pnr, function(json) {
  204. \ttry {
  205. \tlogg(json);
  206. \t\$('[name=\"postalname\"]').LoadingOverlay('hide');
  207. \tif (json.response.valid === true) {
  208. \tvar postalname = titleCase(json.response.result);
  209. \t\$('[name=\"postalname\"]').val(postalname);
  210. } else {
  211. \t\$('[name=\"postalname\"]').val('#####');
  212. }
  213. } catch(e) {
  214. \tconsole.log(e);
  215. }
  216. });
  217. }
  218. </script>
  219. ";
  220.         
  221.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  222.         
  223.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  224.     }
  225.     public function getTemplateName()
  226.     {
  227.         return "theme_learts/register.html.twig";
  228.     }
  229.     public function isTraitable()
  230.     {
  231.         return false;
  232.     }
  233.     public function getDebugInfo()
  234.     {
  235.         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,);
  236.     }
  237.     public function getSourceContext()
  238.     {
  239.         return new Source("{% extends 'theme_' ~ constant('config_theme') ~ '/base.html.twig' %}
  240. {% block extracss %}
  241.     <style type=\"text/css\">
  242. \t\tlabel {
  243. \t\t\tcursor: pointer;
  244. \t\t\tmargin-bottom: .25rem;
  245. \t\t}
  246.     </style>
  247. {% endblock %}
  248. {% block pageheader %}{% endblock %}
  249. {% block wrapper %}
  250.     <div class=\"page-header section\" style=\"background-image: url('/assets/theme_{{ constant('config_theme') }}/img/bg2.jpg');\">
  251.         <div class=\"filter\"></div>
  252.         <div class=\"container\" style=\"margin-top:100px;\">
  253.             <div class=\"row\">
  254.                 <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\">
  255.                     <form autocomplete=\"off\" method=\"post\">
  256.                         {% if app.user %}
  257.                             <div class=\"mb-3 text-center text-bold\">
  258.                                 Du er allerede logget inn som {{ app.user.username }}, <a class=\"text-bold\" href=\"{{ path('app_logout') }}\">Logg ut!</a>
  259.                             </div>
  260.                         {% else %}
  261.                             <h1 class=\"h3 mb-3 font-weight-normal\">Oppgi ønsket brukernavn og passord</h1>
  262.                             <div class=\"row\">
  263.                                 <div class=\"col-lg-6\">
  264.                                     <label for=\"inputEmail\">Brukernavn</label>
  265.                                     <input autocomplete=\"off\" type=\"email\" placeholder=\"Din email-adresse\" value=\"\" name=\"email\" id=\"inputEmail\" class=\"form-control mb-4\" required autofocus>
  266.                                 </div>
  267.                                 <div class=\"col-lg-6\">
  268.                                     <label for=\"inputPassword\">Passord</label>
  269.                                     <input autocomplete=\"off\" type=\"password\" placeholder=\"Ditt passord\" name=\"password\" id=\"inputPassword\" class=\"form-control mb-4\" required>
  270.                                 </div>
  271.                             </div>
  272.                             <div class=\"row\">
  273.                                 <div class=\"col-lg-4\">
  274.                                     <label for=\"inputFirstname\">Fornavn</label>
  275.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"firstname\" id=\"inputFirstname\" class=\"form-control mb-4\" required>
  276.                                 </div>
  277.                                 <div class=\"col-lg-5\">
  278.                                     <label for=\"inputLastname\">Etternavn</label>
  279.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"lastname\" id=\"inputLastname\" class=\"form-control mb-4\" required>
  280.                                 </div>
  281.                                 <div class=\"col-lg-3\">
  282.                                     <label for=\"inputPhone\">Mobil</label>
  283.                                     <input autocomplete=\"off\" type=\"number\" value=\"\" name=\"phone\" id=\"inputPhone\" class=\"form-control mb-4\" required>
  284.                                 </div>
  285.                             </div>
  286.                             <div class=\"row\">
  287.                                 <div class=\"col-lg-5\">
  288.                                     <label>Adresse</label>
  289.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"address\" class=\"form-control mb-4\" required>
  290.                                 </div>
  291.                                 <div class=\"col-lg-2\">
  292.                                     <label>Postnr</label>
  293.                                     <input onchange=\"findPostalname(this.value)\" autocomplete=\"off\" type=\"number\" value=\"\" name=\"postalnumber\" class=\"form-control mb-4\" required>
  294.                                 </div>
  295.                                 <div class=\"col-lg-5\">
  296.                                     <label>Poststed</label>
  297.                                     <input autocomplete=\"off\" type=\"text\" value=\"\" name=\"postalname\" class=\"form-control mb-4\" required>
  298.                                 </div>
  299.                             </div>
  300.                             <button class=\"btn btn-lg btn-success\" type=\"submit\">
  301.                                 Registrèr meg!
  302.                             </button>
  303.                             <div class=\"row mt-4\">
  304.                                 <div class=\"col-lg-12 text-center\">
  305.                                     <a class=\"text-bold\" href=\"{{ path('app_login') }}\">
  306.                                         Logg inn!
  307.                                     </a>
  308.                                 </div>
  309.                             </div>
  310.                         {% endif %}
  311.                     </form>
  312.                     <div class=\"mt-3 text-danger\">
  313.                         <a class=\"text-bold\">
  314.                             {{ message | raw }}
  315.                         </a>
  316.                     </div>
  317.                 </div>
  318.             </div>
  319.         </div>
  320.     </div>
  321. {% endblock %}
  322. {% block javascript %}
  323. <script>
  324. \tfunction titleCase(string) {
  325. \treturn string[0].toUpperCase() + string.slice(1).toLowerCase();
  326. }
  327. \tfunction findPostalname(pnr) {
  328. \t\$('[name=\"postalname\"]').LoadingOverlay('show');
  329. \t\$.get('/ajax/findPostalname/' + pnr, function(json) {
  330. \ttry {
  331. \tlogg(json);
  332. \t\$('[name=\"postalname\"]').LoadingOverlay('hide');
  333. \tif (json.response.valid === true) {
  334. \tvar postalname = titleCase(json.response.result);
  335. \t\$('[name=\"postalname\"]').val(postalname);
  336. } else {
  337. \t\$('[name=\"postalname\"]').val('#####');
  338. }
  339. } catch(e) {
  340. \tconsole.log(e);
  341. }
  342. });
  343. }
  344. </script>
  345. {% endblock %}
  346. ""theme_learts/register.html.twig""/var/www/html/webtoprint/SymfonyTemplate/templates/theme_learts/register.html.twig");
  347.     }
  348. }