php - overwrititng the login admin page sonatauser -


i want change page admin login in sonatauser wich in sonataproject/userbundle/admin/resources/views/admin/security/login.html.twig can't find solution because file extends base templete. can give solution such problem.

    {% extends base_template %}  {% block content %}     <div class="connection">         <form action="{{ path("sonata_user_admin_security_check") }}" method="post">              {% if error %}                 <div class="alert alert-error">{{ error|trans({}, 'sonatauserbundle') }}</div>             {% endif %}              <input type="hidden" name="_csrf_token" value="{{ csrf_token }}" />              <div class="control-group">                 <label for="username">{{ 'security.login.username'|trans({}, 'fosuserbundle') }}</label>                  <div class="controls">                     <input type="text" id="username" name="_username" value="{{ last_username }}" class="big sonata-medium"/>                 </div>             </div>              <div class="control-group">                 <label for="password">{{ 'security.login.password'|trans({}, 'fosuserbundle') }}</label>                  <div class="controls">                     <input type="password" id="password" name="_password" class="big sonata-medium" />                 </div>             </div>              <div class="control-group">                 <label for="remember_me">                     <input type="checkbox" id="remember_me" name="_remember_me" value="on" />                     {{ 'security.login.remember_me'|trans({}, 'fosuserbundle') }}                 </label>             </div>              <div class="form-actions">                 <input type="submit" class="btn btn-primary" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'fosuserbundle') }}" />             </div>         </form>     </div> {% endblock content %} 

you have extend sonatauserbundle override login template.

follow documentation on how install extended bundle of sonatauserbundle. if don't have sonata:easy-extends:generate command available, should install sonataeasyextendsbundle.

you create login.html.twig in application/sonata/userbundle/resources/views/admin/security , add default code (assuming using sonatauserbundle 2.2). can customize it.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -