VRFS-1133 fix issue with musician and fan access dropdowns
This commit is contained in:
parent
ca1c22c058
commit
8a1308381b
|
|
@ -35,8 +35,12 @@
|
|||
var genre = sessionSettings.hasOwnProperty('genres') && sessionSettings.genres.length > 0 ? sessionSettings.genres[0].id : '';
|
||||
context.JK.GenreSelectorHelper.reset('#create-session-genre', genre);
|
||||
|
||||
var musician_access = sessionSettings.hasOwnProperty('musician_access') ? sessionSettings.musician_access : true;
|
||||
var bandId = sessionSettings.hasOwnProperty('band_id') ? sessionSettings.band_id : '';
|
||||
$('#band-list', $form).val(bandId);
|
||||
|
||||
var musician_access = sessionSettings.hasOwnProperty('musician_access') ? sessionSettings.musician_access : false;
|
||||
$('#musician-access option[value=' + musician_access + ']').attr('selected', 'selected');
|
||||
|
||||
toggleMusicianAccess();
|
||||
|
||||
if (musician_access) {
|
||||
|
|
@ -44,10 +48,7 @@
|
|||
$('#musician-access-option-' + approval_required).iCheck('check').attr('checked', 'checked');
|
||||
}
|
||||
|
||||
var bandId = sessionSettings.hasOwnProperty('band_id') ? sessionSettings.band_id : '';
|
||||
$('#band-list', $form).val(bandId);
|
||||
|
||||
var fan_access = sessionSettings.hasOwnProperty('fan_access') ? sessionSettings.fan_access : true;
|
||||
var fan_access = sessionSettings.hasOwnProperty('fan_access') ? sessionSettings.fan_access : false;
|
||||
$('#fan-access option[value=' + fan_access + ']').attr('selected', 'selected');
|
||||
toggleFanAccess();
|
||||
|
||||
|
|
@ -56,6 +57,9 @@
|
|||
$('#fan-chat-option-' + fan_chat).iCheck('check').attr('checked', 'checked');
|
||||
}
|
||||
|
||||
context.JK.dropdown($('#musician-access', $form));
|
||||
context.JK.dropdown($('#fan-access', $form));
|
||||
|
||||
$('#friend-input')
|
||||
.unbind('blur')
|
||||
.attr("placeholder", "Looking up friends...")
|
||||
|
|
@ -139,10 +143,14 @@
|
|||
data.genres = context.JK.GenreSelectorHelper.getSelectedGenres('#create-session-genre');
|
||||
|
||||
data.musician_access = $('#musician-access option:selected').val() === "true" ? true : false;
|
||||
console.log("data.musician_access=%o", data.musician_access);
|
||||
data.approval_required = $("input[name='musician-access-option']:checked").val() === "true" ? true : false;
|
||||
console.log("data.approval_required=%o", data.approval_required);
|
||||
|
||||
data.fan_access = $('#fan-access option:selected').val() === "true" ? true : false;
|
||||
console.log("data.fan_access=%o", data.fan_access);
|
||||
data.fan_chat = $("input[name='fan-chat-option']:checked").val() === "true" ? true : false;
|
||||
console.log("data.fan_chat=%o", data.fan_chat);
|
||||
|
||||
if ($('#band-list option:selected').val() !== '') {
|
||||
data.band = $('#band-list option:selected').val();
|
||||
|
|
@ -264,8 +272,7 @@
|
|||
}
|
||||
|
||||
function sessionSettingsLoaded(response) {
|
||||
if (response != null)
|
||||
{
|
||||
if (response != null) {
|
||||
sessionSettings = response;
|
||||
}
|
||||
resetForm();
|
||||
|
|
|
|||
Loading…
Reference in New Issue