diff --git a/config/former.php b/config/former.php index 110fffe8ae..549114e7ed 100644 --- a/config/former.php +++ b/config/former.php @@ -30,7 +30,7 @@ 'push_checkboxes' => true, // The value a checkbox will have in the POST array if unchecked - 'unchecked_value' => 0, + 'unchecked_value' => "0", // Required fields //////////////////////////////////////////////////////////////////// diff --git a/resources/views/accounts/account_gateway.blade.php b/resources/views/accounts/account_gateway.blade.php index cc0aa0c0df..88c317e359 100644 --- a/resources/views/accounts/account_gateway.blade.php +++ b/resources/views/accounts/account_gateway.blade.php @@ -18,8 +18,8 @@ {!! Former::populateField('show_address', intval($accountGateway->show_address)) !!} {!! Former::populateField('update_address', intval($accountGateway->update_address)) !!} {!! Former::populateField('publishable_key', $accountGateway->getPublishableStripeKey() ? str_repeat('*', strlen($accountGateway->getPublishableStripeKey())) : '') !!} - {!! Former::populateField('enable_ach', $accountGateway->getAchEnabled() ? '1' : null) !!} - {!! Former::populateField('enable_paypal', $accountGateway->getPayPalEnabled() ? '1' : null) !!} + {!! Former::populateField('enable_ach', $accountGateway->getAchEnabled() ? 1 : 0) !!} + {!! Former::populateField('enable_paypal', $accountGateway->getPayPalEnabled() ? 1 : 0) !!} {!! Former::populateField('plaid_client_id', $accountGateway->getPlaidClientId() ? str_repeat('*', strlen($accountGateway->getPlaidClientId())) : '') !!} {!! Former::populateField('plaid_secret', $accountGateway->getPlaidSecret() ? str_repeat('*', strlen($accountGateway->getPlaidSecret())) : '') !!} {!! Former::populateField('plaid_public_key', $accountGateway->getPlaidPublicKey() ? str_repeat('*', strlen($accountGateway->getPlaidPublicKey())) : '') !!} @@ -77,7 +77,7 @@ && isset($_ENV['DWOLLA_KEY']) && isset($_ENV['DWOLLA_SECRET'])) {{-- do nothing --}} @elseif ($field == 'testMode' || $field == 'developerMode' || $field == 'sandbox') - {!! Former::checkbox($gateway->id.'_'.$field)->label(ucwords(Utils::toSpaceCase($field)))->text('Enable')->value('true') !!} + {!! Former::checkbox($gateway->id.'_'.$field)->label(ucwords(Utils::toSpaceCase($field)))->text('Enable')->value(1) !!} @elseif ($field == 'username' || $field == 'password') {!! Former::text($gateway->id.'_'.$field)->label('API '. ucfirst(Utils::toSpaceCase($field))) !!} @elseif ($gateway->isCustom() && $field == 'text') @@ -115,7 +115,8 @@ 'link'=>''. trans('texts.braintree_paypal_help_link_text').'' ])) - ->text(trans('texts.braintree_enable_paypal')) !!} + ->text(trans('texts.braintree_enable_paypal')) + ->value(1) !!} @endif @endif @@ -135,17 +136,21 @@ {!! Former::checkbox('show_address') ->label(trans('texts.billing_address')) ->text(trans('texts.show_address_help')) - ->addGroupClass('gateway-option') !!} + ->addGroupClass('gateway-option') + ->value(1) !!} + {!! Former::checkbox('update_address') ->label(' ') ->text(trans('texts.update_address_help')) - ->addGroupClass('gateway-option') !!} + ->addGroupClass('gateway-option') + ->value(1) !!} {!! Former::checkboxes('creditCardTypes[]') ->label('Accepted Credit Cards') ->checkboxes($creditCardTypes) ->class('creditcard-types') ->addGroupClass('gateway-option') + ->value(1) !!} @@ -154,7 +159,8 @@ {!! Former::checkbox('enable_ach') ->label(trans('texts.ach')) ->text(trans('texts.enable_ach')) - ->help(trans('texts.stripe_ach_help')) !!} + ->help(trans('texts.stripe_ach_help')) + ->value(1) !!}
@@ -171,7 +177,8 @@ @elseif ($accountGateway && $accountGateway->gateway_id == GATEWAY_WEPAY) {!! Former::checkbox('enable_ach') ->label(trans('texts.ach')) - ->text(trans('texts.enable_ach')) !!} + ->text(trans('texts.enable_ach')) + ->value(1) !!} @endif
diff --git a/resources/views/accounts/account_gateway_wepay.blade.php b/resources/views/accounts/account_gateway_wepay.blade.php index ccebdb0c4f..70232534aa 100644 --- a/resources/views/accounts/account_gateway_wepay.blade.php +++ b/resources/views/accounts/account_gateway_wepay.blade.php @@ -50,23 +50,28 @@
{!! Former::checkbox('debit_cards') - ->text(trans('texts.accept_debit_cards')) !!} + ->text(trans('texts.accept_debit_cards')) + ->value(1) !!}
@endif {!! Former::checkbox('show_address') ->label(trans('texts.billing_address')) - ->text(trans('texts.show_address_help')) !!} + ->text(trans('texts.show_address_help')) + ->value(1) !!} {!! Former::checkbox('update_address') ->label(' ') - ->text(trans('texts.update_address_help')) !!} + ->text(trans('texts.update_address_help')) + ->value(1) !!} {!! Former::checkboxes('creditCardTypes[]') ->label('Accepted Credit Cards') ->checkboxes($creditCardTypes) - ->class('creditcard-types') !!} + ->class('creditcard-types') + ->value(1) !!} {!! Former::checkbox('enable_ach') ->label(trans('texts.ach')) - ->text(trans('texts.enable_ach')) !!} + ->text(trans('texts.enable_ach')) + ->value(1) !!} {!! Former::checkbox('tos_agree')->label(' ')->text(trans('texts.wepay_tos_agree', ['link'=>''.trans('texts.wepay_tos_link_text').''] diff --git a/resources/views/accounts/client_portal.blade.php b/resources/views/accounts/client_portal.blade.php index 2131d1b24e..c859330a92 100644 --- a/resources/views/accounts/client_portal.blade.php +++ b/resources/views/accounts/client_portal.blade.php @@ -53,12 +53,14 @@
{!! Former::checkbox('enable_client_portal') ->text(trans('texts.enable')) - ->help(trans('texts.enable_client_portal_help')) !!} + ->help(trans('texts.enable_client_portal_help')) + ->value(1) !!}
{!! Former::checkbox('enable_client_portal_dashboard') ->text(trans('texts.enable')) - ->help(trans('texts.enable_client_portal_dashboard_help')) !!} + ->help(trans('texts.enable_client_portal_dashboard_help')) + ->value(1) !!}
@@ -83,13 +85,15 @@ {!! Former::checkbox('enable_portal_password') ->text(trans('texts.enable')) ->help(trans('texts.enable_portal_password_help')) - ->label(trans('texts.enable_portal_password')) !!} + ->label(trans('texts.enable_portal_password')) + ->value(1) !!}
{!! Former::checkbox('send_portal_password') ->text(trans('texts.enable')) ->help(trans('texts.send_portal_password_help')) - ->label(trans('texts.send_portal_password')) !!} + ->label(trans('texts.send_portal_password')) + ->value(1) !!}
@@ -101,13 +105,15 @@ {!! Former::checkbox('show_accept_invoice_terms') ->text(trans('texts.enable')) ->help(trans('texts.show_accept_invoice_terms_help')) - ->label(trans('texts.show_accept_invoice_terms')) !!} + ->label(trans('texts.show_accept_invoice_terms')) + ->value(1) !!}
{!! Former::checkbox('show_accept_quote_terms') ->text(trans('texts.enable')) ->help(trans('texts.show_accept_quote_terms_help')) - ->label(trans('texts.show_accept_quote_terms')) !!} + ->label(trans('texts.show_accept_quote_terms')) + ->value(1) !!}
@@ -119,13 +125,15 @@ {!! Former::checkbox('require_invoice_signature') ->text(trans('texts.enable')) ->help(trans('texts.require_invoice_signature_help')) - ->label(trans('texts.require_invoice_signature')) !!} + ->label(trans('texts.require_invoice_signature')) + ->value(1) !!}
{!! Former::checkbox('require_quote_signature') ->text(trans('texts.enable')) ->help(trans('texts.require_quote_signature_help')) - ->label(trans('texts.require_quote_signature')) !!} + ->label(trans('texts.require_quote_signature')) + ->value(1) !!}
@@ -146,7 +154,8 @@ {!! Former::checkbox('enable_buy_now_buttons') ->text(trans('texts.enable')) ->label(' ') - ->help(trans('texts.enable_buy_now_buttons_help')) !!} + ->help(trans('texts.enable_buy_now_buttons_help')) + ->value(1) !!} @if ($account->enable_buy_now_buttons) {!! Former::select('product') diff --git a/resources/views/accounts/email_settings.blade.php b/resources/views/accounts/email_settings.blade.php index 766b3f7f63..b9d5dbba12 100644 --- a/resources/views/accounts/email_settings.blade.php +++ b/resources/views/accounts/email_settings.blade.php @@ -31,13 +31,15 @@ {!! Former::checkbox('pdf_email_attachment') ->text(trans('texts.enable')) + ->value(1) ->help( ! Utils::isNinja() ? (env('PHANTOMJS_BIN_PATH') ? 'phantomjs_local' : trans('texts.phantomjs_help', [ 'link_phantom' => link_to('https://phantomjscloud.com/', 'phantomjscloud.com', ['target' => '_blank']), 'link_docs' => link_to('https://www.invoiceninja.com/self-host/#phantomjs', 'PhantomJS', ['target' => '_blank']) ])) : false) !!} {!! Former::checkbox('document_email_attachment') - ->text(trans('texts.enable')) !!} + ->text(trans('texts.enable')) + ->value(1) !!}   @@ -93,7 +95,8 @@ {!! Former::checkbox('enable_email_markup') ->text(trans('texts.enable') . '' . Icon::create('question-sign') . ' ') - ->help(trans('texts.enable_email_markup_help')) !!} + ->help(trans('texts.enable_email_markup_help')) + ->value(1) !!} @endif diff --git a/resources/views/accounts/invoice_design.blade.php b/resources/views/accounts/invoice_design.blade.php index 6bb524c686..cc28f343e6 100644 --- a/resources/views/accounts/invoice_design.blade.php +++ b/resources/views/accounts/invoice_design.blade.php @@ -253,9 +253,9 @@
- {!! Former::checkbox('hide_quantity')->text(trans('texts.hide_quantity_help')) !!} - {!! Former::checkbox('hide_paid_to_date')->text(trans('texts.hide_paid_to_date_help')) !!} - {!! Former::checkbox('invoice_embed_documents')->text(trans('texts.invoice_embed_documents_help')) !!} + {!! Former::checkbox('hide_quantity')->text(trans('texts.hide_quantity_help'))->value(1) !!} + {!! Former::checkbox('hide_paid_to_date')->text(trans('texts.hide_paid_to_date_help'))->value(1) !!} + {!! Former::checkbox('invoice_embed_documents')->text(trans('texts.invoice_embed_documents_help'))->value(1) !!}
diff --git a/resources/views/accounts/invoice_settings.blade.php b/resources/views/accounts/invoice_settings.blade.php index 46deaf9373..409db86656 100644 --- a/resources/views/accounts/invoice_settings.blade.php +++ b/resources/views/accounts/invoice_settings.blade.php @@ -97,7 +97,7 @@ {!! Former::text('quote_number_counter') ->label(trans('texts.counter')) ->addGroupClass('pad-checkbox') - ->append(Former::checkbox('share_counter')->raw() + ->append(Former::checkbox('share_counter')->raw()->value(1) ->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) ->help(trans('texts.quote_number_help') . ' ' . trans('texts.next_quote_number', ['number' => $account->previewNextInvoiceNumber(ENTITY_QUOTE)])) !!} @@ -111,6 +111,7 @@ ->label('client_number') ->onchange('onClientNumberEnabled()') ->text('enable') + ->value(1) ->check($account->client_number_counter > 0) !!} diff --git a/resources/views/accounts/localization.blade.php b/resources/views/accounts/localization.blade.php index b248770fd0..b743a70b27 100644 --- a/resources/views/accounts/localization.blade.php +++ b/resources/views/accounts/localization.blade.php @@ -49,7 +49,7 @@ ->fromQuery($dateFormats) !!} {!! Former::select('datetime_format_id')->addOption('','') ->fromQuery($datetimeFormats) !!} - {!! Former::checkbox('military_time')->text(trans('texts.enable')) !!} + {!! Former::checkbox('military_time')->text(trans('texts.enable'))->value(1) !!}
 
