define(["jquery","cla_select2"],function(__WEBPACK_EXTERNAL_MODULE_1__,__WEBPACK_EXTERNAL_MODULE_2__){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.i=function(value){return value},__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="/intranet/pages/build/js/",__webpack_require__(__webpack_require__.s=24)}({"./assets/js/create_site_button.js":function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(1),__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function($){var NewSite=function(){this.init()};return NewSite.prototype.init=function(){var self=this;$("#new_site").on("click",function(evt){$("#siteCreateModal").modal(),evt.preventDefault();var source_new=$("#source_new"),source_copy=$("#source_copy"),pick_site=$("#pick_site"),copy_perms=$("#copy_perms");source_new.prop("checked",!0),pick_site.hide(),self.setPreviewLink();var site_picker=$("#copyable_sites");site_picker.select2(),source_new.on("change",function(){pick_site.hide()}),source_copy.on("change",function(){pick_site.show()}),site_picker.on("change",function(evt){self.setPreviewLink($(this).val())}),$("#create_site").on("click",function(evt){evt.preventDefault();var url="/pages/.newsite",do_copy_perms=copy_perms.prop("checked")?1:0;"copy"===$("input[name=source]:checked").val()&&(url+="?source="+site_picker.val()+"&do_copy_perms="+do_copy_perms),window.location=url})})},NewSite.prototype.setPreviewLink=function(){$("#site_preview").prop("href",$("#copyable_sites").val())},NewSite}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},1:function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_1__},2:function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},24:function(module,exports,__webpack_require__){module.exports=__webpack_require__("./assets/js/create_site_button.js")}})});
//# sourceMappingURL=create_site_button.js.map