!161 Fix page summary input error prompt
* Fix installation error and no information display problem * Fix page summary input error prompt
This commit is contained in:
parent
2b12969d3a
commit
bb7a6aad0d
|
|
@ -230,29 +230,27 @@
|
|||
$('.database-loading').addClass('d-none');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json.status == 'fail') {
|
||||
var data = Object.keys(json.data);
|
||||
$('.database-link-wrap input').addClass('is-valid')
|
||||
$('.title-status .text-success').removeClass('d-none')
|
||||
$('.admin-data-wrap').removeClass('d-none')
|
||||
},
|
||||
error: function(json) {
|
||||
json = json.responseJSON;
|
||||
var data = Object.keys(json.data);
|
||||
|
||||
data.forEach((e)=> {
|
||||
$('.database-link-wrap input[name="' + e + '"]').addClass('is-invalid').next('.invalid-feedback').text(json.data[e])
|
||||
})
|
||||
data.forEach((e)=> {
|
||||
$('.database-link-wrap input[name="' + e + '"]').addClass('is-invalid').next('.invalid-feedback').text(json.data[e])
|
||||
})
|
||||
|
||||
if (json.data.database_version) {
|
||||
$('.title-status .text-danger').removeClass('d-none').find('span').text(json.data.database_version);
|
||||
}
|
||||
|
||||
if (json.data.database_other) {
|
||||
$('.title-status .text-danger').removeClass('d-none').find('span').text(json.data.database_other);
|
||||
}
|
||||
|
||||
$('.admin-data-wrap').addClass('d-none')
|
||||
if (json.data.database_version) {
|
||||
$('.title-status .text-danger').removeClass('d-none').find('span').text(json.data.database_version);
|
||||
}
|
||||
|
||||
if (json.status == 'success') {
|
||||
$('.database-link-wrap input').addClass('is-valid')
|
||||
$('.title-status .text-success').removeClass('d-none')
|
||||
$('.admin-data-wrap').removeClass('d-none')
|
||||
if (json.data.database_other) {
|
||||
$('.title-status .text-danger').removeClass('d-none').find('span').text(json.data.database_other);
|
||||
}
|
||||
|
||||
$('.admin-data-wrap').addClass('d-none')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,11 @@
|
|||
|
||||
<x-admin::form.row title="{{ __('page_category.text_summary') }}">
|
||||
<div class="input-group w-max-400">
|
||||
<textarea rows="3" type="text" name="descriptions[{{ $language['code'] }}][summary]" class="form-control wp-400" placeholder="{{ __('page_category.text_summary') }}">{{ old('descriptions.' . $language['code'] . '.summary', $descriptions[$language['code']]['summary'] ?? '') }}</textarea>
|
||||
<textarea rows="3" type="text" name="descriptions[{{ $language['code'] }}][summary]" class="form-control wp-400 {{ $errors->has("descriptions.{$language['code']}.summary") ? 'is-invalid' : '' }}" placeholder="{{ __('page_category.text_summary') }}">{{ old('descriptions.' . $language['code'] . '.summary', $descriptions[$language['code']]['summary'] ?? '') }}</textarea>
|
||||
</div>
|
||||
@if ($errors->has("descriptions.{$language['code']}.summary"))
|
||||
<span class="invalid-feedback d-block" role="alert">{{ $errors->first("descriptions.{$language['code']}.summary") }}</span>
|
||||
@endif
|
||||
</x-admin::form.row>
|
||||
|
||||
<x-admin::form.row title="{{ __('admin/page.info_content') }}">
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ return [
|
|||
'attributes' => [
|
||||
'descriptions.en.title' => '英文标题',
|
||||
'descriptions.zh_cn.title' => '中文标题',
|
||||
'descriptions.en.summary' => '英文副标题',
|
||||
'descriptions.zh_cn.summary' => '中文副标题',
|
||||
|
||||
'tax_rate' => [
|
||||
'name' => '税种名称',
|
||||
|
|
|
|||
Loading…
Reference in New Issue