Permalink
Browse files

added a global variable for the website name

  • Loading branch information...
1 parent ef1c4f1 commit a9958c77ca93f20c5554fbd8ead3d14a61e0e018 @tzikis committed Mar 24, 2012
@@ -38,7 +38,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="{{ path('AceEditorBundle_homepage')}}">clouduino</a>
+ <a class="brand" href="{{ path('AceEditorBundle_homepage')}}">{{ site_name }}</a>
<div class="nav-collapse">
<ul class="nav">
<li id="homepage"><a href="{{ path('AceEditorBundle_homepage')}}">Home</a></li>
@@ -1601,7 +1601,7 @@ protected function getSecurity_Firewall_Map_Context_MainService()
$p = new \Symfony\Component\Security\Http\Firewall\LogoutListener($b, $o, '/logout', '/', NULL);
$p->addHandler(new \Symfony\Component\Security\Http\Logout\SessionLogoutHandler());
- return $this->services['security.firewall.map.context.main'] = new \Symfony\Bundle\SecurityBundle\Security\FirewallContext(array(0 => new \Symfony\Component\Security\Http\Firewall\ChannelListener($n, new \Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint(), $a), 1 => new \Symfony\Component\Security\Http\Firewall\ContextListener($b, array(0 => $this->get('ace_experimental_user.experimental_provider')), 'main', $a, $c), 2 => $p, 3 => new \Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener($b, $e, new \Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy('migrate'), $o, 'main', array('check_path' => '/login_check', 'login_path' => '/login', 'use_forward' => false, 'always_use_default_target_path' => false, 'default_target_path' => '/', 'target_path_parameter' => '_target_path', 'use_referer' => false, 'failure_path' => NULL, 'failure_forward' => false, 'username_parameter' => '_username', 'password_parameter' => '_password', 'csrf_parameter' => '_csrf_token', 'intention' => 'authenticate', 'post_only' => true), NULL, NULL, $a, $c, $this->get('form.csrf_provider')), 4 => new \Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener($b, '4f6df79f8630f', $a), 5 => new \Symfony\Component\Security\Http\Firewall\AccessListener($b, $this->get('security.access.decision_manager'), $n, $e, $a)), new \Symfony\Component\Security\Http\Firewall\ExceptionListener($b, $this->get('security.authentication.trust_resolver'), $o, new \Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint($this->get('http_kernel'), $o, '/login', false), NULL, NULL, $a));
+ return $this->services['security.firewall.map.context.main'] = new \Symfony\Bundle\SecurityBundle\Security\FirewallContext(array(0 => new \Symfony\Component\Security\Http\Firewall\ChannelListener($n, new \Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint(), $a), 1 => new \Symfony\Component\Security\Http\Firewall\ContextListener($b, array(0 => $this->get('ace_experimental_user.experimental_provider')), 'main', $a, $c), 2 => $p, 3 => new \Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener($b, $e, new \Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy('migrate'), $o, 'main', array('check_path' => '/login_check', 'login_path' => '/login', 'use_forward' => false, 'always_use_default_target_path' => false, 'default_target_path' => '/', 'target_path_parameter' => '_target_path', 'use_referer' => false, 'failure_path' => NULL, 'failure_forward' => false, 'username_parameter' => '_username', 'password_parameter' => '_password', 'csrf_parameter' => '_csrf_token', 'intention' => 'authenticate', 'post_only' => true), NULL, NULL, $a, $c, $this->get('form.csrf_provider')), 4 => new \Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener($b, '4f6e314718137', $a), 5 => new \Symfony\Component\Security\Http\Firewall\AccessListener($b, $this->get('security.access.decision_manager'), $n, $e, $a)), new \Symfony\Component\Security\Http\Firewall\ExceptionListener($b, $this->get('security.authentication.trust_resolver'), $o, new \Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint($this->get('http_kernel'), $o, '/login', false), NULL, NULL, $a));
}
/**
@@ -2146,6 +2146,7 @@ protected function getTwigService()
$instance->addExtension(new \Symfony\Bridge\Twig\Extension\YamlExtension());
$instance->addExtension(new \Symfony\Bridge\Twig\Extension\FormExtension(array(0 => 'form_div_layout.html.twig')));
$instance->addExtension(new \Symfony\Bundle\AsseticBundle\Twig\AsseticExtension($this->get('assetic.asset_factory'), true, array()));
+ $instance->addGlobal('site_name', 'd3vflugenhagen232ster-uino');
return $instance;
}
@@ -2386,7 +2387,7 @@ protected function getSecurity_Access_DecisionManagerService()
*/
protected function getSecurity_Authentication_ManagerService()
{
- return $this->services['security.authentication.manager'] = new \Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager(array(0 => new \Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider($this->get('ace_experimental_user.experimental_provider'), $this->get('fos_user.user_checker'), 'main', $this->get('security.encoder_factory'), true), 1 => new \Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider('4f6df79f8630f')));
+ return $this->services['security.authentication.manager'] = new \Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager(array(0 => new \Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider($this->get('ace_experimental_user.experimental_provider'), $this->get('fos_user.user_checker'), 'main', $this->get('security.encoder_factory'), true), 1 => new \Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider('4f6e314718137')));
}
/**
@@ -1641,7 +1641,7 @@
</argument>
<argument type="service">
<service class="Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider" public="false">
- <argument>4f6df79f8630f</argument>
+ <argument>4f6e314718137</argument>
</service>
</argument>
</argument>
@@ -1897,7 +1897,7 @@
<argument type="service">
<service class="Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener" public="false">
<argument type="service" id="security.context"/>
- <argument>4f6df79f8630f</argument>
+ <argument>4f6e314718137</argument>
<argument type="service" id="monolog.logger.security"/>
</service>
</argument>
@@ -2115,6 +2115,10 @@
</service>
</argument>
</call>
+ <call method="addGlobal">
+ <argument>site_name</argument>
+ <argument>d3vflugenhagen232ster-uino</argument>
+ </call>
</service>
<service id="twig.loader" class="Symfony\Bundle\TwigBundle\Loader\FilesystemLoader">
<argument type="service" id="templating.locator"/>
Binary file not shown.
@@ -69,13 +69,22 @@ function validat()
//TODO: add check if passwords match when new_pass changes
function validinput(id)
{
-\tif(id==\"new_pass\")
+\tif(id==\"new_pass\" || id==\"confirm_pass\")
\t{
-\t\tvar len = \$(\"#\"+id).val().length;
-\t\tif (len == 0)
-\t\t\treturn 2; //TODO: could use the same number for zero length input on both password fields
+\t\tif(id==\"new_pass\")
+\t\t\tvar other=\"confirm_pass\";
+\t\telse
+\t\t\tvar other=\"new_pass\";
+\t\t
+\t\tif(\$(\"#\"+id).val() == \$(\"#\"+other).val())
+\t\t{
+\t\t\tvar len = \$(\"#\"+id).val().length;
+\t\t\tif (len == 0)
+\t\t\t\treturn 2; //zero length pass
+\t\t\t\t
+\t\t}
\t\telse if (len < 6 || len > 15)
-\t\t\treturn 3;
+\t\t\treturn 3; //out of range of min/max characters
\t\telse
\t\t{
\t\t\tvar regnum = /.*\\d/;
@@ -91,11 +100,12 @@ function validinput(id)
\t\t\t\t\tsets++;
\t\t\t}
\t\t\tif (sets < 3)
-\t\t\t\treturn 4;
+\t\t\t\treturn 4; //less than 3 charsets in pass
\t\t\telse
-\t\t\t\treturn 1;
+\t\t\t\treturn 1; //valid pass
\t\t}
\t}
+\t/*
\telse if(id==\"confirm_pass\")
\t{
\t\tif (\$(\"#\"+id).val().length > 0)
@@ -110,11 +120,13 @@ function validinput(id)
\t\telse
\t\t\treturn 8;
\t}
+\t*/
\telse if(id==\"old_pass\")
\t{
\t\t//TODO:Ajax post request for a match;
\t}
-\telse if(id==\"email\")
+\t/*
+\telse if(id==\"email\") //using type=\"email\" instead
\t{
\t\tif (\$(\"#\"+id).val().length != 0)
\t\t{
@@ -127,6 +139,7 @@ function validinput(id)
\t\telse
\t\t\treturn 9;
\t}
+\t*/
\telse
\t{
\t\t//no valid id
@@ -144,9 +157,9 @@ function validation(inputid)
\t\t\$(\".newpass-info\").html('');
\t\tbreak;
\tcase 2:
-\t\t\$(\".newpassword\").removeClass(\"error\").removeClass(\"success\");
-\t\t\$(\".password_signs\").removeClass(\"icon-ok\").removeClass(\"icon-remove\").addClass(\"icon-exclamation-sign\");
-\t\t\$(\".newpass-info\").html('');\t\t\t\t\t\t
+\t\t\$(\".passwords\").removeClass(\"error\").removeClass(\"success\");
+\t\t\$(\".password_signs , .password_confirm\").removeClass(\"icon-ok\").removeClass(\"icon-remove\").addClass(\"icon-exclamation-sign\");\t\t\t
+\t\t\$(\".newpass-info, .confirmpass-info\").html('');
\t\tbreak;
\tcase 3:
\t\t\$(\".passwords\").addClass(\"error\").removeClass(\"success\");
@@ -254,7 +267,7 @@ function myfunc()
</script>
Change your details, then click 'save' to save your changes.<br /><br />
<form name=\"form\" id=\"form\" action=\"";
- // line 219
+ // line 232
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("AceEditorBundle_homepage"), "html", null, true);
echo "\">
<div class=\"row-fluid\">
@@ -265,7 +278,7 @@ function myfunc()
\t\t\t\t<div class=\"input-prepend\">
\t\t\t\t\t<span class=\"add-on\">\t<i class=\"icon-user\"></i></span>
\t\t\t\t\t<input class=\"input-large\" type=\"text\" name=\"username\" id=\"uname\" value=\"";
- // line 227
+ // line 240
echo twig_escape_filter($this->env, $this->getContext($context, "username"), "html", null, true);
echo "\" disabled/>
\t\t\t\t</div>
@@ -277,7 +290,7 @@ function myfunc()
\t\t\t\t<div class=\"input-prepend\">
\t\t\t\t\t<span class=\"add-on\">F</span>
\t\t\t\t\t<input class=\"input-large\" type=\"text\" name=\"firstname\" id=\"fname\" value=\"";
- // line 236
+ // line 249
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "settings"), "getFirstname", array(), "method"), "html", null, true);
echo "\" />
\t\t\t\t</div>
@@ -289,7 +302,7 @@ function myfunc()
\t\t\t\t<div class=\"input-prepend\">
\t\t\t\t\t<span class=\"add-on\">L</span>
\t\t\t\t\t<input class=\"input-large\" type=\"text\" name=\"lastname\" id=\"lname\" value=\"";
- // line 245
+ // line 258
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "settings"), "getLastname", array(), "method"), "html", null, true);
echo "\" />
\t\t\t\t</div>
@@ -301,7 +314,7 @@ function myfunc()
\t\t\t\t<div class=\"input-prepend\">
\t\t\t\t\t<span class=\"add-on\">\t<i class=\"icon-envelope\"></i></span>
\t\t\t\t\t<input class=\"input-large\" type=\"email\" name=\"email\" id=\"email\" value=\"";
- // line 254
+ // line 267
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "settings"), "getEmail", array(), "method"), "html", null, true);
echo "\" required/>
\t\t\t\t<!-- TODO: onchange, AJAX POST to check if mail already exists in the db -->
@@ -315,7 +328,7 @@ function myfunc()
\t\t\t\t<div class=\"input-prepend\">
\t\t\t\t\t<span class=\"add-on\">@</span>
\t\t\t\t\t<input class=\"input-large\" type=\"text\" name=\"tweet\" id=\"tweet\" value=\"";
- // line 265
+ // line 278
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "settings"), "getTwitter", array(), "method"), "html", null, true);
echo "\" />
\t\t\t\t</div>
@@ -373,7 +386,7 @@ function myfunc()
\t\t\t});
\t\t\t\$.post(\"";
- // line 320
+ // line 333
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("AceEditorBundle_setoptions"), "html", null, true);
echo "\", {data: items },
\t\t\tfunction(data)
@@ -91,7 +91,9 @@ protected function doDisplay(array $context, array $blocks = array())
\t\t <a class=\"brand\" href=\"";
// line 41
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("AceEditorBundle_homepage"), "html", null, true);
- echo "\">clouduino</a>
+ echo "\">";
+ echo twig_escape_filter($this->env, $this->getContext($context, "site_name"), "html", null, true);
+ echo "</a>
\t\t <div class=\"nav-collapse\">
\t\t <ul class=\"nav\">\t\t
\t\t <li id=\"homepage\"><a href=\"";
@@ -22,7 +22,8 @@ framework:
twig:
debug: %kernel.debug%
strict_variables: %kernel.debug%
-
+ globals:
+ site_name: "d3vflugenhagen232ster-uino"
# Assetic Configuration
assetic:
debug: %kernel.debug%
Oops, something went wrong.

0 comments on commit a9958c7

Please sign in to comment.