2013-12-07 19:45:00 +01:00
|
|
|
@extends('master')
|
|
|
|
|
2013-11-26 13:45:07 +01:00
|
|
|
|
2014-01-30 23:29:09 +01:00
|
|
|
@section('head')
|
2014-04-28 22:05:37 +02:00
|
|
|
|
2015-04-10 09:18:07 +02:00
|
|
|
<link href="{{ asset('css/built.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
2014-11-11 18:47:31 +01:00
|
|
|
|
2014-11-12 22:09:42 +01:00
|
|
|
<style type="text/css">
|
2014-04-03 19:54:06 +02:00
|
|
|
|
2014-10-14 21:04:48 +02:00
|
|
|
body {
|
2014-11-12 22:09:42 +01:00
|
|
|
background-color: #EEEEEE;
|
|
|
|
padding-top: 114px;
|
2014-10-14 21:04:48 +02:00
|
|
|
}
|
2014-04-03 19:54:06 +02:00
|
|
|
|
2014-11-12 22:09:42 +01:00
|
|
|
/* Fix for header covering stuff when the screen is narrower */
|
|
|
|
@media screen and (min-width: 1200px) {
|
|
|
|
body {
|
|
|
|
padding-top: 56px;
|
|
|
|
}
|
|
|
|
}
|
2014-04-03 19:54:06 +02:00
|
|
|
|
2015-05-05 11:48:23 +02:00
|
|
|
@media screen and (max-width: 768px) {
|
|
|
|
body {
|
|
|
|
padding-top: 56px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-12 21:43:45 +02:00
|
|
|
@if (Auth::check() && Auth::user()->dark_mode)
|
|
|
|
body {
|
|
|
|
background: #000 !important;
|
|
|
|
color: white !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.panel-body {
|
|
|
|
background: #272822 !important;
|
|
|
|
/*background: #e6e6e6 !important;*/
|
|
|
|
}
|
|
|
|
|
|
|
|
.panel-default {
|
|
|
|
border-color: #444;
|
|
|
|
}
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
2014-11-12 22:09:42 +01:00
|
|
|
</style>
|
2014-04-03 19:54:06 +02:00
|
|
|
|
2014-11-12 22:09:42 +01:00
|
|
|
@include('script')
|
2014-03-27 13:25:31 +01:00
|
|
|
|
2015-04-22 21:21:04 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
function setTheme(id)
|
|
|
|
{
|
|
|
|
$('#theme_id').val(id);
|
|
|
|
$('form.themeForm').submit();
|
|
|
|
}
|
|
|
|
|
|
|
|
@if (!Auth::check() || !Auth::user()->registered)
|
|
|
|
function validateSignUp(showError)
|
|
|
|
{
|
|
|
|
var isFormValid = true;
|
|
|
|
$(['first_name','last_name','email','password']).each(function(i, field) {
|
|
|
|
var $input = $('form.signUpForm #new_'+field),
|
|
|
|
val = $.trim($input.val());
|
|
|
|
var isValid = val && val.length >= (field == 'password' ? 6 : 1);
|
|
|
|
if (isValid && field == 'email') {
|
|
|
|
isValid = isValidEmailAddress(val);
|
|
|
|
}
|
|
|
|
if (isValid) {
|
|
|
|
$input.closest('div.form-group').removeClass('has-error').addClass('has-success');
|
|
|
|
} else {
|
|
|
|
isFormValid = false;
|
|
|
|
$input.closest('div.form-group').removeClass('has-success');
|
|
|
|
if (showError) {
|
|
|
|
$input.closest('div.form-group').addClass('has-error');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!$('#terms_checkbox').is(':checked')) {
|
|
|
|
isFormValid = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#saveSignUpButton').prop('disabled', !isFormValid);
|
|
|
|
|
|
|
|
return isFormValid;
|
|
|
|
}
|
|
|
|
|
|
|
|
function validateServerSignUp()
|
|
|
|
{
|
|
|
|
if (!validateSignUp(true)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#signUpDiv, #signUpFooter').hide();
|
|
|
|
$('#working').show();
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type: 'POST',
|
|
|
|
url: '{{ URL::to('signup/validate') }}',
|
|
|
|
data: 'email=' + $('form.signUpForm #new_email').val(),
|
|
|
|
success: function(result) {
|
|
|
|
if (result == 'available') {
|
|
|
|
submitSignUp();
|
|
|
|
} else {
|
|
|
|
$('#errorTaken').show();
|
|
|
|
$('form.signUpForm #new_email').closest('div.form-group').removeClass('has-success').addClass('has-error');
|
|
|
|
$('#signUpDiv, #signUpFooter').show();
|
|
|
|
$('#working').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function submitSignUp() {
|
|
|
|
$.ajax({
|
|
|
|
type: 'POST',
|
|
|
|
url: '{{ URL::to('signup/submit') }}',
|
|
|
|
data: 'new_email=' + encodeURIComponent($('form.signUpForm #new_email').val()) +
|
|
|
|
'&new_password=' + encodeURIComponent($('form.signUpForm #new_password').val()) +
|
|
|
|
'&new_first_name=' + encodeURIComponent($('form.signUpForm #new_first_name').val()) +
|
|
|
|
'&new_last_name=' + encodeURIComponent($('form.signUpForm #new_last_name').val()) +
|
|
|
|
'&go_pro=' + $('#go_pro').val(),
|
|
|
|
success: function(result) {
|
|
|
|
if (result) {
|
|
|
|
localStorage.setItem('guest_key', '');
|
2015-10-02 10:32:13 +02:00
|
|
|
fbq('track', 'CompleteRegistration');
|
2015-10-06 19:55:55 +02:00
|
|
|
window._fbq.push(['track', '{{ env('FACEBOOK_PIXEL_SIGN_UP') }}', {'value':'0.00','currency':'USD'}]);
|
2015-06-01 15:06:18 +02:00
|
|
|
trackEvent('/account', '/signed_up');
|
2015-04-22 21:21:04 +02:00
|
|
|
NINJA.isRegistered = true;
|
|
|
|
$('#signUpButton').hide();
|
|
|
|
$('#myAccountButton').html(result);
|
|
|
|
}
|
|
|
|
$('#signUpSuccessDiv, #signUpFooter, #closeSignUpButton').show();
|
|
|
|
$('#working, #saveSignUpButton').hide();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function checkForEnter(event)
|
|
|
|
{
|
|
|
|
if (event.keyCode === 13){
|
|
|
|
event.preventDefault();
|
|
|
|
validateServerSignUp();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@endif
|
|
|
|
|
|
|
|
function logout(force)
|
|
|
|
{
|
|
|
|
if (force) {
|
|
|
|
NINJA.formIsChanged = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (force || NINJA.isRegistered) {
|
|
|
|
window.location = '{{ URL::to('logout') }}';
|
|
|
|
} else {
|
|
|
|
$('#logoutModal').modal('show');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-11 16:41:09 +02:00
|
|
|
function showSignUp() {
|
|
|
|
$('#signUpModal').modal('show');
|
|
|
|
}
|
|
|
|
|
|
|
|
function hideSignUp() {
|
|
|
|
$('#signUpModal').modal('hide');
|
2015-04-22 21:21:04 +02:00
|
|
|
}
|
|
|
|
|
2015-06-10 22:55:23 +02:00
|
|
|
NINJA.proPlanFeature = '';
|
|
|
|
function showProPlan(feature) {
|
|
|
|
$('#proPlanModal').modal('show');
|
2015-10-02 10:32:13 +02:00
|
|
|
fbq('track', 'InitiateCheckout');
|
2015-06-10 22:55:23 +02:00
|
|
|
trackEvent('/account', '/show_pro_plan/' + feature);
|
|
|
|
NINJA.proPlanFeature = feature;
|
|
|
|
}
|
|
|
|
|
|
|
|
function hideProPlan() {
|
|
|
|
$('#proPlanModal').modal('hide');
|
|
|
|
}
|
|
|
|
|
2015-04-22 21:21:04 +02:00
|
|
|
function buyProduct(affiliateKey, productId) {
|
|
|
|
window.open('{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/license?affiliate_key=' + affiliateKey + '&product_id=' + productId + '&return_url=' + window.location);
|
|
|
|
}
|
|
|
|
|
|
|
|
@if (Auth::check() && !Auth::user()->isPro())
|
2015-06-10 22:55:23 +02:00
|
|
|
function submitProPlan() {
|
2015-10-02 10:32:13 +02:00
|
|
|
fbq('track', 'AddPaymentInfo');
|
2015-06-10 22:55:23 +02:00
|
|
|
trackEvent('/account', '/submit_pro_plan/' + NINJA.proPlanFeature);
|
|
|
|
if (NINJA.isRegistered) {
|
2015-04-22 21:21:04 +02:00
|
|
|
$.ajax({
|
|
|
|
type: 'POST',
|
|
|
|
url: '{{ URL::to('account/go_pro') }}',
|
|
|
|
success: function(result) {
|
|
|
|
NINJA.formIsChanged = false;
|
2015-06-10 22:55:23 +02:00
|
|
|
window.location = '/payment/' + result;
|
2015-04-22 21:21:04 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
2015-06-10 22:55:23 +02:00
|
|
|
$('#proPlanModal').modal('hide');
|
2015-04-22 21:21:04 +02:00
|
|
|
$('#go_pro').val('true');
|
|
|
|
showSignUp();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@endif
|
|
|
|
|
|
|
|
function hideMessage() {
|
|
|
|
$('.alert-info').fadeOut();
|
|
|
|
$.get('/hide_message', function(response) {
|
|
|
|
console.log('Reponse: %s', response);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function wordWrapText(value, width)
|
|
|
|
{
|
|
|
|
@if (Auth::user()->account->auto_wrap)
|
|
|
|
var doc = new jsPDF('p', 'pt');
|
|
|
|
doc.setFont('Helvetica','');
|
|
|
|
doc.setFontSize(10);
|
|
|
|
|
|
|
|
var lines = value.split("\n");
|
|
|
|
for (var i = 0; i < lines.length; i++) {
|
|
|
|
var numLines = doc.splitTextToSize(lines[i], width).length;
|
|
|
|
if (numLines <= 1) continue;
|
|
|
|
var j = 0; space = lines[i].length;
|
|
|
|
while (j++ < lines[i].length) {
|
|
|
|
if (lines[i].charAt(j) === ' ') space = j;
|
|
|
|
}
|
|
|
|
if (space == lines[i].length) space = width/6;
|
|
|
|
lines[i + 1] = lines[i].substring(space + 1) + ' ' + (lines[i + 1] || '');
|
|
|
|
lines[i] = lines[i].substring(0, space);
|
|
|
|
}
|
|
|
|
|
|
|
|
var newValue = (lines.join("\n")).trim();
|
|
|
|
|
|
|
|
if (value == newValue) {
|
|
|
|
return newValue;
|
|
|
|
} else {
|
|
|
|
return wordWrapText(newValue, width);
|
|
|
|
}
|
|
|
|
@else
|
|
|
|
return value;
|
|
|
|
@endif
|
|
|
|
}
|
|
|
|
|
2015-10-11 16:41:09 +02:00
|
|
|
function setSignupEnabled(enabled) {
|
|
|
|
$('.signup-form input[type=text], .signup-form button').prop('disabled', !enabled);
|
|
|
|
}
|
|
|
|
|
2015-09-26 23:08:59 +02:00
|
|
|
$(function() {
|
2015-04-22 23:40:21 +02:00
|
|
|
window.setTimeout(function() {
|
2015-09-26 23:08:59 +02:00
|
|
|
$(".alert-hide").fadeOut();
|
2015-09-17 21:01:06 +02:00
|
|
|
}, 3000);
|
2015-04-22 23:40:21 +02:00
|
|
|
|
2015-07-07 22:08:16 +02:00
|
|
|
$('#search').blur(function(){
|
2015-08-11 16:38:36 +02:00
|
|
|
$('#search').css('width', '{{ Utils::isEnglish() ? 150 : 110 }}px');
|
2015-07-07 22:08:16 +02:00
|
|
|
$('ul.navbar-right').show();
|
|
|
|
});
|
|
|
|
|
2015-04-22 21:21:04 +02:00
|
|
|
$('#search').focus(function(){
|
2015-08-11 16:38:36 +02:00
|
|
|
$('#search').css('width', '{{ Utils::isEnglish() ? 256 : 216 }}px');
|
2015-07-07 22:08:16 +02:00
|
|
|
$('ul.navbar-right').hide();
|
2015-04-22 21:21:04 +02:00
|
|
|
if (!window.hasOwnProperty('searchData')) {
|
2015-10-11 16:41:09 +02:00
|
|
|
trackEvent('/activity', '/search');
|
|
|
|
$.get('{{ URL::route('getSearchData') }}', function(data) {
|
|
|
|
window.searchData = true;
|
2015-04-22 21:21:04 +02:00
|
|
|
var datasets = [];
|
|
|
|
for (var type in data)
|
2015-10-11 16:41:09 +02:00
|
|
|
{
|
|
|
|
if (!data.hasOwnProperty(type)) continue;
|
2015-04-22 21:21:04 +02:00
|
|
|
datasets.push({
|
|
|
|
name: type,
|
2015-10-11 16:41:09 +02:00
|
|
|
header: ' <b>' + type + '</b>',
|
2015-04-22 21:21:04 +02:00
|
|
|
local: data[type]
|
2015-10-11 16:41:09 +02:00
|
|
|
});
|
2015-04-22 21:21:04 +02:00
|
|
|
}
|
|
|
|
if (datasets.length == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$('#search').typeahead(datasets).on('typeahead:selected', function(element, datum, name) {
|
|
|
|
var type = name == 'Contacts' ? 'clients' : name.toLowerCase();
|
|
|
|
window.location = '{{ URL::to('/') }}' + '/' + type + '/' + datum.public_id;
|
|
|
|
}).focus().typeahead('setQuery', $('#search').val());
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (isStorageSupported()) {
|
|
|
|
@if (Auth::check() && !Auth::user()->registered)
|
|
|
|
localStorage.setItem('guest_key', '{{ Auth::user()->password }}');
|
|
|
|
@endif
|
|
|
|
}
|
|
|
|
|
|
|
|
@if (!Auth::check() || !Auth::user()->registered)
|
|
|
|
validateSignUp();
|
|
|
|
|
|
|
|
$('#signUpModal').on('shown.bs.modal', function () {
|
2015-06-01 15:06:18 +02:00
|
|
|
trackEvent('/account', '/view_sign_up');
|
2015-04-22 21:21:04 +02:00
|
|
|
$(['first_name','last_name','email','password']).each(function(i, field) {
|
|
|
|
var $input = $('form.signUpForm #new_'+field);
|
|
|
|
if (!$input.val()) {
|
|
|
|
$input.focus();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if (Auth::check() && !Utils::isNinja() && !Auth::user()->registered)
|
|
|
|
$('#closeSignUpButton').hide();
|
|
|
|
showSignUp();
|
|
|
|
@elseif(Session::get('sign_up') || Input::get('sign_up'))
|
|
|
|
showSignUp();
|
|
|
|
@endif
|
|
|
|
|
2015-07-12 21:43:45 +02:00
|
|
|
$('ul.navbar-settings, ul.navbar-history').hover(function () {
|
|
|
|
if ($('.user-accounts').css('display') == 'block') {
|
|
|
|
$('.user-accounts').dropdown('toggle');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-04-22 21:21:04 +02:00
|
|
|
@yield('onReady')
|
|
|
|
|
2015-08-14 14:04:33 +02:00
|
|
|
@if (Input::has('focus'))
|
|
|
|
$('#{{ Input::get('focus') }}').focus();
|
|
|
|
@endif
|
|
|
|
|
2015-10-11 16:41:09 +02:00
|
|
|
// Ensure terms is checked for sign up form
|
|
|
|
@if (Auth::check() && !Auth::user()->registered)
|
|
|
|
setSignupEnabled(false);
|
|
|
|
$("#terms_checkbox").change(function() {
|
|
|
|
setSignupEnabled(this.checked);
|
|
|
|
});
|
|
|
|
@endif
|
|
|
|
|
2015-04-22 21:21:04 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2013-12-07 19:45:00 +01:00
|
|
|
@stop
|
2013-11-27 08:38:37 +01:00
|
|
|
|
2013-12-07 19:45:00 +01:00
|
|
|
@section('body')
|
2014-04-03 19:54:06 +02:00
|
|
|
|
|
|
|
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<div class="navbar-header">
|
|
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
|
|
|
|
<span class="sr-only">Toggle navigation</span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
</button>
|
2015-07-07 22:08:16 +02:00
|
|
|
<a href="{{ URL::to(NINJA_WEB_URL) }}" class='navbar-brand' target="_blank">
|
2014-02-16 21:32:25 +01:00
|
|
|
<img src="{{ asset('images/invoiceninja-logo.png') }}" style="height:18px;width:auto"/>
|
|
|
|
</a>
|
2014-04-03 19:54:06 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
|
|
|
<ul class="nav navbar-nav" style="font-weight: bold">
|
2015-03-26 04:48:41 +01:00
|
|
|
{!! HTML::nav_link('dashboard', 'dashboard') !!}
|
|
|
|
{!! HTML::menu_link('client') !!}
|
2015-05-27 18:52:10 +02:00
|
|
|
{!! HTML::menu_link('task') !!}
|
2015-03-26 04:48:41 +01:00
|
|
|
{!! HTML::menu_link('invoice') !!}
|
|
|
|
{!! HTML::menu_link('payment') !!}
|
2014-04-03 19:54:06 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="navbar-form navbar-right">
|
2014-05-25 12:57:19 +02:00
|
|
|
@if (Auth::check())
|
|
|
|
@if (!Auth::user()->registered)
|
2015-04-05 21:15:37 +02:00
|
|
|
{!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal'))->small() !!}
|
2014-05-25 12:57:19 +02:00
|
|
|
@elseif (!Auth::user()->isPro())
|
2015-06-10 22:55:23 +02:00
|
|
|
{!! Button::success(trans('texts.go_pro'))->withAttributes(array('id' => 'proPlanButton', 'onclick' => 'showProPlan("")'))->small() !!}
|
2014-05-25 12:57:19 +02:00
|
|
|
@endif
|
2014-04-22 22:10:14 +02:00
|
|
|
@endif
|
2014-03-19 17:17:26 +01:00
|
|
|
|
2015-06-16 21:35:35 +02:00
|
|
|
<div class="btn-group user-dropdown">
|
2014-04-03 19:54:06 +02:00
|
|
|
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
|
2015-02-12 21:50:05 +01:00
|
|
|
<div id="myAccountButton" class="ellipsis" style="max-width:100px">
|
2015-06-16 21:35:35 +02:00
|
|
|
@if (session(SESSION_USER_ACCOUNTS) && count(session(SESSION_USER_ACCOUNTS)))
|
|
|
|
{{ Auth::user()->account->getDisplayName() }}
|
|
|
|
@else
|
|
|
|
{{ Auth::user()->getDisplayName() }}
|
|
|
|
@endif
|
2014-11-12 16:22:54 +01:00
|
|
|
<span class="caret"></span>
|
|
|
|
</div>
|
2014-04-03 19:54:06 +02:00
|
|
|
</button>
|
2015-08-03 09:15:58 +02:00
|
|
|
<ul class="dropdown-menu user-accounts">
|
2015-06-16 21:35:35 +02:00
|
|
|
@if (session(SESSION_USER_ACCOUNTS))
|
|
|
|
@foreach (session(SESSION_USER_ACCOUNTS) as $item)
|
2015-07-07 22:08:16 +02:00
|
|
|
@if ($item->user_id == Auth::user()->id)
|
|
|
|
@include('user_account', [
|
|
|
|
'user_account_id' => $item->id,
|
|
|
|
'user_id' => $item->user_id,
|
|
|
|
'account_name' => $item->account_name,
|
|
|
|
'user_name' => $item->user_name,
|
2015-08-07 08:14:29 +02:00
|
|
|
'logo_path' => isset($item->logo_path) ? $item->logo_path : "",
|
2015-07-07 22:08:16 +02:00
|
|
|
'selected' => true,
|
|
|
|
])
|
|
|
|
@endif
|
|
|
|
@endforeach
|
|
|
|
@foreach (session(SESSION_USER_ACCOUNTS) as $item)
|
|
|
|
@if ($item->user_id != Auth::user()->id)
|
|
|
|
@include('user_account', [
|
|
|
|
'user_account_id' => $item->id,
|
|
|
|
'user_id' => $item->user_id,
|
|
|
|
'account_name' => $item->account_name,
|
|
|
|
'user_name' => $item->user_name,
|
2015-08-07 08:14:29 +02:00
|
|
|
'logo_path' => isset($item->logo_path) ? $item->logo_path : "",
|
2015-07-07 22:08:16 +02:00
|
|
|
'selected' => false,
|
|
|
|
])
|
|
|
|
@endif
|
2015-06-16 21:35:35 +02:00
|
|
|
@endforeach
|
|
|
|
@else
|
2015-07-07 22:08:16 +02:00
|
|
|
@include('user_account', [
|
|
|
|
'account_name' => Auth::user()->account->name ?: trans('texts.untitled'),
|
|
|
|
'user_name' => Auth::user()->getDisplayName(),
|
2015-08-07 08:14:29 +02:00
|
|
|
'logo_path' => Auth::user()->account->getLogoPath(),
|
2015-07-07 22:08:16 +02:00
|
|
|
'selected' => true,
|
|
|
|
])
|
2015-06-16 21:35:35 +02:00
|
|
|
@endif
|
|
|
|
<li class="divider"></li>
|
2015-08-03 09:15:58 +02:00
|
|
|
@if (count(session(SESSION_USER_ACCOUNTS)) > 1)
|
|
|
|
<li>{!! link_to('/manage_companies', trans('texts.manage_companies')) !!}</li>
|
2015-08-07 08:14:29 +02:00
|
|
|
@elseif (!session(SESSION_USER_ACCOUNTS) || count(session(SESSION_USER_ACCOUNTS)) < 5)
|
|
|
|
<li>{!! link_to('/login?new_company=true', trans('texts.add_company')) !!}</li>
|
2015-08-03 09:15:58 +02:00
|
|
|
@endif
|
2015-06-16 21:35:35 +02:00
|
|
|
<li>{!! link_to('#', trans('texts.logout'), array('onclick'=>'logout()')) !!}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2015-07-12 21:43:45 +02:00
|
|
|
<ul class="nav navbar-nav navbar-right navbar-settings">
|
2015-06-16 21:35:35 +02:00
|
|
|
<li class="dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
|
|
<span class="glyphicon glyphicon-cog" title="{{ trans('texts.settings') }}"/>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu">
|
2015-03-26 07:24:02 +01:00
|
|
|
<li>{!! link_to('company/details', uctrans('texts.company_details')) !!}</li>
|
|
|
|
<li>{!! link_to('company/payments', uctrans('texts.online_payments')) !!}</li>
|
|
|
|
<li>{!! link_to('company/products', uctrans('texts.product_library')) !!}</li>
|
|
|
|
<li>{!! link_to('company/notifications', uctrans('texts.notifications')) !!}</li>
|
|
|
|
<li>{!! link_to('company/import_export', uctrans('texts.import_export')) !!}</li>
|
2015-07-21 20:51:56 +02:00
|
|
|
<li><a href="{{ url('company/advanced_settings/invoice_design') }}">{!! uctrans('texts.advanced_settings') . Utils::getProLabel(ACCOUNT_ADVANCED_SETTINGS) !!}</a></li>
|
2014-04-03 19:54:06 +02:00
|
|
|
</ul>
|
2015-06-16 21:35:35 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
2014-04-03 19:54:06 +02:00
|
|
|
|
|
|
|
|
2015-07-12 21:43:45 +02:00
|
|
|
<ul class="nav navbar-nav navbar-right navbar-history">
|
2014-04-03 19:54:06 +02:00
|
|
|
<li class="dropdown">
|
2014-11-12 16:22:54 +01:00
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
2015-06-12 10:39:53 +02:00
|
|
|
<span class="glyphicon glyphicon-time" title="{{ trans('texts.history') }}"/>
|
2014-11-12 16:22:54 +01:00
|
|
|
</a>
|
2014-04-03 19:54:06 +02:00
|
|
|
<ul class="dropdown-menu">
|
|
|
|
@if (count(Session::get(RECENTLY_VIEWED)) == 0)
|
2015-06-12 10:39:53 +02:00
|
|
|
<li><a href="#">{{ trans('texts.no_items') }}</a></li>
|
2014-04-03 19:54:06 +02:00
|
|
|
@else
|
2015-06-12 10:39:53 +02:00
|
|
|
@foreach (Session::get(RECENTLY_VIEWED) as $link)
|
2015-07-30 16:44:47 +02:00
|
|
|
@if (property_exists($link, 'accountId') && $link->accountId == Auth::user()->account_id)
|
|
|
|
<li><a href="{{ $link->url }}">{{ $link->name }}</a></li>
|
|
|
|
@endif
|
2015-06-12 10:39:53 +02:00
|
|
|
@endforeach
|
2014-04-03 19:54:06 +02:00
|
|
|
@endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2015-06-16 21:35:35 +02:00
|
|
|
|
|
|
|
<form class="navbar-form navbar-right" role="search">
|
|
|
|
<div class="form-group">
|
2015-08-11 16:38:36 +02:00
|
|
|
<input type="text" id="search" style="width: {{ Utils::isEnglish() ? 150 : 110 }}px"
|
2015-06-16 21:35:35 +02:00
|
|
|
class="form-control" placeholder="{{ trans('texts.search') }}">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
2014-04-23 15:46:52 +02:00
|
|
|
|
|
|
|
|
2014-04-03 19:54:06 +02:00
|
|
|
</div><!-- /.navbar-collapse -->
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<br/>
|
2015-09-28 22:37:32 +02:00
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
@include('partials.warn_session', ['redirectTo' => '/dashboard'])
|
2015-09-26 23:08:59 +02:00
|
|
|
|
2014-03-18 21:43:12 +01:00
|
|
|
@if (Session::has('warning'))
|
2015-06-14 16:49:13 +02:00
|
|
|
<div class="alert alert-warning">{!! Session::get('warning') !!}</div>
|
2014-03-18 21:43:12 +01:00
|
|
|
@endif
|
|
|
|
|
2014-02-01 21:01:32 +01:00
|
|
|
@if (Session::has('message'))
|
2015-04-22 23:40:21 +02:00
|
|
|
<div class="alert alert-info alert-hide">
|
2014-10-05 23:00:42 +02:00
|
|
|
{{ Session::get('message') }}
|
|
|
|
</div>
|
|
|
|
@elseif (Session::has('news_feed_message'))
|
|
|
|
<div class="alert alert-info">
|
2015-04-13 09:54:51 +02:00
|
|
|
{!! Session::get('news_feed_message') !!}
|
2014-10-05 23:00:42 +02:00
|
|
|
<a href="#" onclick="hideMessage()" class="pull-right">{{ trans('texts.hide') }}</a>
|
|
|
|
</div>
|
2014-02-01 21:01:32 +01:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@if (Session::has('error'))
|
2015-09-26 23:08:59 +02:00
|
|
|
<div class="alert alert-danger">{!! Session::get('error') !!}</div>
|
2014-02-01 21:01:32 +01:00
|
|
|
@endif
|
2013-11-26 13:45:07 +01:00
|
|
|
|
2015-05-27 18:52:10 +02:00
|
|
|
@if (!isset($showBreadcrumbs) || $showBreadcrumbs)
|
2015-09-26 23:08:59 +02:00
|
|
|
{!! HTML::breadcrumbs() !!}
|
2015-05-27 18:52:10 +02:00
|
|
|
@endif
|
|
|
|
|
2014-04-03 19:54:06 +02:00
|
|
|
@yield('content')
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if (!Auth::check() || !Auth::user()->registered)
|
|
|
|
<div class="modal fade" id="signUpModal" tabindex="-1" role="dialog" aria-labelledby="signUpModalLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
2014-04-06 11:02:04 +02:00
|
|
|
<h4 class="modal-title" id="myModalLabel">{{ trans('texts.sign_up') }}</h4>
|
2014-04-03 19:54:06 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="background-color: #fff; padding-right:20px" id="signUpDiv" onkeyup="validateSignUp()" onclick="validateSignUp()" onkeydown="checkForEnter(event)">
|
|
|
|
<br/>
|
|
|
|
|
2015-03-26 04:48:41 +01:00
|
|
|
{!! Former::open('signup/submit')->addClass('signUpForm') !!}
|
2014-04-03 19:54:06 +02:00
|
|
|
|
|
|
|
@if (Auth::check())
|
2015-03-26 04:48:41 +01:00
|
|
|
{!! Former::populateField('new_first_name', Auth::user()->first_name) !!}
|
|
|
|
{!! Former::populateField('new_last_name', Auth::user()->last_name) !!}
|
|
|
|
{!! Former::populateField('new_email', Auth::user()->email) !!}
|
2014-04-03 19:54:06 +02:00
|
|
|
@endif
|
|
|
|
|
2014-04-13 10:19:10 +02:00
|
|
|
<div style="display:none">
|
2015-03-26 04:48:41 +01:00
|
|
|
{!! Former::text('path')->value(Request::path()) !!}
|
|
|
|
{!! Former::text('go_pro') !!}
|
2014-04-13 10:19:10 +02:00
|
|
|
</div>
|
|
|
|
|
2015-10-11 16:41:09 +02:00
|
|
|
|
|
|
|
<div class="row signup-form">
|
|
|
|
<div class="col-md-11 col-md-offset-1">
|
|
|
|
{!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.URL::to('terms').'" target="_blank">'.trans('texts.terms_of_service').'</a>']))->raw() !!}
|
|
|
|
<br/>
|
|
|
|
</div>
|
|
|
|
@if (Utils::isNinja())
|
|
|
|
<div class="col-md-4 col-md-offset-1">
|
|
|
|
<h4>{{ trans('texts.sign_up_using') }}</h4><br/>
|
|
|
|
@include('partials.social_login_buttons', ['type' => 'sign_up'])
|
|
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
|
|
<div style="border-right:thin solid #CCCCCC;height:110px;width:8px;margin-bottom:10px;"></div>
|
|
|
|
{{ trans('texts.or') }}
|
|
|
|
<div style="border-right:thin solid #CCCCCC;height:110px;width:8px;margin-top:10px;"></div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
@else
|
|
|
|
<div class="col-md-12">
|
|
|
|
@endif
|
|
|
|
{{ Former::setOption('TwitterBootstrap3.labelWidths.large', 1) }}
|
|
|
|
{{ Former::setOption('TwitterBootstrap3.labelWidths.small', 1) }}
|
|
|
|
{!! Former::text('new_first_name')->placeholder(trans('texts.first_name'))->label(' ') !!}
|
|
|
|
{!! Former::text('new_last_name')->placeholder(trans('texts.last_name'))->label(' ') !!}
|
|
|
|
{!! Former::text('new_email')->placeholder(trans('texts.email'))->label(' ') !!}
|
|
|
|
{!! Former::password('new_password')->placeholder(trans('texts.password'))->label(' ') !!}
|
|
|
|
{{ Former::setOption('TwitterBootstrap3.labelWidths.large', 4) }}
|
|
|
|
{{ Former::setOption('TwitterBootstrap3.labelWidths.small', 4) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-03-26 04:48:41 +01:00
|
|
|
{!! Former::close() !!}
|
2014-03-10 12:04:15 +01:00
|
|
|
|
2014-04-06 11:02:04 +02:00
|
|
|
<center><div id="errorTaken" style="display:none"> <br/>{{ trans('texts.email_taken') }}</div></center>
|
2014-04-03 19:54:06 +02:00
|
|
|
<br/>
|
2014-03-10 12:04:15 +01:00
|
|
|
|
2014-04-03 19:54:06 +02:00
|
|
|
</div>
|
2013-12-02 20:54:24 +01:00
|
|
|
|
2014-04-03 19:54:06 +02:00
|
|
|
<div style="padding-left:40px;padding-right:40px;display:none;min-height:130px" id="working">
|
2014-04-06 11:02:04 +02:00
|
|
|
<h3>{{ trans('texts.working') }}...</h3>
|
2014-04-03 19:54:06 +02:00
|
|
|
<div class="progress progress-striped active">
|
|
|
|
<div class="progress-bar" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
|
|
|
|
</div>
|
2014-01-30 23:29:09 +01:00
|
|
|
</div>
|
|
|
|
|
2014-02-23 15:51:52 +01:00
|
|
|
<div style="background-color: #fff; padding-right:20px;padding-left:20px; display:none" id="signUpSuccessDiv">
|
2014-04-03 19:54:06 +02:00
|
|
|
<br/>
|
2014-04-06 11:02:04 +02:00
|
|
|
<h3>{{ trans('texts.success') }}</h3>
|
2014-11-11 09:29:43 +01:00
|
|
|
@if (Utils::isNinja())
|
2014-11-19 20:51:53 +01:00
|
|
|
{{ trans('texts.success_message') }}
|
2014-11-11 09:29:43 +01:00
|
|
|
@endif
|
2014-11-19 20:51:53 +01:00
|
|
|
<br/>
|
2014-01-30 23:29:09 +01:00
|
|
|
</div>
|
|
|
|
|
2014-04-03 19:54:06 +02:00
|
|
|
<div class="modal-footer" id="signUpFooter" style="margin-top: 0px">
|
2014-11-11 09:29:43 +01:00
|
|
|
<button type="button" class="btn btn-default" id="closeSignUpButton" data-dismiss="modal">{{ trans('texts.close') }} <i class="glyphicon glyphicon-remove-circle"></i></button>
|
2014-04-10 21:29:01 +02:00
|
|
|
<button type="button" class="btn btn-primary" id="saveSignUpButton" onclick="validateServerSignUp()" disabled>{{ trans('texts.save') }} <i class="glyphicon glyphicon-floppy-disk"></i></button>
|
2014-04-03 19:54:06 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-05 21:56:34 +01:00
|
|
|
|
2014-04-03 19:54:06 +02:00
|
|
|
|
|
|
|
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="logoutModalLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
2014-04-06 11:02:04 +02:00
|
|
|
<h4 class="modal-title" id="myModalLabel">{{ trans('texts.logout') }}</h4>
|
2014-04-03 19:54:06 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container">
|
2014-04-06 11:02:04 +02:00
|
|
|
<h3>{{ trans('texts.are_you_sure') }}</h3>
|
|
|
|
<p>{{ trans('texts.erase_data') }}</p>
|
2014-04-03 19:54:06 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer" id="signUpFooter">
|
2014-04-06 11:02:04 +02:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
|
|
|
|
<button type="button" class="btn btn-primary" onclick="logout(true)">{{ trans('texts.logout') }}</button>
|
2014-04-03 19:54:06 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2014-04-22 17:10:41 +02:00
|
|
|
@if (Auth::check() && !Auth::user()->isPro())
|
|
|
|
<div class="modal fade" id="proPlanModal" tabindex="-1" role="dialog" aria-labelledby="proPlanModalLabel" aria-hidden="true">
|
2015-06-10 22:55:23 +02:00
|
|
|
<div class="modal-dialog large-dialog">
|
|
|
|
<div class="modal-content pro-plan-modal">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pull-right">
|
|
|
|
<img onclick="hideProPlan()" class="close" src="{{ asset('images/pro_plan/close.png') }}"/>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-md-7 left-side">
|
|
|
|
<center>
|
|
|
|
<h2>{{ trans('texts.pro_plan_title') }}</h2>
|
|
|
|
<img class="img-responsive price" alt="Only $50 Per Year" src="{{ asset('images/pro_plan/price.png') }}"/>
|
|
|
|
<a class="button" href="#" onclick="submitProPlan()">{{ trans('texts.pro_plan_call_to_action') }}</a>
|
|
|
|
</center>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<ul>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature1') }}</li>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature2') }}</li>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature3') }}</li>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature4') }}</li>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature5') }}</li>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature6') }}</li>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature7') }}</li>
|
|
|
|
<li>{{ trans('texts.pro_plan_feature8') }}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2014-04-22 17:10:41 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
2015-07-07 22:08:16 +02:00
|
|
|
{{-- Per our license, please do not remove or modify this section. --}}
|
2015-08-14 14:04:33 +02:00
|
|
|
@if (!Utils::isNinjaProd())
|
2015-08-16 19:14:03 +02:00
|
|
|
<p> </p>
|
2014-11-16 21:30:19 +01:00
|
|
|
<div class="container">
|
2015-09-25 11:57:40 +02:00
|
|
|
{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/?utm_source=powered_by" target="_blank">InvoiceNinja.com</a> -
|
|
|
|
{!! link_to(GITHUB_RELEASES, 'v' . NINJA_VERSION, ['target' => '_blank']) !!} |
|
2014-11-16 21:30:19 +01:00
|
|
|
@if (Auth::user()->account->isWhiteLabel())
|
|
|
|
{{ trans('texts.white_labeled') }}
|
|
|
|
@else
|
|
|
|
<a href="#" onclick="$('#whiteLabelModal').modal('show');">{{ trans('texts.white_label_link') }}</a>
|
|
|
|
|
|
|
|
<div class="modal fade" id="whiteLabelModal" tabindex="-1" role="dialog" aria-labelledby="whiteLabelModalLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<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="myModalLabel">{{ trans('texts.white_label_header') }}</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="background-color: #fff; padding:20px">
|
2014-12-03 23:05:38 +01:00
|
|
|
<p>{{ trans('texts.white_label_text')}}</p>
|
2014-11-16 21:30:19 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer" id="signUpFooter" style="margin-top: 0px">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.close') }} </button>
|
2015-03-11 22:37:43 +01:00
|
|
|
{{-- DropdownButton::success_lg(trans('texts.buy'), [
|
|
|
|
['url' => URL::to(""), 'label' => trans('texts.pay_with_paypal')],
|
|
|
|
['url' => URL::to(""), 'label' => trans('texts.pay_with_card')]
|
|
|
|
])->addClass('btn-lg') --}}
|
2014-11-16 21:30:19 +01:00
|
|
|
<button type="button" class="btn btn-primary" onclick="buyProduct('{{ WHITE_LABEL_AFFILIATE_KEY }}', '{{ PRODUCT_WHITE_LABEL }}')">{{ trans('texts.buy') }} </button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2014-04-03 19:54:06 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
2014-03-19 17:17:26 +01:00
|
|
|
|
2013-12-07 19:45:00 +01:00
|
|
|
@stop
|