Merge branch '482-resq-add-none-option-for-reason-why-not-willing-to-wait' into '480-resq-august-28-release'
Add the None option for why not willing to wait. #482 See merge request jankstudio/resq!566
This commit is contained in:
commit
a6f8dfb333
1 changed files with 10 additions and 2 deletions
|
|
@ -305,6 +305,7 @@
|
|||
<div class="col-lg-4">
|
||||
<label data-field="no_wait_reason">Reason Why Not Willing to Wait</label>
|
||||
<select class="form-control m-input" id="no-wait-reason" name="no_wait_reason" disabled>
|
||||
<option value="">None</option>
|
||||
{% for key, class in no_wait_reasons %}
|
||||
<option value="{{ key }}"{{ obj.getReasonNotWait == key ? ' selected' }}>{{ class }}</option>
|
||||
{% endfor %}
|
||||
|
|
@ -1867,13 +1868,20 @@ $(function() {
|
|||
console.log(field_value);
|
||||
|
||||
if (field_value == 'not_willing_to_wait') {
|
||||
console.log('enable please');
|
||||
$("#no-wait-reason").attr("disabled", false);
|
||||
$("#not-wait-notes").attr("disabled", false);
|
||||
} else {
|
||||
console.log('disable please');
|
||||
$("#no-wait-reason").attr("disabled", true);
|
||||
$("#not-wait-notes").attr("disabled", true);
|
||||
|
||||
// remove selected from option that might have already been selected
|
||||
$("#no-wait-reason option:selected").prop("selected", false);
|
||||
|
||||
// set first option
|
||||
$("#no-wait-reason option:first").prop("selected", "selected");
|
||||
|
||||
// empty the reason text field
|
||||
$("#not-wait-notes").val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue