Skip to content

Commit

Permalink
ui: Rename 'label alt' to 'label alt' and show 'label right' in seman…
Browse files Browse the repository at this point in the history
…tic differential edit view.
  • Loading branch information
Nico-AP committed Dec 5, 2024
1 parent 508ba3e commit ff955e7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
18 changes: 18 additions & 0 deletions ddm/questionnaire/migrations/0007_alter_questionitem_label_alt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.16 on 2024-12-05 13:29

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('ddm_questionnaire', '0006_alter_questionbase_polymorphic_ctype_and_more'),
]

operations = [
migrations.AlterField(
model_name='questionitem',
name='label_alt',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Label Right'),
),
]
1 change: 1 addition & 0 deletions ddm/questionnaire/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ class Meta:
max_length=255,
null=True,
blank=True,
verbose_name="Label Right"
)
index = models.IntegerField()
value = models.IntegerField()
Expand Down
14 changes: 12 additions & 2 deletions ddm/questionnaire/templates/ddm_questionnaire/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,25 @@
{% if forloop.first %}
<thead>
<tr>
<th>Label</th>
{% if object.question_type == "semantic_diff" %}
<th>Label</th>
<th>Label Right</th>
{% else %}
<th>Label</th>
{% endif %}
<th>Index</th>
<th>Value</th>
<th>Randomize</th>
</tr>
</thead>
{% endif %}
<tr>
<td>{{ item.label }}</td>
{% if object.question_type == "semantic_diff" %}
<td>{{ item.label }}</td>
<td>{{ item.label_alt }}</td>
{% else %}
<td>{{ item.label }}</td>
{% endif %}
<td>{{ item.index }}</td>
<td>{{ item.value }}</td>
<td>{{ item.randomize }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ settings are available:
Label:: The label/text of the item that is displayed to participants related to an item.
For semantic differential questions, this is the label displayed on the left-hand side of the scale.

Label alt:: Only for semantic differential questions: the label displayed on the
Label Right:: Only for semantic differential questions. The label displayed on the
right-hand side of the scale.

Index:: Defines the order in which the items are displayed.
Expand Down

0 comments on commit ff955e7

Please sign in to comment.