Updating the check for max attendees per request.
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 8 Oct 2018 14:29:37 +0000 (10:29 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 8 Oct 2018 14:29:37 +0000 (10:29 -0400)
Change this to inline message. Add text for max number per request if it
is set for the event.

js/frontRegApp.js
js/views/front/regTime.js
views/front/registrations/registration.html

index d941621..f7ff329 100644 (file)
@@ -952,7 +952,7 @@ app.Views.Front.RegTime = Backbone.View.extend({
     // add new account
     addNewAccount: function(){
         if ( app.checkForMaxAttendees() === true ) {
-            alert( 'You\'re only allowed to have ' + app.attendeeMaxPerReg + ' ' + app.attendeePlurCapTerm + ' per Registration!' );
+            $('.glm-attendee-maxed').show();
             return;
         }
         // check for the lock
index 71b4a5d..69c4e71 100644 (file)
@@ -47,7 +47,7 @@ app.Views.Front.RegTime = Backbone.View.extend({
     // add new account
     addNewAccount: function(){
         if ( app.checkForMaxAttendees() === true ) {
-            alert( 'You\'re only allowed to have ' + app.attendeeMaxPerReg + ' ' + app.attendeePlurCapTerm + ' per Registration!' );
+            $('.glm-attendee-maxed').show();
             return;
         }
         // check for the lock
index 89cfd39..f615efc 100755 (executable)
     <div class="glm-time-full" style="display:none;">There is no more availability for this time.</div>
 
     <div class="reg-class-accounts">
+        {/literal}{if $regEvent.attendee_max_per_reg}{literal}
+        <div class="glm-attendee-maxed" style="display:none;color:red;">You're only allowed to have {/literal}{$regEvent.attendee_max_per_reg} {$terms.reg_term_attendee_plur_cap}{literal} per Request!</div>
+        {/literal}{/if}{literal}
         <span class="reg-class-accounts-title">List of {/literal}{$terms.reg_term_attendee_plur}{literal}</span>
+        {/literal}{if $regEvent.attendee_max_per_reg}{literal}
+        <span class="reg-class-accounts-title" style="float:right;">Max {/literal}{$regEvent.attendee_max_per_reg} {literal} per Request</span>
+        {/literal}{/if}{literal}
     </div>
     <img style="display:none;"
     src="{/literal}{$pluginAssetsUrl}{literal}/ajax-loader.gif"