FIX: Javascript .addAttr() doesn't exist

When there's no templates that can be added in the root /admin/pages/add/ hits a JS error and never completes loading
This commit is contained in:
Mike Cochrane 2017-01-24 16:28:26 +13:00 committed by GitHub
parent afd98a2ac0
commit 00de0989f4

View File

@ -140,7 +140,7 @@ $.entwine('ss', function($){
if(this.find('#Form_AddForm_PageType div.radio:not(.disabled)').length) {
this.find('button[name=action_doAdd]').removeAttr('disabled');
} else {
this.find('button[name=action_doAdd]').addAttr('disabled');
this.find('button[name=action_doAdd]').attr('disabled', 'disabled');
}
this.find('.message-restricted')[allAllowed ? 'hide' : 'show']();