1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 12:42:36 +01:00

Working on self hosting

This commit is contained in:
Hillel Coren 2014-07-15 23:36:40 +03:00
parent 6175f3fc27
commit 9427f5180f
25 changed files with 15551 additions and 373 deletions

View File

@ -2,7 +2,6 @@
return array( return array(
//'DISABLE_REGISTRATION' => true,
//'TAG_MANAGER_KEY' => '', //'TAG_MANAGER_KEY' => '',
//'ANALYTICS_KEY' => '', //'ANALYTICS_KEY' => '',

View File

@ -17,7 +17,7 @@ module.exports = function(grunt) {
js: { js: {
src: [ src: [
'public/vendor/jquery/dist/jquery.js', 'public/vendor/jquery/dist/jquery.js',
'public/vendor/jquery-ui/jquery-ui.min.js', 'public/vendor/jquery-ui/ui/jquery-ui.js',
'public/vendor/bootstrap/dist/js/bootstrap.min.js', 'public/vendor/bootstrap/dist/js/bootstrap.min.js',
'public/vendor/datatables/media/js/jquery.dataTables.js', 'public/vendor/datatables/media/js/jquery.dataTables.js',
'public/vendor/datatables-bootstrap3/BS3/assets/js/datatables.js', 'public/vendor/datatables-bootstrap3/BS3/assets/js/datatables.js',

View File

@ -21,11 +21,6 @@ class AccountController extends \BaseController {
public function getStarted() public function getStarted()
{ {
if (Utils::isRegistrationDisabled())
{
return Redirect::away(NINJA_URL.'/invoice_now');
}
if (Auth::check()) if (Auth::check())
{ {
return Redirect::to('invoices/create'); return Redirect::to('invoices/create');

View File

@ -14,9 +14,23 @@ class HomeController extends BaseController {
$this->mailer = $mailer; $this->mailer = $mailer;
} }
public function showWelcome() public function showIndex()
{ {
return View::make('public.splash'); if (Utils::isNinja())
{
return View::make('public.splash');
}
else
{
if (Account::count() == 0)
{
return Redirect::to('/invoice_now');
}
else
{
return Redirect::to('/login');
}
}
} }
public function showAboutUs() public function showAboutUs()

View File

@ -126,7 +126,7 @@ class InvoiceController extends \BaseController {
$invoice->is_pro = $client->account->isPro(); $invoice->is_pro = $client->account->isPro();
$data = array( $data = array(
'hideHeader' => $client->account->isPro() && Utils::isNinjaProd(), 'hideHeader' => true,
'showBreadcrumbs' => false, 'showBreadcrumbs' => false,
'invoice' => $invoice->hidePrivateFields(), 'invoice' => $invoice->hidePrivateFields(),
'invitation' => $invitation, 'invitation' => $invitation,

View File

@ -2,17 +2,19 @@
use ninja\repositories\PaymentRepository; use ninja\repositories\PaymentRepository;
use ninja\repositories\InvoiceRepository; use ninja\repositories\InvoiceRepository;
use ninja\repositories\AccountRepository;
class PaymentController extends \BaseController class PaymentController extends \BaseController
{ {
protected $creditRepo; protected $creditRepo;
public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo) public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo, AccountRepository $accountRepo)
{ {
parent::__construct(); parent::__construct();
$this->paymentRepo = $paymentRepo; $this->paymentRepo = $paymentRepo;
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;
$this->accountRepo = $accountRepo;
} }
public function index() public function index()
@ -120,16 +122,51 @@ class PaymentController extends \BaseController
$gateway->$function($val); $gateway->$function($val);
} }
/*
if (!Utils::isProd()) if (!Utils::isProd())
{ {
$gateway->setTestMode(true); $gateway->setTestMode(true);
} }
*/
return $gateway; return $gateway;
} }
private function getLicensePaymentDetails($input)
{
$data = self::convertInputForOmnipay($input);
$card = new CreditCard($data);
return [
'amount' => LICENSE_PRICE,
'card' => $card,
'currency' => 'USD',
'returnUrl' => URL::to('license_complete'),
'cancelUrl' => URL::to('/')
];
}
private function convertInputForOmnipay($input)
{
return [
'firstName' => $input['first_name'],
'lastName' => $input['last_name'],
'number' => $input['card_number'],
'expiryMonth' => $input['expiration_month'],
'expiryYear' => $input['expiration_year'],
'cvv' => $input['cvv'],
'billingAddress1' => $input['address1'],
'billingAddress2' => $input['address2'],
'billingCity' => $input['city'],
'billingState' => $input['state'],
'billingPostcode' => $input['postal_code'],
'shippingAddress1' => $input['address1'],
'shippingAddress2' => $input['address2'],
'shippingCity' => $input['city'],
'shippingState' => $input['state'],
'shippingPostcode' => $input['postal_code']
];
}
private function getPaymentDetails($invoice, $input = null) private function getPaymentDetails($invoice, $input = null)
{ {
$key = $invoice->invoice_number . '_details'; $key = $invoice->invoice_number . '_details';
@ -138,24 +175,7 @@ class PaymentController extends \BaseController
if ($input && $paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY) if ($input && $paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY)
{ {
$data = [ $data = self::convertInputForOmnipay($input);
'firstName' => $input['first_name'],
'lastName' => $input['last_name'],
'number' => $input['card_number'],
'expiryMonth' => $input['expiration_month'],
'expiryYear' => $input['expiration_year'],
'cvv' => $input['cvv'],
'billingAddress1' => $input['address1'],
'billingAddress2' => $input['address2'],
'billingCity' => $input['city'],
'billingState' => $input['state'],
'billingPostcode' => $input['postal_code'],
'shippingAddress1' => $input['address1'],
'shippingAddress2' => $input['address2'],
'shippingCity' => $input['city'],
'shippingState' => $input['state'],
'shippingPostcode' => $input['postal_code'],
];
Session::put($key, $data); Session::put($key, $data);
} }
@ -258,19 +278,167 @@ class PaymentController extends \BaseController
$data = [ $data = [
'showBreadcrumbs' => false, 'showBreadcrumbs' => false,
'hideHeader' => $client->account->isPro() && Utils::isNinjaProd(), 'hideHeader' => true,
'invitationKey' => $invitationKey, 'url' => 'payment/' . $invitationKey,
'invoice' => $invoice, 'amount' => $invoice->amount,
'client' => $client, 'client' => $client,
'contact' => $invitation->contact, 'contact' => $invitation->contact,
'paymentLibrary' => $paymentLibrary, 'paymentLibrary' => $paymentLibrary,
'gateway' => $gateway, 'gateway' => $gateway,
'acceptedCreditCardTypes' => $acceptedCreditCardTypes, 'acceptedCreditCardTypes' => $acceptedCreditCardTypes,
'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(),
'currencyId' => $client->currency_id
]; ];
return View::make('payments.payment', $data); return View::make('payments.payment', $data);
} }
public function show_license_payment()
{
if (Input::has('return_url'))
{
Session::set('return_url', Input::get('return_url'));
}
if (Input::has('affiliate_key'))
{
if ($affiliate = Affiliate::where('affiliate_key', '=', Input::get('affiliate_key'))->first())
{
Session::set('affiliate_id', $affiliate->id);
}
}
if (!Session::get('return_url') || !Session::get('affiliate_id'))
{
return Utils::fatalError();
}
if (Input::has('test_mode'))
{
Session::set('test_mode', Input::get('test_mode'));
}
$account = $this->accountRepo->getNinjaAccount();
$account->load('account_gateways.gateway');
$accountGateway = $account->account_gateways[0];
$gateway = $accountGateway->gateway;
$paymentLibrary = $gateway->paymentlibrary;
$acceptedCreditCardTypes = $accountGateway->getCreditcardTypes();
$affiliate = Affiliate::find(Session::get('affiliate_id'));
$data = [
'showBreadcrumbs' => false,
'hideHeader' => true,
'url' => 'license',
'amount' => LICENSE_PRICE,
'client' => false,
'contact' => false,
'paymentLibrary' => $paymentLibrary,
'gateway' => $gateway,
'acceptedCreditCardTypes' => $acceptedCreditCardTypes,
'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(),
'currencyId' => 1,
'paymentTitle' => $affiliate->payment_title,
'paymentSubtitle' => $affiliate->payment_subtitle
];
return View::make('payments.payment', $data);
}
public function do_license_payment()
{
$testMode = Session::get('test_mode') === 'true';
$rules = array(
'first_name' => 'required',
'last_name' => 'required',
'card_number' => 'required',
'expiration_month' => 'required',
'expiration_year' => 'required',
'cvv' => 'required',
'address1' => 'required',
'city' => 'required',
'state' => 'required',
'postal_code' => 'required',
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails())
{
return Redirect::to('license')
->withErrors($validator);
}
$account = $this->accountRepo->getNinjaAccount();
$account->load('account_gateways.gateway');
$accountGateway = $account->account_gateways[0];
try
{
if ($testMode)
{
$ref = 'TEST_MODE';
}
else
{
$gateway = self::createGateway($accountGateway);
$details = self::getLicensePaymentDetails(Input::all());
if (!$ref)
{
Session::flash('error', $response->getMessage());
return Redirect::to('license')->withInput();
}
if (!$response->isSuccessful())
{
Session::flash('error', $response->getMessage());
Utils::logError($response->getMessage());
return Redirect::to('license')->withInput();
}
}
$license = new License;
$license->first_name = Input::get('first_name');
$license->last_name = Input::get('last_name');
$license->email = Input::get('email');
$license->transaction_reference = $ref;
$license->license_key = Utils::generateLicense();
$license->affiliate_id = Session::get('affiliate_id');
$license->save();
return Redirect::away(Session::get('return_url') . "?license_key={$license->license_key}");
}
catch (\Exception $e)
{
$errorMessage = trans('texts.payment_error');
Session::flash('error', $errorMessage);
Utils::logError($e->getMessage());
return Redirect::to('license')->withInput();
}
}
public function claim_license()
{
$license = License::where('license_key', '=', Input::get('key'))
->where('is_claimed', '=', false)->first();
if ($license)
{
$license->is_claimed = true;
$license->save();
return 'valid';
}
else
{
return 'invalid';
}
}
public function do_payment($invitationKey, $onSite = true) public function do_payment($invitationKey, $onSite = true)
{ {

View File

@ -0,0 +1,58 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class OneClickInstall extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('affiliates', function($table)
{
$table->increments('id');
$table->timestamps();
$table->softDeletes();
$table->string('name');
$table->string('affiliate_key')->unique();
$table->text('payment_title');
$table->text('payment_subtitle');
});
Schema::create('licenses', function($table)
{
$table->increments('id');
$table->timestamps();
$table->softDeletes();
$table->unsignedInteger('affiliate_id');
$table->string('first_name');
$table->string('last_name');
$table->string('email');
$table->string('license_key')->unique();
$table->boolean('is_claimed');
$table->string('transaction_reference');
$table->foreign('affiliate_id')->references('id')->on('affiliates');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('licenses');
Schema::dropIfExists('affiliates');
}
}

View File

@ -70,11 +70,11 @@ App::after(function($request, $response)
Route::filter('auth', function() Route::filter('auth', function()
{ {
if (Auth::guest()) { if (Auth::guest()) {
if(Utils::isNinja()) { if(Utils::isNinja()) {
return Redirect::guest('/'); return Redirect::guest('/');
} else { } else {
return Redirect::guest('/login'); return Redirect::guest('/login');
} }
} }
}); });

View File

@ -31,11 +31,6 @@ class Utils
{ {
return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV']; return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV'];
} }
public static function isRegistrationDisabled()
{
return isset($_ENV['DISABLE_REGISTRATION']) && $_ENV['DISABLE_REGISTRATION'];
}
public static function isPro() public static function isPro()
{ {
@ -446,4 +441,12 @@ class Utils
return $message; return $message;
} }
public static function generateLicense() {
$parts = [];
for ($i=0; $i<5; $i++) {
$parts[] = strtoupper(str_random(4));
}
return join('-', $parts);
}
} }

View File

@ -263,12 +263,12 @@ class Activity extends Eloquent
{ {
$activity = Activity::getBlank($client); $activity = Activity::getBlank($client);
$activity->contact_id = $payment->contact_id; $activity->contact_id = $payment->contact_id;
$activity->message = Utils::encodeActivity($payment->invitation->contact, 'entered payment'); $activity->message = Utils::encodeActivity($payment->invitation->contact, 'entered ' . $payment->getName());
} }
else else
{ {
$activity = Activity::getBlank(); $activity = Activity::getBlank();
$message = $payment->payment_type_id == PAYMENT_TYPE_CREDIT ? 'applied credit' : 'entered payment'; $message = $payment->payment_type_id == PAYMENT_TYPE_CREDIT ? 'applied credit' : 'entered ' . $payment->getName();
$activity->message = Utils::encodeActivity(Auth::user(), $message); $activity->message = Utils::encodeActivity(Auth::user(), $message);
} }
@ -310,7 +310,7 @@ class Activity extends Eloquent
$activity->client_id = $invoice->client_id; $activity->client_id = $invoice->client_id;
$activity->invoice_id = $invoice->id; $activity->invoice_id = $invoice->id;
$activity->activity_type_id = ACTIVITY_TYPE_DELETE_PAYMENT; $activity->activity_type_id = ACTIVITY_TYPE_DELETE_PAYMENT;
$activity->message = Utils::encodeActivity(Auth::user(), 'deleted payment'); $activity->message = Utils::encodeActivity(Auth::user(), 'deleted ' . $payment->getName());
$activity->balance = $client->balance; $activity->balance = $client->balance;
$activity->adjustment = $payment->amount; $activity->adjustment = $payment->amount;
$activity->save(); $activity->save();
@ -357,7 +357,7 @@ class Activity extends Eloquent
$activity->invoice_id = $invoice->id; $activity->invoice_id = $invoice->id;
$activity->client_id = $client->id; $activity->client_id = $client->id;
$activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_PAYMENT; $activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_PAYMENT;
$activity->message = Utils::encodeActivity(Auth::user(), 'archived payment'); $activity->message = Utils::encodeActivity(Auth::user(), 'archived ' . $payment->getName());
$activity->balance = $client->balance; $activity->balance = $client->balance;
$activity->adjustment = 0; $activity->adjustment = 0;
$activity->save(); $activity->save();

7
app/models/Affiliate.php Normal file
View File

@ -0,0 +1,7 @@
<?php
class Affiliate extends Eloquent
{
public $timestamps = true;
protected $softDelete = true;
}

7
app/models/License.php Normal file
View File

@ -0,0 +1,7 @@
<?php
class License extends Eloquent
{
public $timestamps = true;
protected $softDelete = true;
}

View File

@ -27,9 +27,14 @@ class Payment extends EntityModel
return $this->belongsTo('Contact'); return $this->belongsTo('Contact');
} }
public function getAmount()
{
return Utils::formatMoney($this->amount, $this->client->currency_id);
}
public function getName() public function getName()
{ {
return ''; return trim("payment {$this->transaction_reference}");
} }
public function getEntityType() public function getEntityType()

View File

@ -147,7 +147,7 @@ class AccountRepository
return $invoice; return $invoice;
} }
private function getNinjaAccount() public function getNinjaAccount()
{ {
$account = Account::whereAccountKey(NINJA_ACCOUNT_KEY)->first(); $account = Account::whereAccountKey(NINJA_ACCOUNT_KEY)->first();

View File

@ -22,39 +22,33 @@
//dd(gethostname()); //dd(gethostname());
//Log::error('test'); //Log::error('test');
//if(Utils::isNinja()) { Route::get('/', 'HomeController@showIndex');
Route::get('/rocksteady', 'HomeController@showIndex');
Route::get('/about', 'HomeController@showAboutUs');
Route::get('/terms', 'HomeController@showTerms');
Route::get('/contact', 'HomeController@showContactUs');
Route::get('/plans', 'HomeController@showPlans');
Route::post('/contact_submit', 'HomeController@doContactUs');
Route::get('/faq', 'HomeController@showFaq');
Route::get('/features', 'HomeController@showFeatures');
Route::get('/testimonials', 'HomeController@showTestimonials');
Route::get('/', 'HomeController@showWelcome'); Route::get('log_error', 'HomeController@logError');
Route::get('/rocksteady', 'HomeController@showWelcome'); Route::get('invoice_now', 'HomeController@invoiceNow');
Route::get('/about', 'HomeController@showAboutUs'); Route::post('get_started', 'AccountController@getStarted');
Route::get('/terms', 'HomeController@showTerms');
Route::get('/contact', 'HomeController@showContactUs');
Route::get('/plans', 'HomeController@showPlans');
Route::post('/contact_submit', 'HomeController@doContactUs');
Route::get('/faq', 'HomeController@showFaq');
Route::get('/features', 'HomeController@showFeatures');
Route::get('/secure_payment', 'HomeController@showSecurePayment');
Route::get('/testimonials', 'HomeController@showTestimonials');
Route::get('log_error', 'HomeController@logError'); Route::get('view/{invitation_key}', 'InvoiceController@view');
Route::get('invoice_now', 'HomeController@invoiceNow'); Route::get('payment/{invitation_key}', 'PaymentController@show_payment');
Route::post('get_started', 'AccountController@getStarted'); Route::post('payment/{invitation_key}', 'PaymentController@do_payment');
Route::get('complete', 'PaymentController@offsite_payment');
Route::get('view/{invitation_key}', 'InvoiceController@view'); Route::get('license', 'PaymentController@show_license_payment');
Route::get('payment/{invitation_key}', 'PaymentController@show_payment'); Route::post('license', 'PaymentController@do_license_payment');
Route::post('payment/{invitation_key}', 'PaymentController@do_payment'); Route::get('claim_license', 'PaymentController@claim_license');
Route::get('complete', 'PaymentController@offsite_payment');
Route::post('signup/validate', 'AccountController@checkEmail'); Route::post('signup/validate', 'AccountController@checkEmail');
Route::post('signup/submit', 'AccountController@submitSignup'); Route::post('signup/submit', 'AccountController@submitSignup');
/*
} else {
Route::get('/', function() {
return Redirect::to('dashboard');
});
}
*/
// Confide routes // Confide routes
@ -227,9 +221,10 @@ define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET); define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
define('NINJA_URL', 'https://www.invoiceninja.com'); define('NINJA_URL', 'https://www.invoiceninja.com');
define('NINJA_VERSION', '1.2.0'); define('NINJA_VERSION', '1.2.2');
define('PRO_PLAN_PRICE', 50);
define('PRO_PLAN_PRICE', 50);
define('LICENSE_PRICE', 30);
/* /*
define('GATEWAY_AMAZON', 30); define('GATEWAY_AMAZON', 30);

View File

@ -22,6 +22,7 @@
<!-- TODO: creditcard-types IS SET IN JS FURTHER DOWN IN THE SCRIPT PART, <!-- TODO: creditcard-types IS SET IN JS FURTHER DOWN IN THE SCRIPT PART,
AND THEN IN INLINE STYLE. REMOVE THIS WHEN RAZI HAS FIXED THE IMAGES AND STYLE --> AND THEN IN INLINE STYLE. REMOVE THIS WHEN RAZI HAS FIXED THE IMAGES AND STYLE -->
<!--
<div class="two-column"> <div class="two-column">
{{ Former::checkboxes('creditCardTypes[]') {{ Former::checkboxes('creditCardTypes[]')
->label('Accepted Credit Cards') ->label('Accepted Credit Cards')
@ -29,6 +30,7 @@
->class('creditcard-types') ->class('creditcard-types')
}} }}
</div> </div>
-->
<div class="two-column"> <div class="two-column">
{{ Former::radios('recommendedGateway_id')->label('Recommended Gateways') {{ Former::radios('recommendedGateway_id')->label('Recommended Gateways')

View File

@ -6,6 +6,7 @@
<link href="{{ asset('built.css') }}" rel="stylesheet" type="text/css"/> <link href="{{ asset('built.css') }}" rel="stylesheet" type="text/css"/>
<!-- <!--
<script src="{{ asset('vendor/jquery/dist/jquery.js') }}" type="text/javascript"></script>
<script src="{{ asset('vendor/jquery-ui/ui/minified/jquery-ui.min.js') }}" type="text/javascript"></script> <script src="{{ asset('vendor/jquery-ui/ui/minified/jquery-ui.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('vendor/bootstrap/dist/js/bootstrap.min.js') }}" type="text/javascript"></script> <script src="{{ asset('vendor/bootstrap/dist/js/bootstrap.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('vendor/datatables/media/js/jquery.dataTables.js') }}" type="text/javascript"></script> <script src="{{ asset('vendor/datatables/media/js/jquery.dataTables.js') }}" type="text/javascript"></script>

View File

@ -452,7 +452,6 @@
} }
$(function() { $(function() {
$('#country_id').combobox().on('change', function(e) { $('#country_id').combobox().on('change', function(e) {
var countryId = parseInt($('input[name=country_id]').val(), 10); var countryId = parseInt($('input[name=country_id]').val(), 10);
var foundMatch = false; var foundMatch = false;

View File

@ -24,9 +24,6 @@
<script src="{{ asset('built.js') }}" type="text/javascript"></script> <script src="{{ asset('built.js') }}" type="text/javascript"></script>
<!-- <script src="{{ asset('vendor/jquery/jquery.js') }}" type="text/javascript"></script> -->
<!-- <script src="{{ asset('vendor/jquery/dist/jquery.js') }}" type="text/javascript"></script> -->
<script type="text/javascript"> <script type="text/javascript">
var NINJA = NINJA || {}; var NINJA = NINJA || {};
NINJA.isRegistered = {{ Utils::isRegistered() ? 'true' : 'false' }}; NINJA.isRegistered = {{ Utils::isRegistered() ? 'true' : 'false' }};

View File

@ -10,7 +10,7 @@
} }
</style> </style>
{{ Former::vertical_open('payment/' . $invitationKey)->rules(array( {{ Former::vertical_open($url)->rules(array(
'first_name' => 'required', 'first_name' => 'required',
'last_name' => 'required', 'last_name' => 'required',
'card_number' => 'required', 'card_number' => 'required',
@ -23,13 +23,14 @@
'postal_code' => 'required', 'postal_code' => 'required',
'country' => 'required', 'country' => 'required',
'phone' => 'required', 'phone' => 'required',
'email' => 'required' 'email' => 'required|email'
)) }} )) }}
{{ Former::populate($client) }} @if ($client)
{{ Former::populateField('first_name', $contact->first_name) }} {{ Former::populate($client) }}
{{ Former::populateField('last_name', $contact->last_name) }} {{ Former::populateField('first_name', $contact->first_name) }}
{{ Former::populateField('last_name', $contact->last_name) }}
@endif
<section class="hero background hero-secure center" data-speed="2" data-type="background"> <section class="hero background hero-secure center" data-speed="2" data-type="background">
<div class="container"> <div class="container">
@ -42,6 +43,7 @@
</section> </section>
<!-- Only set with inline style CHANGE THIS --> <!-- Only set with inline style CHANGE THIS -->
<!--
<section class="accepted-card-types" style="padding: 10px 0 10px 0; margin-top: 40px;"> <section class="accepted-card-types" style="padding: 10px 0 10px 0; margin-top: 40px;">
<div class="container"> <div class="container">
@if(isset($acceptedCreditCardTypes)) @if(isset($acceptedCreditCardTypes))
@ -51,40 +53,57 @@
@endif @endif
</div> </div>
</section> </section>
-->
<section class="secure"> <section class="secure">
<div class="container"> <div class="container">
@if (isset($paymentTitle))
<h2>{{ $paymentTitle }}<br/>
@if (isset($paymentSubtitle))
<small>{{ $paymentSubtitle }}</small>
@endif
</h2>&nbsp;<p/>
@endif
<div id="secure-form" class="row"> <div id="secure-form" class="row">
<div class="col-md-7 info"> <div class="col-md-7 info">
<div class="row"> <div class="row">
<div class="form-group col-md-6"> @if (isset($paymentTitle))
{{ Former::text('first_name') }} <div class="form-group col-md-4">
</div> {{ Former::text('first_name') }}
<div class="form-group col-md-6"> </div>
{{ Former::text('last_name') }} <div class="form-group col-md-4">
</div> {{ Former::text('last_name') }}
</div>
<div class="form-group col-md-4">
{{ Former::text('email') }}
</div>
@else
<div class="form-group col-md-6">
{{ Former::text('first_name') }}
</div>
<div class="form-group col-md-6">
{{ Former::text('last_name') }}
</div>
@endif
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-8">
{{ Former::text('address1')->label('Street') }} {{ Former::text('address1')->label('Street') }}
</div> </div>
<div class="form-group col-md-4">
{{ Former::text('address2')->label('Apt/Suite') }}
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-md-3"> <div class="form-group col-md-4">
{{ Former::text('address2')->label('Apt/Suite') }}
</div>
<div class="form-group col-md-3">
{{ Former::text('city') }} {{ Former::text('city') }}
</div> </div>
<div class="form-group col-md-4">
<div class="form-group col-md-3">
{{ Former::text('state')->label('State/Province') }} {{ Former::text('state')->label('State/Province') }}
</div> </div>
<div class="form-group col-md-4">
<div class="form-group col-md-3">
{{ Former::text('postal_code') }} {{ Former::text('postal_code') }}
</div> </div>
</div> </div>
@ -164,7 +183,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
{{ Button::block_primary_submit_lg(strtoupper(trans('texts.pay_now')) . ' - ' . Utils::formatMoney($invoice->amount, $client->currency_id) ) }} {{ Button::block_primary_submit_lg(strtoupper(trans('texts.pay_now')) . ' - ' . Utils::formatMoney($amount, $currencyId) ) }}
</div> </div>
</div> </div>
</div> </div>
@ -175,52 +194,6 @@
<!--
</div>
<div class="col-md-5 col-md-offset-1" style="background-color:#DDD;padding-top:16px">
<div class="row">
<div class="col-md-12">
{{ Former::text('card_number') }}
</div>
</div>
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6">
</div>
</div>
<div class="row">
<div class="col-md-6">
{{ Former::text('cvv') }}
</div>
</div>
</div>
<p>&nbsp;<p/>
<p>&nbsp;<p/>
<div class="row">
<div class="col-md-12">
{{ Button::block_primary_submit_lg(strtoupper(trans('texts.pay_now')) . ' - ' . Utils::formatMoney($invoice->amount, $client->currency_id) ) }}
</div>
</div>
</div>
-->
{{ Former::close() }} {{ Former::close() }}
@stop @stop

View File

@ -104,13 +104,14 @@
<li>{{ link_to('https://www.invoiceninja.com/about', 'About Us' ) }}</li> <li>{{ link_to('https://www.invoiceninja.com/about', 'About Us' ) }}</li>
<li>{{ link_to('https://www.invoiceninja.com/contact', 'Contact Us' ) }}</li> <li>{{ link_to('https://www.invoiceninja.com/contact', 'Contact Us' ) }}</li>
<li>{{ link_to('http://blog.invoiceninja.com', 'Blog' ) }}&nbsp;&nbsp;</li> <li>{{ link_to('http://blog.invoiceninja.com', 'Blog' ) }}&nbsp;&nbsp;</li>
<li><a href="https://www.facebook.com/invoiceninja" target="_blank"><span class="socicon">b</span></a></li>
<li><a href="https://twitter.com/invoiceninja" target="_blank"><span class="socicon">a</span></a></li> <li><a href="https://www.facebook.com/invoiceninja" target="_blank"><span class="socicon">b</span></a></li>
<li><a href="https://www.linkedin.com/company/invoice-ninja" target="_blank"><span class="socicon">j</span></a></li> <li><a href="https://twitter.com/invoiceninja" target="_blank"><span class="socicon">a</span></a></li>
<li><a href="https://plus.google.com/104031016152831072143" target="_blank"><span class="socicon">c</span></a></li> <li><a href="https://www.linkedin.com/company/invoice-ninja" target="_blank"><span class="socicon">j</span></a></li>
<li><a href="https://github.com/hillelcoren/invoice-ninja" target="_blank"><span class="socicon">Q</span></a></li> <li><a href="https://plus.google.com/104031016152831072143" target="_blank"><span class="socicon">c</span></a></li>
<li><a href="https://www.pinterest.com/invoiceninja" target="_blank"><span class="socicon">d</span></a></li> <li><a href="https://github.com/hillelcoren/invoice-ninja" target="_blank"><span class="socicon">Q</span></a></li>
<li><a href="http://blog.invoiceninja.com/feed/rss2" target="_blank"><span class="socicon">,</span></a></li> <li><a href="https://www.pinterest.com/invoiceninja" target="_blank"><span class="socicon">d</span></a></li>
<li><a href="http://blog.invoiceninja.com/feed/rss2" target="_blank"><span class="socicon">,</span></a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -118,7 +119,7 @@
<div class="navbar" style="margin-bottom:0px"> <div class="navbar" style="margin-bottom:0px">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand" href="https://www.invoiceninja.com/"><img src="{{ asset('images/invoiceninja-logo.png') }}"></a> <a class="navbar-brand" href="https://www.invoiceninja.com/"><img src="{{ asset('images/invoiceninja-logo.png') }}"></a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
@ -206,16 +207,16 @@
<!--<iframe src="http://ghbtns.com/github-btn.html?user=hillelcoren&repo=invoice-ninja&type=watch" allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe>--> <!--<iframe src="http://ghbtns.com/github-btn.html?user=hillelcoren&repo=invoice-ninja&type=watch" allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe>-->
<img src="{{ asset('images/footer-logo.png') }}"> <a href="{{ NINJA_URL }}"><img src="{{ asset('images/footer-logo.png') }}"></a>
<hr> <hr>
<ul class="navbar-vertical"> <ul class="navbar-vertical">
<li>{{ link_to('https://www.invoiceninja.com/features', 'Features' ) }}</li> <li>{{ link_to('https://www.invoiceninja.com/features', 'Features' ) }}</li>
<!-- <li>{{ link_to('https://www.invoiceninja.com/faq', 'FAQ' ) }}</li> -->
<li>{{ link_to('https://www.invoiceninja.com/about', 'About Us' ) }}</li>
<li>{{ link_to('https://www.invoiceninja.com/plans', 'Plans' ) }}</li> <li>{{ link_to('https://www.invoiceninja.com/plans', 'Plans' ) }}</li>
<li>{{ link_to('https://www.invoiceninja.com/contact', 'Contact Us' ) }}</li> <li>{{ link_to('https://www.invoiceninja.com/testimonials', 'Testimonials' ) }}</li>
<li>{{ link_to('https://www.invoiceninja.com/faq', 'FAQ' ) }}</li>
<li>{{ link_to('http://blog.invoiceninja.com', 'Blog' ) }}</li> <li>{{ link_to('http://blog.invoiceninja.com', 'Blog' ) }}</li>
<li>{{ link_to('login', Auth::check() ? 'My Account' : 'Login' ) }}</li> <li>{{ link_to('https://www.invoiceninja.com/about', 'About Us' ) }}</li>
<li>{{ link_to('https://www.invoiceninja.com/contact', 'Contact Us' ) }}</li>
</ul> </ul>
</div> </div>
@ -461,9 +462,13 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
@if (Request::secure())
<h3><img src="{{ asset('images/icon-secure-footer.png') }}" style="margin-right: 8px; margin-top: -5px;"></span>Safe & Secure</h3> <h3><img src="{{ asset('images/icon-secure-footer.png') }}" style="margin-right: 8px; margin-top: -5px;"></span>Safe & Secure</h3>
<img src="{{ asset('images/ssl-footer.png') }}"> <img src="{{ asset('images/ssl-footer.png') }}">
<hr> <hr>
@else
<h3>&nbsp;</h3>
@endif
<a href="http://opensource.org/" target="_blank"><img src="{{ asset('images/opensource-footer.png') }}"></a> <a href="http://opensource.org/" target="_blank"><img src="{{ asset('images/opensource-footer.png') }}"></a>
</div> </div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -298,10 +298,13 @@ section.features-splash,
section.upper-footer { section.upper-footer {
margin: 70px 0; margin: 70px 0;
} }
section.features, section.about, section.team, section.secure, section.testi { section.features, section.about, section.team, section.testi {
margin: 0; margin: 0;
padding: 100px 0; padding: 100px 0;
} }
section.secure {
padding: 50px 0 100px 0;
}
section.features1 { section.features1 {
padding-bottom: 0; padding-bottom: 0;
} }