mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 00:53:10 +01:00
bug fixes
This commit is contained in:
parent
968df9409e
commit
3ea3b6462a
@ -315,11 +315,19 @@ class InvoiceController extends \BaseController {
|
|||||||
return InvoiceController::cloneInvoice($publicId);
|
return InvoiceController::cloneInvoice($publicId);
|
||||||
}
|
}
|
||||||
else if ($action == 'email')
|
else if ($action == 'email')
|
||||||
|
{
|
||||||
|
if (Auth::user()->confirmed)
|
||||||
{
|
{
|
||||||
$this->mailer->sendInvoice($invoice);
|
$this->mailer->sendInvoice($invoice);
|
||||||
Session::flash('message', 'Successfully emailed invoice'.$message);
|
Session::flash('message', 'Successfully emailed invoice'.$message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
Session::flash('message', 'Successfully saved invoice'.$message);
|
||||||
|
Session::flash('error', 'Please sign up to email an invoice');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Session::flash('message', 'Successfully saved invoice'.$message);
|
Session::flash('message', 'Successfully saved invoice'.$message);
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,18 @@ class UserController extends BaseController {
|
|||||||
if( Confide::user() )
|
if( Confide::user() )
|
||||||
{
|
{
|
||||||
Event::fire('user.login');
|
Event::fire('user.login');
|
||||||
|
|
||||||
|
$invoice = Invoice::scope()->orderBy('id', 'desc')->first();
|
||||||
|
|
||||||
|
if ($invoice)
|
||||||
|
{
|
||||||
|
return Redirect::to('/invoices/' . $invoice->public_id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return Redirect::to('/invoices/create');
|
return Redirect::to('/invoices/create');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return View::make(Config::get('confide::login_form'));
|
return View::make(Config::get('confide::login_form'));
|
||||||
|
@ -406,37 +406,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade" id="notSignedUpModal" tabindex="-1" role="dialog" aria-labelledby="notSignedUpModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog" style="min-width:150px">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
<h4 class="modal-title" id="notSignedUpModalLabel">Email Invoice</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="background-color: #EEEEEE; padding-left: 16px; padding-right: 16px">
|
|
||||||
<br/>
|
|
||||||
@if (Auth::user()->registered)
|
|
||||||
Please confirm your account to email an invoice.
|
|
||||||
@else
|
|
||||||
Please sign up to email an invoice.
|
|
||||||
@endif
|
|
||||||
<br/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer" style="margin-top: 0px">
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
||||||
@if (!Auth::user()->registered)
|
|
||||||
<button type="button" class="btn btn-primary" onclick="showSignUp()">Sign Up</button>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade" id="recurringModal" tabindex="-1" role="dialog" aria-labelledby="recurringModalLabel" aria-hidden="true">
|
<div class="modal fade" id="recurringModal" tabindex="-1" role="dialog" aria-labelledby="recurringModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" style="min-width:150px">
|
<div class="modal-dialog" style="min-width:150px">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -469,7 +438,6 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function showSignUp() {
|
function showSignUp() {
|
||||||
$('#notSignedUpModal').modal('hide');
|
|
||||||
$('#signUpModal').modal('show');
|
$('#signUpModal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -643,15 +611,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onEmailClick() {
|
function onEmailClick() {
|
||||||
if ({{ !Auth::user()->confirmed ? 'true' : 'false' }}) {
|
|
||||||
$('#notSignedUpModal').modal('show');
|
|
||||||
} else {
|
|
||||||
if (confirm('Are you sure you want to email this invoice?')) {
|
if (confirm('Are you sure you want to email this invoice?')) {
|
||||||
$('#action').val('email');
|
$('#action').val('email');
|
||||||
$('.main_form').submit();
|
$('.main_form').submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function onSaveClick() {
|
function onSaveClick() {
|
||||||
$('.main_form').submit();
|
$('.main_form').submit();
|
||||||
|
Loading…
Reference in New Issue
Block a user