mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01: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 $show_accept_invoice_terms = false;
|
||||
public $show_accept_quote_terms = false;
|
||||
public $require_invoice_signature = false;
|
||||
public $require_quote_signature = false;
|
||||
|
||||
public static $casts = [
|
||||
'require_invoice_signature' => 'false',
|
||||
'require_quote_signature' => 'false',
|
||||
'show_accept_quote_terms' => 'false',
|
||||
'show_accept_invoice_terms' => 'false',
|
||||
'timezone_id' => 'string',
|
||||
@ -289,7 +293,7 @@ class CompanySettings extends BaseSettings
|
||||
foreach($company_settings as $key => $value)
|
||||
{
|
||||
|
||||
if(!property_exists($data, $key))
|
||||
if(!property_exists($settings, $key))
|
||||
$settings->{$key} = self::castAttribute($key, $company_settings->{$key});
|
||||
|
||||
}
|
||||
|
@ -124,17 +124,14 @@ var terms_accepted = false;
|
||||
|
||||
$('#pay_now').on('click', function(e) {
|
||||
//check if terms must be accepted
|
||||
|
||||
@if(App\DataMapper\CompanySettings::duh())
|
||||
@endif
|
||||
|
||||
@if($settings->show_accept_invoice_terms)
|
||||
$('#terms_modal').modal('show');
|
||||
$('#terms_modal').modal('show');
|
||||
@endif
|
||||
|
||||
//check if signature required
|
||||
getSignature();
|
||||
|
||||
@if($settings->require_invoice_signature)
|
||||
getSignature();
|
||||
@endif
|
||||
});
|
||||
|
||||
$('#terms_accepted').on('click', function(e){
|
||||
|
Loading…
Reference in New Issue
Block a user