mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Working on signature feature
This commit is contained in:
parent
3ccb33ec21
commit
ef44a95902
@ -249,7 +249,7 @@ class AccountGatewayController extends BaseController
|
||||
}
|
||||
if (!$value && ($field == 'testMode' || $field == 'developerMode')) {
|
||||
// do nothing
|
||||
} elseif ($gatewayId == GATEWAY_CUSTOM && $field == 'text') {
|
||||
} elseif ($gatewayId == GATEWAY_CUSTOM) {
|
||||
$config->$field = strip_tags($value);
|
||||
} else {
|
||||
$config->$field = $value;
|
||||
|
@ -218,8 +218,7 @@ class InvoiceController extends BaseController
|
||||
$contact->invitation_viewed = $invitation->viewed_date && $invitation->viewed_date != '0000-00-00 00:00:00' ? $invitation->viewed_date : false;
|
||||
$contact->invitation_openend = $invitation->opened_date && $invitation->opened_date != '0000-00-00 00:00:00' ? $invitation->opened_date : false;
|
||||
$contact->invitation_status = $contact->email_error ? false : $invitation->getStatus();
|
||||
$contact->invitation_signature_svg = $invitation->signature_base64;
|
||||
$contact->invitation_signature_date = $invitation->signature_date;
|
||||
$contact->invitation_signature_svg = $invitation->signatureDiv();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,4 +134,13 @@ class Invitation extends EntityModel
|
||||
$invoice->markViewed();
|
||||
$client->markLoggedIn();
|
||||
}
|
||||
|
||||
public function signatureDiv()
|
||||
{
|
||||
if ( ! $this->signature_base64) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return sprintf('<img src="data:image/svg+xml;base64,%s"></img><p/>%s: %s', $this->signature_base64, trans('texts.signed'), Utils::fromSqlDateTime($this->signature_date));
|
||||
}
|
||||
}
|
||||
|
@ -821,7 +821,7 @@ class BasePaymentDriver
|
||||
|
||||
if ($gatewayTypeId == GATEWAY_TYPE_CUSTOM) {
|
||||
$url = "javascript:showCustomModal();";
|
||||
$label = $this->accountGateway->getConfigField('name');
|
||||
$label = e($this->accountGateway->getConfigField('name'));
|
||||
} else {
|
||||
$url = $this->paymentUrl($gatewayTypeAlias);
|
||||
$label = trans("texts.{$gatewayTypeAlias}");
|
||||
|
@ -2186,8 +2186,10 @@ $LANG = array(
|
||||
'require_invoice_signature_help' => 'Require client to provide their signature.',
|
||||
'require_quote_signature' => 'Quote Signature',
|
||||
'require_quote_signature_help' => 'Require client to provide their signature.',
|
||||
'i_agree' => 'I Agree To The Terms & Conditions',
|
||||
'i_agree' => 'I Agree To The Terms',
|
||||
'sign_here' => 'Please sign here:',
|
||||
'authorization' => 'Authorization',
|
||||
'signed' => 'Signed',
|
||||
|
||||
);
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{!! trans('texts.authentication') !!}</h3>
|
||||
<h3 class="panel-title">{!! trans('texts.authorization') !!}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div role="tabpanel">
|
||||
|
@ -28,6 +28,13 @@
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.signature-wrapper .tooltip-inner {
|
||||
width: 600px;
|
||||
max-width: 600px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@ -125,8 +132,10 @@
|
||||
<span style="vertical-align:text-top" class="fa fa-info-circle"
|
||||
data-bind="visible: $data.invitation_status, tooltip: {title: $data.invitation_status, html: true},
|
||||
style: {color: $data.info_color}"></span>
|
||||
<span style="vertical-align:text-top" class="fa fa-user-circle"
|
||||
data-bind="visible: $data.invitation_signature_svg, tooltip: {title: '', html: true}"></span>
|
||||
<span class="signature-wrapper">
|
||||
<span style="vertical-align:text-top;color:#888" class="fa fa-user"
|
||||
data-bind="visible: $data.invitation_signature_svg, tooltip: {title: $data.invitation_signature_svg, html: true}"></span>
|
||||
</span>
|
||||
@endif
|
||||
</span>
|
||||
@endif
|
||||
|
@ -116,7 +116,7 @@
|
||||
@if ($showApprove)
|
||||
{!! Button::success(trans('texts.approve'))->asLinkTo(URL::to('/approve/' . $invitation->invitation_key))->large() !!}
|
||||
@endif
|
||||
@elseif ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring)
|
||||
@elseif ($invoice->client->account->isGatewayConfigured() && floatval($invoice->balance) && !$invoice->is_recurring)
|
||||
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||
@if (count($paymentTypes) > 1)
|
||||
{!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!}
|
||||
@ -319,11 +319,11 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"> </h4>
|
||||
<h4 class="modal-title">{{ trans('texts.authorization') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="well">
|
||||
<div class="well" style="max-height:300px;overflow-y:scroll">
|
||||
{!! nl2br(e($invoice->terms)) !!}
|
||||
</div>
|
||||
@if ($account->showSignature($invoice))
|
||||
|
Loading…
Reference in New Issue
Block a user