Optimized file save/delete handling

This commit is contained in:
Bernd Bestel 2020-12-21 19:16:14 +01:00
parent 5953e42d70
commit cf299a3d0b
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 5 additions and 9 deletions

View File

@ -769,10 +769,7 @@ msgstr ""
msgid "Create equipment" msgid "Create equipment"
msgstr "" msgstr ""
msgid "No instruction manual available" msgid "The current file will be deleted on save"
msgstr ""
msgid "The current instruction manual will be deleted when you save the equipment"
msgstr "" msgstr ""
msgid "No picture available" msgid "No picture available"

View File

@ -131,6 +131,8 @@ $('#delete-current-instruction-manual-button').on('click', function(e)
$("#current-equipment-instruction-manual").addClass("d-none"); $("#current-equipment-instruction-manual").addClass("d-none");
$("#delete-current-instruction-manual-on-save-hint").removeClass("d-none"); $("#delete-current-instruction-manual-on-save-hint").removeClass("d-none");
$("#delete-current-instruction-manual-button").addClass("disabled"); $("#delete-current-instruction-manual-button").addClass("disabled");
$("#instruction-manual-label").addClass("d-none");
$("#instruction-manual-label-none").removeClass("d-none");
}); });
ResizeResponsiveEmbeds(); ResizeResponsiveEmbeds();

View File

@ -105,10 +105,7 @@
src="{{ $U('/api/files/equipmentmanuals/' . base64_encode($equipment->instruction_manual_file_name)) }}" src="{{ $U('/api/files/equipmentmanuals/' . base64_encode($equipment->instruction_manual_file_name)) }}"
type="application/pdf"> type="application/pdf">
<p id="delete-current-instruction-manual-on-save-hint" <p id="delete-current-instruction-manual-on-save-hint"
class="form-text text-muted font-italic d-none">{{ $__t('The current instruction manual will be deleted when you save the equipment') }}</p> class="form-text text-muted font-italic d-none">{{ $__t('The current file will be deleted on save') }}</p>
@else
<p id="no-current-instruction-manual-hint"
class="form-text text-muted font-italic">{{ $__t('No instruction manual available') }}</p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -30,7 +30,7 @@
{{ $__t('Add') }} {{ $__t('Add') }}
</a> </a>
<a class="btn btn-outline-secondary m-1 mt-md-0 mb-md-0 float-right" <a class="btn btn-outline-secondary m-1 mt-md-0 mb-md-0 float-right"
href="{{ $U('/userfields?entity=shoppinglocations') }}"> href="{{ $U('/userfields?entity=shopping_locations') }}">
{{ $__t('Configure userfields') }} {{ $__t('Configure userfields') }}
</a> </a>
</div> </div>