Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoginForm can't customize form action url,how to hidden remember field #246

Open
fbens opened this issue Apr 19, 2017 · 1 comment
Open
Assignees

Comments

@fbens
Copy link

fbens commented Apr 19, 2017

Detailed description

I want to change the form action address, but it has been fixed as /login cannot be modified

# resources/views/vendor/adminlte/admin/login.blade.php
<login-form name="{{ config('auth.providers.admin.field','name') }}"
                            domain="{{ config('auth.defaults.domain','') }}"></login-form>
# public/js/app.js
# LIne: 24818
      this.form.post('/login').then(function (response) {
        var component = _this;
        setTimeout(function () {
          component.redirect(response);
        }, 2500);
      }).catch(function (error) {
        console.log(_this.trans('adminlte_lang_message.loginerror') + ':' + error);
      });
# resources/assets/js/components/auth/LoginForm.vue
submit () {
      this.form.post('/login')
       .then(response => {
         var component = this;
         setTimeout(function(){
           component.redirect(response)
         }, 2500);
       })
       .catch(error => {
         console.log(this.trans('adminlte_lang_message.loginerror') + ':' + error)
       })
    },

Only name and domain can be customized.

Context

Because the administrator login form action address is /login2, user login form action address is /login

Possible implementation

Not obligatory, but suggest an idea for implementing addition or change.

Your environment

  • Version used (PHP 7.1, Laravel 5.4):
  • Operating system and version (Mac OS Yosemite):
  • Link to your project:
@acacha acacha self-assigned this Apr 19, 2017
@acacha
Copy link
Collaborator

acacha commented Apr 19, 2017

Ok a will take a look as soon as possible. you can change de vue login component and recompile it with npm run dev if you want as an alternative solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants