mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 19:24:40 -04:00
Bug fixes
This commit is contained in:
parent
5f709f76a8
commit
2b3e35687a
@ -613,11 +613,12 @@ class AccountController extends BaseController
|
|||||||
$iframeURL = rtrim($iframeURL, "/");
|
$iframeURL = rtrim($iframeURL, "/");
|
||||||
|
|
||||||
$subdomain = preg_replace('/[^a-zA-Z0-9_\-\.]/', '', substr(strtolower(Input::get('subdomain')), 0, MAX_SUBDOMAIN_LENGTH));
|
$subdomain = preg_replace('/[^a-zA-Z0-9_\-\.]/', '', substr(strtolower(Input::get('subdomain')), 0, MAX_SUBDOMAIN_LENGTH));
|
||||||
if ($iframeURL || !$subdomain || in_array($subdomain, ['www', 'app', 'mail', 'admin', 'blog', 'user', 'contact', 'payment', 'payments', 'billing', 'invoice', 'business', 'owner'])) {
|
if ($iframeURL) {
|
||||||
$subdomain = null;
|
$subdomain = null;
|
||||||
}
|
}
|
||||||
if ($subdomain) {
|
if ($subdomain) {
|
||||||
$rules['subdomain'] = "unique:accounts,subdomain,{$user->account_id},id";
|
$exclude = ['www', 'app', 'mail', 'admin', 'blog', 'user', 'contact', 'payment', 'payments', 'billing', 'invoice', 'business', 'owner', 'info', 'ninja'];
|
||||||
|
$rules['subdomain'] = "unique:accounts,subdomain,{$user->account_id},id|not_in:" . implode(',', $exclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
$validator = Validator::make(Input::all(), $rules);
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
|
@ -245,7 +245,6 @@ class AppController extends BaseController
|
|||||||
set_time_limit(60 * 5);
|
set_time_limit(60 * 5);
|
||||||
Cache::flush();
|
Cache::flush();
|
||||||
Session::flush();
|
Session::flush();
|
||||||
Artisan::call('optimize', array('--force' => true));
|
|
||||||
Artisan::call('migrate', array('--force' => true));
|
Artisan::call('migrate', array('--force' => true));
|
||||||
foreach ([
|
foreach ([
|
||||||
'PaymentLibraries',
|
'PaymentLibraries',
|
||||||
@ -255,6 +254,7 @@ class AppController extends BaseController
|
|||||||
] as $seeder) {
|
] as $seeder) {
|
||||||
Artisan::call('db:seed', array('--force' => true, '--class' => "{$seeder}Seeder"));
|
Artisan::call('db:seed', array('--force' => true, '--class' => "{$seeder}Seeder"));
|
||||||
}
|
}
|
||||||
|
Artisan::call('optimize', array('--force' => true));
|
||||||
Event::fire(new UserSettingsChanged());
|
Event::fire(new UserSettingsChanged());
|
||||||
Session::flash('message', trans('texts.processed_updates'));
|
Session::flash('message', trans('texts.processed_updates'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -23,10 +23,11 @@ class CreateVendorRequest extends Request
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'vendorcontacts' => 'valid_contacts',
|
'name' => 'required',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public function validator($factory)
|
public function validator($factory)
|
||||||
{
|
{
|
||||||
// support submiting the form with a single contact record
|
// support submiting the form with a single contact record
|
||||||
@ -41,4 +42,5 @@ class CreateVendorRequest extends Request
|
|||||||
$this->input(), $this->container->call([$this, 'rules']), $this->messages()
|
$this->input(), $this->container->call([$this, 'rules']), $this->messages()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class UpdateVendorRequest extends Request
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'vendor_contacts' => 'valid_contacts',
|
'name' => 'required',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1130,7 +1130,7 @@ return array(
|
|||||||
'info' => 'Info',
|
'info' => 'Info',
|
||||||
'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)',
|
'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)',
|
||||||
|
|
||||||
'iframe_url_help3' => 'Note: if you plan on accepting credit cards we strongly recommend having HTTPS enabled on your site.',
|
'iframe_url_help3' => 'Note: if you plan on accepting credit cards details we strongly recommend enabling HTTPS on your site.',
|
||||||
'expense_error_multiple_currencies' => 'The expenses can\'t have different currencies.',
|
'expense_error_multiple_currencies' => 'The expenses can\'t have different currencies.',
|
||||||
'expense_error_mismatch_currencies' => 'The client\'s currency does not match the expense currency.',
|
'expense_error_mismatch_currencies' => 'The client\'s currency does not match the expense currency.',
|
||||||
'trello_roadmap' => 'Trello Roadmap',
|
'trello_roadmap' => 'Trello Roadmap',
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>{{ trans('texts.iframe_url_help1') }}</p>
|
<p>{{ trans('texts.iframe_url_help1') }}</p>
|
||||||
<pre><center>
|
<pre><center>
|
||||||
<iframe id="invoiceIFrame" width="1000" height="1200"></iframe>
|
<iframe id="invoiceIFrame" width="100%" height="1200" style="max-width:1000px"></iframe>
|
||||||
<center>
|
<center>
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
var iframe = document.getElementById('invoiceIFrame');
|
var iframe = document.getElementById('invoiceIFrame');
|
||||||
|
7
resources/views/vendors/edit.blade.php
vendored
7
resources/views/vendors/edit.blade.php
vendored
@ -15,9 +15,10 @@
|
|||||||
|
|
||||||
{!! Former::open($url)
|
{!! Former::open($url)
|
||||||
->autocomplete('off')
|
->autocomplete('off')
|
||||||
->rules(
|
->rules([
|
||||||
['email' => 'email']
|
'namey' => 'required',
|
||||||
)->addClass('col-md-12 warn-on-exit')
|
'email' => 'email'
|
||||||
|
])->addClass('col-md-12 warn-on-exit')
|
||||||
->method($method) !!}
|
->method($method) !!}
|
||||||
|
|
||||||
@include('partials.autocomplete_fix')
|
@include('partials.autocomplete_fix')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user