b87999a8b0d73c254121aebbe3d7.php 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. /* SensioDistributionBundle:Configurator/Step:secret.html.twig */
  3. class __TwigTemplate_ab1eb87999a8b0d73c254121aebbe3d7 extends Twig_Template
  4. {
  5. protected $parent;
  6. public function __construct(Twig_Environment $env)
  7. {
  8. parent::__construct($env);
  9. $this->parent = array();
  10. $this->blocks = array(
  11. 'title' => array($this, 'block_title'),
  12. 'content' => array($this, 'block_content'),
  13. );
  14. }
  15. public function getParent(array $context)
  16. {
  17. $parent = "SensioDistributionBundle::Configurator/layout.html.twig";
  18. if ($parent instanceof Twig_Template) {
  19. $name = $parent->getTemplateName();
  20. $this->parent[$name] = $parent;
  21. $parent = $name;
  22. } elseif (!isset($this->parent[$parent])) {
  23. $this->parent[$parent] = $this->env->loadTemplate($parent);
  24. }
  25. return $this->parent[$parent];
  26. }
  27. protected function doDisplay(array $context, array $blocks = array())
  28. {
  29. $context = array_merge($this->env->getGlobals(), $context);
  30. $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
  31. }
  32. // line 3
  33. public function block_title($context, array $blocks = array())
  34. {
  35. echo "Symfony - Configure global Secret";
  36. }
  37. // line 5
  38. public function block_content($context, array $blocks = array())
  39. {
  40. // line 6
  41. echo " ";
  42. echo $this->env->getExtension('form')->setTheme($this->getContext($context, 'form'), array("SensioDistributionBundle::Configurator/form.html.twig", ));
  43. // line 7
  44. echo " ";
  45. $this->env->loadTemplate("SensioDistributionBundle::Configurator/steps.html.twig")->display(array_merge($context, array("index" => $this->getContext($context, 'index'), "count" => $this->getContext($context, 'count'))));
  46. // line 8
  47. echo "
  48. <h1>Global Secret</h1>
  49. <p>Configure the global secret for your website (the secret is used for the CSRF protection among other things):</p>
  50. ";
  51. // line 12
  52. echo $this->env->getExtension('form')->renderErrors($this->getContext($context, 'form'));
  53. echo "
  54. <form action=\"";
  55. // line 13
  56. echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_configurator_step", array("index" => $this->getContext($context, 'index'))), "html");
  57. echo " \" method=\"POST\">
  58. <div class=\"symfony-form-row\">
  59. ";
  60. // line 15
  61. echo $this->env->getExtension('form')->renderLabel($this->getAttribute($this->getContext($context, 'form'), "secret", array(), "any", false));
  62. echo "
  63. <div class=\"symfony-form-field\">
  64. ";
  65. // line 17
  66. echo $this->env->getExtension('form')->renderWidget($this->getAttribute($this->getContext($context, 'form'), "secret", array(), "any", false));
  67. echo "
  68. <a class=\"symfony-button-grey\" href=\"#\" onclick=\"generateSecret(); return false;\">Generate</a>
  69. <div class=\"symfony-form-errors\">
  70. ";
  71. // line 20
  72. echo $this->env->getExtension('form')->renderErrors($this->getAttribute($this->getContext($context, 'form'), "secret", array(), "any", false));
  73. echo "
  74. </div>
  75. </div>
  76. </div>
  77. ";
  78. // line 25
  79. echo $this->env->getExtension('form')->renderRest($this->getContext($context, 'form'));
  80. echo "
  81. <div class=\"symfony-form-footer\">
  82. <p><input type=\"submit\" value=\"Next Step\" class=\"symfony-button-grey\" /></p>
  83. <p>* mandatory fields</p>
  84. </div>
  85. </form>
  86. <script type=\"text/javascript\">
  87. function generateSecret()
  88. {
  89. var result = '';
  90. for (i=0; i < 32; i++) {
  91. result += Math.round(Math.random()*16).toString(16);
  92. }
  93. document.getElementById('distributionbundle_secret_step_secret').value = result;
  94. }
  95. </script>
  96. ";
  97. }
  98. public function getTemplateName()
  99. {
  100. return "SensioDistributionBundle:Configurator/Step:secret.html.twig";
  101. }
  102. public function isTraitable()
  103. {
  104. return false;
  105. }
  106. }