mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Added confirm when saving recurring invoice
This commit is contained in:
parent
8bc065cd74
commit
84cf760785
@ -12,19 +12,16 @@ class CreatePaymentLibraries extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('payment_libraries');
|
Schema::dropIfExists('payment_libraries');
|
||||||
|
|
||||||
Schema::create('payment_libraries', function($t)
|
Schema::create('payment_libraries', function($t)
|
||||||
{
|
{
|
||||||
$t->increments('id');
|
$t->increments('id');
|
||||||
$t->timestamps();
|
$t->timestamps();
|
||||||
|
|
||||||
$t->string('name');
|
$t->string('name');
|
||||||
$t->boolean('visible')->default(true);
|
$t->boolean('visible')->default(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
DB::table('payment_libraries')->insert(['name' => 'Omnipay']);
|
|
||||||
DB::table('payment_libraries')->insert(['name' => 'PHP-Payments']);
|
|
||||||
|
|
||||||
Schema::table('gateways', function($table)
|
Schema::table('gateways', function($table)
|
||||||
{
|
{
|
||||||
@ -35,7 +32,7 @@ class CreatePaymentLibraries extends Migration {
|
|||||||
|
|
||||||
Schema::table('gateways', function($table)
|
Schema::table('gateways', function($table)
|
||||||
{
|
{
|
||||||
$table->foreign('payment_library_id')->references('id')->on('payment_libraries')->onDelete('cascade');
|
$table->foreign('payment_library_id')->references('id')->on('payment_libraries')->onDelete('cascade');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,8 +129,9 @@ class ConstantsSeeder extends Seeder
|
|||||||
Currency::create(array('name' => 'Danish Krone', 'code' => 'DKK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'Danish Krone', 'code' => 'DKK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
Currency::create(array('name' => 'Israeli Shekel', 'code' => 'ILS', 'symbol' => 'NIS ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'Israeli Shekel', 'code' => 'ILS', 'symbol' => 'NIS ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
Currency::create(array('name' => 'Singapore Dollar', 'code' => 'SGD', 'symbol' => 'SGD ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'Singapore Dollar', 'code' => 'SGD', 'symbol' => 'SGD ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
Currency::create(array('name' => 'Swedish Krona', 'code' => 'SEK', 'symbol' => 'kr', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'Swedish Krona', 'code' => 'SEK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
Currency::create(array('name' => 'Norske Kroner', 'code' => 'NOK', 'symbol' => 'kr', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'Norske Kroner', 'code' => 'NOK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
|
Currency::create(array('name' => 'Kenyan Shilling', 'code' => 'KES', 'symbol' => 'KSh ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
|
|
||||||
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
|
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
|
||||||
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
|
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
|
||||||
@ -148,6 +149,9 @@ class ConstantsSeeder extends Seeder
|
|||||||
DateFormat::create(array('format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013'));
|
DateFormat::create(array('format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013'));
|
||||||
DateFormat::create(array('format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013'));
|
DateFormat::create(array('format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013'));
|
||||||
|
|
||||||
|
PaymentLibrary::create(['name' => 'Omnipay']);
|
||||||
|
PaymentLibrary::create(['name' => 'PHP-Payments']);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05.
|
d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05.
|
||||||
D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday.
|
D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday.
|
||||||
|
@ -404,5 +404,8 @@ return array(
|
|||||||
'pending' => 'Pending',
|
'pending' => 'Pending',
|
||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -420,4 +420,8 @@ return array(
|
|||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
@ -402,5 +402,8 @@ return array(
|
|||||||
'pending' => 'Pending',
|
'pending' => 'Pending',
|
||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -404,5 +404,8 @@ return array(
|
|||||||
'pending' => 'Pending',
|
'pending' => 'Pending',
|
||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -404,5 +404,8 @@ return array(
|
|||||||
'pending' => 'Pending',
|
'pending' => 'Pending',
|
||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -420,6 +420,9 @@ return array(
|
|||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -420,4 +420,7 @@ return array(
|
|||||||
'deleted_user' => 'Bruker slettet',
|
'deleted_user' => 'Bruker slettet',
|
||||||
'limit_users' => 'Dessverre, vil dette overstiger grensen på ' . MAX_NUM_USERS . ' brukere',
|
'limit_users' => 'Dessverre, vil dette overstiger grensen på ' . MAX_NUM_USERS . ' brukere',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
);
|
);
|
@ -405,5 +405,8 @@ return array(
|
|||||||
'pending' => 'Pending',
|
'pending' => 'Pending',
|
||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -393,5 +393,8 @@ return array(
|
|||||||
'pending' => 'Pending',
|
'pending' => 'Pending',
|
||||||
'deleted_user' => 'Successfully deleted user',
|
'deleted_user' => 'Successfully deleted user',
|
||||||
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
|
||||||
|
|
||||||
|
'confirm_email_invoice' => 'Confirm emailing this invoice',
|
||||||
|
'confirm_email_quote' => 'Confirm emailing this quote',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
class PaymentLibrary extends Eloquent
|
class PaymentLibrary extends Eloquent
|
||||||
{
|
{
|
||||||
protected $table = 'payment_libraries';
|
protected $table = 'payment_libraries';
|
||||||
|
public $timestamps = true;
|
||||||
|
|
||||||
public function gateways()
|
public function gateways()
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ Route::post('/contact_submit', 'HomeController@doContactUs');
|
|||||||
Route::get('/faq', 'HomeController@showFaq');
|
Route::get('/faq', 'HomeController@showFaq');
|
||||||
Route::get('/features', 'HomeController@showFeatures');
|
Route::get('/features', 'HomeController@showFeatures');
|
||||||
Route::get('/testimonials', 'HomeController@showTestimonials');
|
Route::get('/testimonials', 'HomeController@showTestimonials');
|
||||||
Route::get('/compare-online-invoicing-sites', 'HomeController@showCompare');
|
Route::get('/compare-online-invoicing', 'HomeController@showCompare');
|
||||||
|
|
||||||
Route::get('log_error', 'HomeController@logError');
|
Route::get('log_error', 'HomeController@logError');
|
||||||
Route::get('invoice_now', 'HomeController@invoiceNow');
|
Route::get('invoice_now', 'HomeController@invoiceNow');
|
||||||
|
@ -723,17 +723,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onEmailClick() {
|
function onEmailClick() {
|
||||||
@if (Auth::user()->confirmed)
|
if (confirm('{{ trans("texts.confirm_email_$entityType") }}')) {
|
||||||
if (confirm('Are you sure you want to email this {{ $entityType }}?')) {
|
|
||||||
submitAction('email');
|
submitAction('email');
|
||||||
}
|
}
|
||||||
@else
|
|
||||||
submitAction('email');
|
|
||||||
@endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSaveClick() {
|
function onSaveClick() {
|
||||||
submitAction('');
|
if (model.invoice().is_recurring()) {
|
||||||
|
if (confirm('{{ trans("texts.confirm_email_$entityType") }}')) {
|
||||||
|
submitAction('');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
submitAction('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitAction(value) {
|
function submitAction(value) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: '{{ URL::to('log_error') }}',
|
url: '{{ URL::to('log_error') }}',
|
||||||
data: 'error='+encodeURIComponent(e)+'&url='+encodeURIComponent(window.location)
|
data: 'error='+encodeURIComponent(e.message + ' - ' + e.filename + ': ' + e.lineno)+'&url='+encodeURIComponent(window.location)
|
||||||
});
|
});
|
||||||
} catch(err) {}
|
} catch(err) {}
|
||||||
return false;
|
return false;
|
||||||
|
@ -135,6 +135,7 @@
|
|||||||
<li class="hide-desktop">{{ link_to('https://www.invoiceninja.com/contact', 'Contact Us' ) }}</li>
|
<li class="hide-desktop">{{ link_to('https://www.invoiceninja.com/contact', 'Contact Us' ) }}</li>
|
||||||
<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/plans', 'Plans' ) }}</li>
|
<li>{{ link_to('https://www.invoiceninja.com/plans', 'Plans' ) }}</li>
|
||||||
|
<li>{{ link_to('https://www.invoiceninja.com/compare-online-invoicing', 'Compare' ) }}</li>
|
||||||
<li>{{ link_to('https://www.invoiceninja.com/testimonials', 'Testimonials' ) }}</li>
|
<li>{{ link_to('https://www.invoiceninja.com/testimonials', 'Testimonials' ) }}</li>
|
||||||
<li>{{ link_to('https://www.invoiceninja.com/faq', 'FAQ' ) }}</li>
|
<li>{{ link_to('https://www.invoiceninja.com/faq', 'FAQ' ) }}</li>
|
||||||
<li><span class="glyphicon glyphicon-user"></span>
|
<li><span class="glyphicon glyphicon-user"></span>
|
||||||
@ -214,6 +215,7 @@
|
|||||||
<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/plans', 'Plans' ) }}</li>
|
<li>{{ link_to('https://www.invoiceninja.com/plans', 'Plans' ) }}</li>
|
||||||
|
<li>{{ link_to('https://www.invoiceninja.com/compare-online-invoicing', 'Compare' ) }}</li>
|
||||||
<li>{{ link_to('https://www.invoiceninja.com/testimonials', 'Testimonials' ) }}</li>
|
<li>{{ link_to('https://www.invoiceninja.com/testimonials', 'Testimonials' ) }}</li>
|
||||||
<li>{{ link_to('https://www.invoiceninja.com/faq', 'FAQ' ) }}</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>
|
||||||
|
@ -46614,7 +46614,7 @@ function GetReportTemplate1(doc, invoice, layout, checkMath)
|
|||||||
var left = layout.headerRight - invoice.imageWidth;
|
var left = layout.headerRight - invoice.imageWidth;
|
||||||
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30);
|
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!invoice.is_pro && logoImages.imageLogo1)
|
if (!invoice.is_pro && logoImages.imageLogo1)
|
||||||
{
|
{
|
||||||
pageHeight=820;
|
pageHeight=820;
|
||||||
@ -46622,7 +46622,6 @@ function GetReportTemplate1(doc, invoice, layout, checkMath)
|
|||||||
doc.addImage(logoImages.imageLogo1, 'JPEG', layout.marginLeft, y, logoImages.imageLogoWidth1, logoImages.imageLogoHeight1);
|
doc.addImage(logoImages.imageLogo1, 'JPEG', layout.marginLeft, y, logoImages.imageLogoWidth1, logoImages.imageLogoHeight1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
doc.setFontSize(9);
|
doc.setFontSize(9);
|
||||||
SetPdfColor('LightBlue', doc, 'primary');
|
SetPdfColor('LightBlue', doc, 'primary');
|
||||||
displayAccount(doc, invoice, 220, layout.accountTop, layout);
|
displayAccount(doc, invoice, 220, layout.accountTop, layout);
|
||||||
@ -47181,8 +47180,8 @@ function displayAccount(doc, invoice, x, y, layout) {
|
|||||||
account.country ? account.country.name : false
|
account.country ? account.country.name : false
|
||||||
];
|
];
|
||||||
|
|
||||||
var nameWidth = doc.getStringUnitWidth(account.name) * doc.internal.getFontSize() * 1.1;
|
var nameWidth = account.name ? (doc.getStringUnitWidth(account.name) * doc.internal.getFontSize() * 1.1) : 0;
|
||||||
var emailWidth = doc.getStringUnitWidth(account.work_email) * doc.internal.getFontSize() * 1.1;
|
var emailWidth = account.work_email ? (doc.getStringUnitWidth(account.work_email) * doc.internal.getFontSize() * 1.1) : 0;
|
||||||
width = Math.max(emailWidth, nameWidth, 120);
|
width = Math.max(emailWidth, nameWidth, 120);
|
||||||
|
|
||||||
x += width;
|
x += width;
|
||||||
|
@ -689,7 +689,7 @@ function GetReportTemplate1(doc, invoice, layout, checkMath)
|
|||||||
var left = layout.headerRight - invoice.imageWidth;
|
var left = layout.headerRight - invoice.imageWidth;
|
||||||
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30);
|
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!invoice.is_pro && logoImages.imageLogo1)
|
if (!invoice.is_pro && logoImages.imageLogo1)
|
||||||
{
|
{
|
||||||
pageHeight=820;
|
pageHeight=820;
|
||||||
@ -697,7 +697,6 @@ function GetReportTemplate1(doc, invoice, layout, checkMath)
|
|||||||
doc.addImage(logoImages.imageLogo1, 'JPEG', layout.marginLeft, y, logoImages.imageLogoWidth1, logoImages.imageLogoHeight1);
|
doc.addImage(logoImages.imageLogo1, 'JPEG', layout.marginLeft, y, logoImages.imageLogoWidth1, logoImages.imageLogoHeight1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
doc.setFontSize(9);
|
doc.setFontSize(9);
|
||||||
SetPdfColor('LightBlue', doc, 'primary');
|
SetPdfColor('LightBlue', doc, 'primary');
|
||||||
displayAccount(doc, invoice, 220, layout.accountTop, layout);
|
displayAccount(doc, invoice, 220, layout.accountTop, layout);
|
||||||
@ -1256,8 +1255,8 @@ function displayAccount(doc, invoice, x, y, layout) {
|
|||||||
account.country ? account.country.name : false
|
account.country ? account.country.name : false
|
||||||
];
|
];
|
||||||
|
|
||||||
var nameWidth = doc.getStringUnitWidth(account.name) * doc.internal.getFontSize() * 1.1;
|
var nameWidth = account.name ? (doc.getStringUnitWidth(account.name) * doc.internal.getFontSize() * 1.1) : 0;
|
||||||
var emailWidth = doc.getStringUnitWidth(account.work_email) * doc.internal.getFontSize() * 1.1;
|
var emailWidth = account.work_email ? (doc.getStringUnitWidth(account.work_email) * doc.internal.getFontSize() * 1.1) : 0;
|
||||||
width = Math.max(emailWidth, nameWidth, 120);
|
width = Math.max(emailWidth, nameWidth, 120);
|
||||||
|
|
||||||
x += width;
|
x += width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user