diff --git a/resources/views/accounts/management.blade.php b/resources/views/accounts/management.blade.php index 51fdb40a12..65f145d6f0 100644 --- a/resources/views/accounts/management.blade.php +++ b/resources/views/accounts/management.blade.php @@ -195,10 +195,12 @@ {!! Former::checkbox('live_preview') ->text(trans('texts.enable')) - ->help('live_preview_help') !!} + ->help('live_preview_help') + ->value(1) !!} {!! Former::checkbox('force_pdfjs') ->text(trans('texts.enable')) + ->value(1) ->help(trans('texts.force_pdfjs_help', [ 'chrome_link' => link_to(CHROME_PDF_HELP_URL, 'Chrome', ['target' => '_blank']), 'firefox_link' => link_to(FIREFOX_PDF_HELP_URL, 'Firefox', ['target' => '_blank']), diff --git a/resources/views/accounts/partials/notifications.blade.php b/resources/views/accounts/partials/notifications.blade.php index 5ed6cd6039..44bf09033e 100644 --- a/resources/views/accounts/partials/notifications.blade.php +++ b/resources/views/accounts/partials/notifications.blade.php @@ -8,9 +8,9 @@

{!! trans('texts.email_notifications') !!}

- {!! Former::checkbox('notify_sent')->label(' ')->text(trans('texts.email_sent')) !!} - {!! Former::checkbox('notify_viewed')->label(' ')->text(trans('texts.email_viewed')) !!} - {!! Former::checkbox('notify_paid')->label(' ')->text(trans('texts.email_paid')) !!} - {!! Former::checkbox('notify_approved')->label(' ')->text(trans('texts.email_approved')) !!} + {!! Former::checkbox('notify_sent')->label(' ')->text(trans('texts.email_sent'))->value(1) !!} + {!! Former::checkbox('notify_viewed')->label(' ')->text(trans('texts.email_viewed'))->value(1) !!} + {!! Former::checkbox('notify_paid')->label(' ')->text(trans('texts.email_paid'))->value(1) !!} + {!! Former::checkbox('notify_approved')->label(' ')->text(trans('texts.email_approved'))->value(1) !!}
diff --git a/resources/views/accounts/products.blade.php b/resources/views/accounts/products.blade.php index ab79504ca3..8ac6026350 100644 --- a/resources/views/accounts/products.blade.php +++ b/resources/views/accounts/products.blade.php @@ -16,8 +16,8 @@
- {!! Former::checkbox('fill_products')->text(trans('texts.fill_products_help')) !!} - {!! Former::checkbox('update_products')->text(trans('texts.update_products_help')) !!} + {!! Former::checkbox('fill_products')->text(trans('texts.fill_products_help'))->value(1) !!} + {!! Former::checkbox('update_products')->text(trans('texts.update_products_help'))->value(1) !!}   {!! Former::actions( Button::success(trans('texts.save'))->submit()->appendIcon(Icon::create('floppy-disk')) ) !!} {!! Former::close() !!} diff --git a/resources/views/accounts/tax_rates.blade.php b/resources/views/accounts/tax_rates.blade.php index 8d1e327e97..31ba79fadd 100644 --- a/resources/views/accounts/tax_rates.blade.php +++ b/resources/views/accounts/tax_rates.blade.php @@ -22,23 +22,28 @@ {!! Former::checkbox('invoice_taxes') ->text(trans('texts.enable_invoice_tax')) - ->label(' ') !!} + ->label(' ') + ->value(1) !!} {!! Former::checkbox('invoice_item_taxes') ->text(trans('texts.enable_line_item_tax')) - ->label(' ') !!} + ->label(' ') + ->value(1) !!} {!! Former::checkbox('show_item_taxes') ->text(trans('texts.show_line_item_tax')) - ->label(' ') !!} + ->label(' ') + ->value(1) !!} {!! Former::checkbox('include_item_taxes_inline') ->text(trans('texts.include_item_taxes_inline')) - ->label(' ') !!} + ->label(' ') + ->value(1) !!} {!! Former::checkbox('enable_second_tax_rate') ->text(trans('texts.enable_second_tax_rate')) - ->label(' ') !!} + ->label(' ') + ->value(1) !!}   diff --git a/resources/views/accounts/template.blade.php b/resources/views/accounts/template.blade.php index acdfbdb831..254494e2b3 100644 --- a/resources/views/accounts/template.blade.php +++ b/resources/views/accounts/template.blade.php @@ -7,7 +7,8 @@
{!! Former::checkbox('enable_' . $field) - ->text(trans('texts.enable'))->label('') !!} + ->text(trans('texts.enable'))->label('') + ->value(1) !!} {!! Former::plaintext('schedule') ->value( diff --git a/resources/views/accounts/user_details.blade.php b/resources/views/accounts/user_details.blade.php index 4ee5a762ae..12b2a50a10 100644 --- a/resources/views/accounts/user_details.blade.php +++ b/resources/views/accounts/user_details.blade.php @@ -62,12 +62,13 @@ @else {!! Former::checkbox('referral_code') ->help(trans('texts.referral_code_help')) - ->text(trans('texts.enable') . ' ' . Icon::create('question-sign') . '') !!} + ->text(trans('texts.enable') . ' ' . Icon::create('question-sign') . '') + ->value(1) !!} @endif @endif @if (false && Utils::isNinjaDev()) - {!! Former::checkbox('dark_mode')->text(trans('texts.dark_mode_help')) !!} + {!! Former::checkbox('dark_mode')->text(trans('texts.dark_mode_help'))->value(1) !!} @endif
diff --git a/resources/views/expenses/edit.blade.php b/resources/views/expenses/edit.blade.php index 8511833428..414778efbc 100644 --- a/resources/views/expenses/edit.blade.php +++ b/resources/views/expenses/edit.blade.php @@ -82,14 +82,16 @@ {!! Former::checkbox('should_be_invoiced') ->text(trans('texts.should_be_invoiced')) ->data_bind('checked: should_be_invoiced() || client_id(), enable: !client_id()') - ->label(' ') !!} + ->label(' ') + ->value(1) !!} @endif @if (!$expense || ($expense && ! $expense->isExchanged())) {!! Former::checkbox('convert_currency') ->text(trans('texts.convert_currency')) ->data_bind('checked: convert_currency') - ->label(' ') !!} + ->label(' ') + ->value(1) !!} @endif @@ -123,7 +125,8 @@ {!! Former::checkbox('apply_taxes') ->text(trans('texts.apply_taxes')) ->data_bind('checked: apply_taxes') - ->label(' ') !!} + ->label(' ') + ->value(1) !!} @endif
diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index a3fa2f83de..13d2e67e46 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -627,7 +627,11 @@
{!! Former::text('app[url]')->label(trans('texts.url'))->value(isset($_ENV['APP_URL']) ? $_ENV['APP_URL'] : Request::root()) !!} - {!! Former::checkbox('https')->text(trans('texts.require'))->check(env('REQUIRE_HTTPS')) !!} - {!! Former::checkbox('debug')->text(trans('texts.enable'))->check(config('app.debug')) !!} + {!! Former::checkbox('https')->text(trans('texts.require'))->check(env('REQUIRE_HTTPS'))->value(1) !!} + {!! Former::checkbox('debug')->text(trans('texts.enable'))->check(config('app.debug'))->value(1) !!}
diff --git a/resources/views/payments/edit.blade.php b/resources/views/payments/edit.blade.php index 01e0cb924b..004f439057 100644 --- a/resources/views/payments/edit.blade.php +++ b/resources/views/payments/edit.blade.php @@ -67,7 +67,7 @@ {!! Former::text('transaction_reference') !!} @if (!$payment) - {!! Former::checkbox('email_receipt')->label(' ')->text(trans('texts.email_receipt')) !!} + {!! Former::checkbox('email_receipt')->label(' ')->text(trans('texts.email_receipt'))->value(1) !!} @endif
diff --git a/resources/views/payments/stripe/bank_transfer.blade.php b/resources/views/payments/stripe/bank_transfer.blade.php index cbaa9486e5..080a68212e 100644 --- a/resources/views/payments/stripe/bank_transfer.blade.php +++ b/resources/views/payments/stripe/bank_transfer.blade.php @@ -220,7 +220,8 @@ {!! Former::checkbox('authorize_ach') ->text(trans('texts.ach_authorization', ['company'=>$account->getDisplayName(), 'email' => $account->work_email])) - ->label(' ') !!} + ->label(' ') + ->value(1) !!}
diff --git a/resources/views/payments/wepay/bank_transfer.blade.php b/resources/views/payments/wepay/bank_transfer.blade.php index 6d843d1de7..9646cf9efb 100644 --- a/resources/views/payments/wepay/bank_transfer.blade.php +++ b/resources/views/payments/wepay/bank_transfer.blade.php @@ -13,7 +13,8 @@ {!! Former::checkbox('authorize_ach') ->text(trans('texts.ach_authorization', ['company'=>$account->getDisplayName(), 'email' => $account->work_email])) - ->label(' ') !!} + ->label(' ') + ->value(1) !!} {!! Former::checkbox('tos_agree') ->text(trans('texts.wepay_payment_tos_agree', [ @@ -21,7 +22,8 @@ 'privacy_policy' => ''.trans('texts.privacy_policy').'', ])) ->help(trans('texts.payment_processed_through_wepay')) - ->label(' ') !!} + ->label(' ') + ->value(1) !!} diff --git a/resources/views/setup.blade.php b/resources/views/setup.blade.php index 2b66a5c6a9..b4a4969e78 100644 --- a/resources/views/setup.blade.php +++ b/resources/views/setup.blade.php @@ -1,8 +1,8 @@ - Invoice Ninja | Setup - + Invoice Ninja | Setup + @@ -37,7 +37,7 @@
sudo chown www-data:www-data /path/to/ninja/.env
@endif - If you need help you can either post to our support forum with the design you\'re using + If you need help you can either post to our support forum with the design you\'re using or email us at contact@invoiceninja.com.

-- Commands to create a MySQL database and user
@@ -71,16 +71,16 @@ FLUSH PRIVILEGES;
{!! Former::text('first_name') !!} {!! Former::text('last_name') !!} {!! Former::text('email') !!} - {!! Former::password('password') !!} + {!! Former::password('password') !!}
- {!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => ''.trans('texts.terms_of_service').''])) !!} - {!! Former::actions( Button::primary('Submit')->large()->submit() ) !!} + {!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => ''.trans('texts.terms_of_service').'']))->value(1) !!} + {!! Former::actions( Button::primary('Submit')->large()->submit() ) !!} {!! Former::close() !!} - - \ No newline at end of file + +