mdbootstrap / adminlte-laravel

A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template and Pratt Landing Page with Bootstrap 3.0
MIT License
1.81k stars 508 forks source link

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

Open fbens opened 7 years ago

fbens commented 7 years ago

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

acacha commented 7 years ago

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