mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 00:34:35 -04:00
Logic for modal display
This commit is contained in:
parent
4aa781fb03
commit
b6a0350952
@ -156,8 +156,12 @@ class CompanySettings extends BaseSettings
|
|||||||
public $enable_portal_password = false;
|
public $enable_portal_password = false;
|
||||||
public $show_accept_invoice_terms = false;
|
public $show_accept_invoice_terms = false;
|
||||||
public $show_accept_quote_terms = false;
|
public $show_accept_quote_terms = false;
|
||||||
|
public $require_invoice_signature = false;
|
||||||
|
public $require_quote_signature = false;
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
|
'require_invoice_signature' => 'false',
|
||||||
|
'require_quote_signature' => 'false',
|
||||||
'show_accept_quote_terms' => 'false',
|
'show_accept_quote_terms' => 'false',
|
||||||
'show_accept_invoice_terms' => 'false',
|
'show_accept_invoice_terms' => 'false',
|
||||||
'timezone_id' => 'string',
|
'timezone_id' => 'string',
|
||||||
@ -289,7 +293,7 @@ class CompanySettings extends BaseSettings
|
|||||||
foreach($company_settings as $key => $value)
|
foreach($company_settings as $key => $value)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!property_exists($data, $key))
|
if(!property_exists($settings, $key))
|
||||||
$settings->{$key} = self::castAttribute($key, $company_settings->{$key});
|
$settings->{$key} = self::castAttribute($key, $company_settings->{$key});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -125,16 +125,13 @@ var terms_accepted = false;
|
|||||||
$('#pay_now').on('click', function(e) {
|
$('#pay_now').on('click', function(e) {
|
||||||
//check if terms must be accepted
|
//check if terms must be accepted
|
||||||
|
|
||||||
@if(App\DataMapper\CompanySettings::duh())
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if($settings->show_accept_invoice_terms)
|
@if($settings->show_accept_invoice_terms)
|
||||||
$('#terms_modal').modal('show');
|
$('#terms_modal').modal('show');
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
//check if signature required
|
@if($settings->require_invoice_signature)
|
||||||
getSignature();
|
getSignature();
|
||||||
|
@endif
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#terms_accepted').on('click', function(e){
|
$('#terms_accepted').on('click', function(e){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user