mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-02 22:57:33 -05:00 
			
		
		
		
	bug fixes
This commit is contained in:
		
							parent
							
								
									968df9409e
								
							
						
					
					
						commit
						3ea3b6462a
					
				@ -315,9 +315,17 @@ class InvoiceController extends \BaseController {
 | 
			
		||||
				return InvoiceController::cloneInvoice($publicId);
 | 
			
		||||
			}
 | 
			
		||||
			else if ($action == 'email') 
 | 
			
		||||
			{							
 | 
			
		||||
				$this->mailer->sendInvoice($invoice);
 | 
			
		||||
				Session::flash('message', 'Successfully emailed invoice'.$message);
 | 
			
		||||
			{	
 | 
			
		||||
				if (Auth::user()->confirmed)
 | 
			
		||||
				{
 | 
			
		||||
					$this->mailer->sendInvoice($invoice);
 | 
			
		||||
					Session::flash('message', 'Successfully emailed invoice'.$message);
 | 
			
		||||
				}
 | 
			
		||||
				else
 | 
			
		||||
				{
 | 
			
		||||
					Session::flash('message', 'Successfully saved invoice'.$message);
 | 
			
		||||
					Session::flash('error', 'Please sign up to email an invoice');
 | 
			
		||||
				}
 | 
			
		||||
			} 
 | 
			
		||||
			else 
 | 
			
		||||
			{				
 | 
			
		||||
 | 
			
		||||
@ -75,7 +75,17 @@ class UserController extends BaseController {
 | 
			
		||||
        if( Confide::user() )
 | 
			
		||||
        {
 | 
			
		||||
            Event::fire('user.login'); 
 | 
			
		||||
            return Redirect::to('/invoices/create');
 | 
			
		||||
 | 
			
		||||
            $invoice = Invoice::scope()->orderBy('id', 'desc')->first();
 | 
			
		||||
            
 | 
			
		||||
            if ($invoice)
 | 
			
		||||
            {
 | 
			
		||||
                return Redirect::to('/invoices/' . $invoice->public_id);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return Redirect::to('/invoices/create');
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
@ -406,37 +406,6 @@
 | 
			
		||||
	  </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-dialog" style="min-width:150px">
 | 
			
		||||
	    <div class="modal-content">
 | 
			
		||||
@ -469,7 +438,6 @@
 | 
			
		||||
	<script type="text/javascript">
 | 
			
		||||
	
 | 
			
		||||
	function showSignUp() {
 | 
			
		||||
		$('#notSignedUpModal').modal('hide');	
 | 
			
		||||
		$('#signUpModal').modal('show');		
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -643,13 +611,9 @@
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function onEmailClick() {
 | 
			
		||||
		if ({{ !Auth::user()->confirmed ? 'true' : 'false' }}) {
 | 
			
		||||
			$('#notSignedUpModal').modal('show');	
 | 
			
		||||
		} else {
 | 
			
		||||
			if (confirm('Are you sure you want to email this invoice?')) {
 | 
			
		||||
				$('#action').val('email');
 | 
			
		||||
				$('.main_form').submit();
 | 
			
		||||
			}
 | 
			
		||||
		if (confirm('Are you sure you want to email this invoice?')) {
 | 
			
		||||
			$('#action').val('email');
 | 
			
		||||
			$('.main_form').submit();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user