- Issue created by @purencool
- 🇨🇦Canada jeremylichtman
I think this is theme related again. The button text looks broken in a way I haven't otherwise seen, and the error appears to be js.
- 🇦🇺Australia purencool
purencool → changed the visibility of the branch 3495934-cant-add-new-relationships-on-task-update to hidden.
- 🇦🇺Australia purencool
@jeremylichtman you were correct. I have add classes to the PHP form and JS. However, I needed change % to @ as it was breaking the html when rendering as seen below.
$form['relationships']['add_new']['link'] = [ '#markup' => $this->t('<a href="#" class="button add_relationship" data-ticket-id="@id"> Add Relationship</a>', [ '@id' =>$task->getTicketId() ]),
The result below is using the GIN theme the form alignment issue not being caused by the module's CSS.
- 🇦🇺Australia purencool
purencool → changed the visibility of the branch 3495934-cant-add-new-relationships-on-task-update to active.
- 🇨🇦Canada jeremylichtman
I've added the '@' change to 1.0.x.
Do you want to create a merge request for the other changes?
- 🇦🇺Australia purencool
I think they have been created correctly. If I need to do something let me know.
https://git.drupalcode.org/project/burndown/-/merge_requests
- 🇦🇺Australia purencool
Hmmm this is confusing there seems to be a typo .
https://git.drupalcode.org/project/burndown/-/blob/99a0b75a692e5eb94cff7...
from_ticket_id: from_ticket_id, to_ticket_id: to_ticket_id, type: $('.add_relationship .add_relationship_selec').val() <-------- missing the "t" on the word select.
But on my local the commit looks correct. (git diff 2bc0f8256b3970baccdd76d83b78601b49fe88d9)
@ js/burndown.task_edit.js:176 @ data: { from_ticket_id: from_ticket_id, to_ticket_id: to_ticket_id, type: $('.add_relationship .form-item-relationship-type select').val() type: $('.add_relationship .add_relationship_select').val() <------ Doesn't seem to be missing the "t" }, success: function (result) { // On success, reload work and clear the form. update_relationships('work'); $('.add_relationship .form-item-to-task input').val(''); $('.add_relationship .add_relationship_entity').val(''); }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log("Could not post relationship.");