mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on users in L5
This commit is contained in:
parent
78502f74e4
commit
58746d9eec
@ -20,6 +20,8 @@ class PasswordController extends Controller {
|
||||
|
||||
use ResetsPasswords;
|
||||
|
||||
protected $redirectTo = '/dashboard';
|
||||
|
||||
/**
|
||||
* Create a new password controller instance.
|
||||
*
|
||||
|
@ -66,8 +66,10 @@ post('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@postRegis
|
||||
get('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@getLogin'));
|
||||
post('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@postLogin'));
|
||||
get('/logout', array('as' => 'logout', 'uses' => 'Auth\AuthController@getLogout'));
|
||||
get('/forgot', array('as' => 'forgot', 'uses' => 'Auth\AuthController@getLogin'));
|
||||
post('/forgot', array('as' => 'forgot', 'uses' => 'Auth\AuthController@postLogin'));
|
||||
get('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getEmail'));
|
||||
post('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@postEmail'));
|
||||
get('/password/reset', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getReset'));
|
||||
post('/password/reset', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@postReset'));
|
||||
|
||||
/*
|
||||
// Confide routes
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function(Blueprint $table)
|
||||
{
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
$table->timestamp('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('password_resets');
|
||||
}
|
||||
|
||||
}
|
@ -65,10 +65,10 @@
|
||||
{!! Former::password('password')->placeholder(trans('texts.password'))->raw() !!}
|
||||
</p>
|
||||
|
||||
<p>{!! Button::primary(trans('texts.lets_go'))->withAttributes(array('class' => 'btn-lg'))->submit()->block() !!}</p>
|
||||
<p>{!! Button::success(trans('texts.lets_go'))->withAttributes(array('class' => 'btn-lg'))->submit()->block() !!}</p>
|
||||
|
||||
<p class="link">
|
||||
{!! link_to('forgot_password', trans('texts.forgot_password')) !!}
|
||||
{!! link_to('/forgot', trans('texts.forgot_password')) !!}
|
||||
</p>
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
@section('body')
|
||||
<div class="container">
|
||||
|
||||
{!! Former::open('forgot_password')->rules(['email' => 'required|email'])->addClass('form-signin') !!}
|
||||
{!! Former::open('forgot')->rules(['email' => 'required|email'])->addClass('form-signin') !!}
|
||||
<div class="modal-header">
|
||||
<img src="{{ asset('images/icon-login.png') }}" />
|
||||
<h4>Invoice Ninja | {{ trans('texts.password_recovery') }}</h4></div>
|
||||
@ -63,7 +63,21 @@
|
||||
{!! Former::text('email')->placeholder(trans('texts.email_address'))->raw() !!}
|
||||
</p>
|
||||
|
||||
<p>{!! Button::normal(trans('texts.send_email'))->withAttributes(array('class' => 'btn-lg'))->submit()->block() !!}</p>
|
||||
<p>{!! Button::success(trans('texts.send_email'))->withAttributes(array('class' => 'btn-lg'))->submit()->block() !!}</p>
|
||||
|
||||
@if (count($errors->all()))
|
||||
<div class="alert alert-danger">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-info">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- if there are login errors, show them here -->
|
||||
@if (Session::has('warning'))
|
@ -53,10 +53,10 @@
|
||||
@section('body')
|
||||
<div class="container">
|
||||
|
||||
{{ Former::open('user/reset')->addClass('form-signin')->rules(array(
|
||||
{!! Former::open('/password/reset')->addClass('form-signin')->rules(array(
|
||||
'password' => 'required',
|
||||
'password_confirmation' => 'required',
|
||||
)); }}
|
||||
)) !!}
|
||||
|
||||
<div class="modal-header">
|
||||
<img src="{{ asset('images/icon-login.png') }}" />
|
||||
@ -66,12 +66,22 @@
|
||||
<input type="hidden" name="token" value="{{{ $token }}}">
|
||||
|
||||
<p>
|
||||
{{ Former::password('password')->placeholder(trans('texts.password'))->raw() }}
|
||||
{{ Former::password('password_confirmation')->placeholder(trans('texts.confirm_password'))->raw() }}
|
||||
{!! Former::text('email')->placeholder(trans('texts.email'))->raw() !!}
|
||||
{!! Former::password('password')->placeholder(trans('texts.password'))->raw() !!}
|
||||
{!! Former::password('password_confirmation')->placeholder(trans('texts.confirm_password'))->raw() !!}
|
||||
|
||||
</p>
|
||||
|
||||
<p>{{ Button::success_submit(trans('texts.save'), array('class' => 'btn-lg'))->block() }}</p>
|
||||
<p>{!! Button::success(trans('texts.save'), array('class' => 'btn-lg'))->submit()->block() !!}</p>
|
||||
|
||||
|
||||
@if (count($errors->all()))
|
||||
<div class="alert alert-danger">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- if there are login errors, show them here -->
|
||||
@if (Session::has('warning'))
|
||||
@ -87,7 +97,7 @@
|
||||
@endif
|
||||
|
||||
|
||||
{{ Former::close() }}
|
||||
{!! Former::close() !!}
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,7 +1,7 @@
|
||||
{{ trans('texts.email_salutation', ['name' => $user->username]) }} <p/>
|
||||
|
||||
{{ trans('texts.reset_password') }} <br/>
|
||||
{{{ (Confide::checkAction('UserController@reset_password', array($token))) ? : URL::to('user/reset/'.$token) }}}<p/>
|
||||
{!! url('password/reset/'.$token) !!}<p/>
|
||||
|
||||
{{ trans('texts.email_signature') }} <br/>
|
||||
{{ trans('texts.email_from') }} <p/>
|
@ -1,119 +0,0 @@
|
||||
@extends('master')
|
||||
|
||||
@section('head')
|
||||
|
||||
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{ asset('css/style.css') }}" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
.modal-header {
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
.modal-header h4 {
|
||||
margin:0;
|
||||
}
|
||||
.modal-header img {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.form-signin {
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
}
|
||||
p.link a {
|
||||
font-size: 11px;
|
||||
}
|
||||
.form-signin .inner {
|
||||
padding: 20px;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-left: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.form-signin .checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
.form-signin .form-control {
|
||||
margin-bottom: 17px !important;
|
||||
}
|
||||
.form-signin .form-control:focus {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('body')
|
||||
<div class="container">
|
||||
|
||||
|
||||
{!! Former::open('login')->rules(['login_email' => 'required|email', 'login_password' => 'required'])->addClass('form-signin') !!}
|
||||
<div class="modal-header">
|
||||
<img src="{{ asset('images/icon-login.png') }}" />
|
||||
<h4>Invoice Ninja | {{ trans('texts.account_login') }}</h4></div>
|
||||
<div class="inner">
|
||||
<p>
|
||||
{{ $errors->first('login_email') }}
|
||||
{{ $errors->first('login_password') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{!! Former::text('login_email')->placeholder(trans('texts.email_address'))->raw() !!}
|
||||
{!! Former::password('login_password')->placeholder(trans('texts.password'))->raw() !!}
|
||||
</p>
|
||||
|
||||
<p>{!! Button::primary(trans('texts.lets_go'))->withAttributes(array('class' => 'btn-lg'))->submit()->block() !!}</p>
|
||||
|
||||
<p class="link">
|
||||
{!! link_to('forgot_password', trans('texts.forgot_password')) !!}
|
||||
</p>
|
||||
|
||||
|
||||
@if (Session::has('warning'))
|
||||
<div class="alert alert-warning">{{ Session::get('warning') }}</div>
|
||||
@endif
|
||||
|
||||
@if (Session::has('message'))
|
||||
<div class="alert alert-info">{{ Session::get('message') }}</div>
|
||||
@endif
|
||||
|
||||
@if (Session::has('error'))
|
||||
<div class="alert alert-danger">{{ Session::get('error') }}</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
||||
@if (!Utils::isNinja())
|
||||
<p/>
|
||||
<center>
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=635126583203143";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
|
||||
<div class="fb-follow" data-href="https://www.facebook.com/invoiceninja" data-colorscheme="light" data-layout="button" data-show-faces="false"></div>
|
||||
|
||||
<a href="https://twitter.com/invoiceninja" class="twitter-follow-button" data-show-count="false" data-related="hillelcoren" data-size="medium">Follow @invoiceninja</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
|
||||
<iframe src="https://ghbtns.com/github-btn.html?user=hillelcoren&repo=invoice-ninja&type=star&count=false" frameborder="0" scrolling="0" width="50px" height="20px"></iframe>
|
||||
</center>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
Loading…
x
Reference in New Issue
Block a user