Hide (only visually) field type if we're in shots view

This commit is contained in:
2016-09-22 21:27:59 +02:00
parent c90f40b645
commit 16d77b4c5c

View File

@@ -1,21 +1,20 @@
.attract-form .attract-form
form#task_form(onsubmit="return task_save('{{task._id}}', '{{ url_for('attract.tasks.perproject.save', project_url=project['url'], task_id=task._id) }}')") form#task_form(onsubmit="return task_save('{{task._id}}', '{{ url_for('attract.tasks.perproject.save', project_url=project['url'], task_id=task._id) }}')")
.input-transparent-group .input-transparent-group
input.input-transparent.task-name( input.input-transparent.item-name(
name="name", name="name",
type=text, type="text",
placeholder='Name', placeholder='Name',
value="{{ task.name | hide_none }}") value="{{ task.name | hide_none }}")
.input-transparent-group .input-transparent-group
textarea.input-transparent( textarea.input-transparent(
name="description", name="description",
type=text, type="text",
placeholder='Description') {{ task.description | hide_none }} placeholder='Description') {{ task.description | hide_none }}
.row .input-group-flex
.col-md-6 .input-transparent-group.field-type
.input-transparent-group
label#task-task_type Type: label#task-task_type Type:
select.input-transparent(name="task_type",aria-describedby="task-task_type") select.input-transparent(name="task_type",aria-describedby="task-task_type")
| {% for task_type in attract_props.task_types.attract_shot %} | {% for task_type in attract_props.task_types.attract_shot %}
@@ -25,7 +24,6 @@
option(value="{{ task.properties.task_type }}",selected).invalid_task {{ task.properties.task_type | undertitle }} option(value="{{ task.properties.task_type }}",selected).invalid_task {{ task.properties.task_type | undertitle }}
| {% endif %} | {% endif %}
.col-md-6
.input-transparent-group .input-transparent-group
label#task-status Status: label#task-status Status:
select.input-transparent( select.input-transparent(
@@ -61,3 +59,7 @@
script. script.
$("#assignees").select2(); $("#assignees").select2();
if (ProjectUtils.context() == 'shot'){
$('.field-type').hide();
}