Update admin edit event page
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 4 Nov 2016 20:22:32 +0000 (16:22 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 4 Nov 2016 20:22:32 +0000 (16:22 -0400)
This is for locking the venue select when checking use member location
flag.

views/admin/events/edit.html

index 91d3907..c0a2477 100644 (file)
                     $('#locationContainer').addClass('glm-hidden');
                     {if $settings.use_venue_locations}
                         $('#useOtherRefDest').val(memberID);
+                        // lock the venue down to this member
+                        $('#useOtherRefDest option:not(:selected)').prop('disabled', true);;
                     {/if}
                 } else {
                     $('#locationContainer').removeClass('glm-hidden');
+                    {if $settings.use_venue_locations}
+                        $('#useOtherRefDest option').removeAttr('disabled');
+                    {/if}
                     initLocations();
                 }
             });
+            {if $settings.use_venue_locations}
+                if ( $('#useMemberLocationCheckbox').is(':checked') ) {
+                    //$('#useOtherRefDest').val(memberID);
+                    // lock the venue down to this member
+                    $('#useOtherRefDest option:not(:selected)').prop('disabled', true);
+                }
+            {/if}
 
             // Hide location if other_ref_dest is set
             $('#useOtherRefDest').on('change', function(){