Skip to content

Commit

Permalink
JE-403: Fixed texts. Fixed classes for choices.js fields and disabled…
Browse files Browse the repository at this point in the history
… state
  • Loading branch information
tuj committed Dec 20, 2023
1 parent 9e83d9e commit 2928ecc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added project lead to client when syncing projects.
* Remove description from create invoice page.
* Added generate description button to invoice when client is set.
* Fixed texts.
* Fixed classes for choices.js fields and disabled state.

## [1.1.2]

Expand Down
6 changes: 5 additions & 1 deletion assets/controllers/choices_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export default class extends Controller {

connect() {
this.choicesTargets.forEach((target) => {
new Choices(target, {allowHTML: true, itemSelectText: ''});
const notDisabled = !target.disabled;

if (notDisabled) {
new Choices(target, {allowHTML: true, itemSelectText: ''});
}
})
}
}
4 changes: 2 additions & 2 deletions src/Controller/InvoiceEntryWorklogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function worklogs(Request $request, Invoice $invoice, InvoiceEntry $invoi
'required' => false,
'label' => 'worklog.version',
'label_attr' => ['class' => 'label'],
'row_attr' => ['class' => 'form-row'],
'row_attr' => ['class' => 'form-row form-choices'],
'attr' => [
'class' => 'form-element',
'data-choices-target' => 'choices',
Expand All @@ -69,7 +69,7 @@ public function worklogs(Request $request, Invoice $invoice, InvoiceEntry $invoi
'required' => false,
'label' => 'worklog.epic',
'label_attr' => ['class' => 'label'],
'row_attr' => ['class' => 'form-row'],
'row_attr' => ['class' => 'form-row form-choices'],
'attr' => [
'class' => 'form-element',
'data-choices-target' => 'choices',
Expand Down
3 changes: 2 additions & 1 deletion translations/messages.da.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ invoices:
client_helptext: 'Vælg hvilken kundekonto fakturaen skal udstedes til.'
default_material_number_helptext: 'Vælg forudvalgt "Materialenummer". Det bliver sat automatisk i alle fakturaindgange.'
default_receiver_account_helptext: 'Vælg forudvalgt "Til konto". Det bliver sat automatisk i alle fakturaindgange.'
payer_account_helptext: 'Hvis valgt indsættes følgende først i tekstfeltet i fakturaen: "Betales af [KONTO]".'
payer_account_helptext: 'Anvendes kun når der er tale om ITK projekt posteringer på PSP-element. Hvis valgt indsættes følgende i starten af tekstfeltet i fakturaen: "Betales af [KONTO]".'
client_type_internal: 'Intern'
client_type_external: 'Ekstern'
client_ean: 'EAN'
Expand Down Expand Up @@ -269,6 +269,7 @@ worklog:
period_to_helptext: ''
worker_helptext: ''
version_helptext: ''
epic_helptext: ''
owned_by_other: 'Anden faktura'
action_save: 'Gem valgte worklogs'
error_already_billed: 'Fejl: Indeholder worklog der allerede er faktureret. Prøv at genindlæse siden...'
Expand Down

0 comments on commit 2928ecc

Please sign in to comment.