loading and displaying real login form and register form from drupal

This commit is contained in:
Bachir Soussi Chiadmi 2019-10-06 21:32:46 +02:00
parent 96b23acbb3
commit 6598b88945
11 changed files with 496 additions and 293 deletions

View File

@ -1,3 +1,11 @@
materio_user.register_form:
path: '/materio_user/register_form'
defaults:
_controller: '\Drupal\materio_user\Controller\AjaxRegisterForm::getForm'
_format: json
requirements:
_access: 'TRUE'
materio_user.login_form:
path: '/materio_user/login_form'
defaults:

View File

@ -0,0 +1,87 @@
<?php
// https://www.qed42.com/blog/autocomplete-drupal-8
// https://www.drupal.org/docs/8/modules/search-api/developer-documentation/executing-a-search-in-code
namespace Drupal\materio_user\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Form\FormBuilder;
use Drupal\Core\Form\FormState;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
// use Drupal\Core\Cache\CacheableJsonResponse;
// use Drupal\Core\Cache\CacheableMetadata;
use Drupal\core\render\RenderContext;
/**
* Defines a route controller for entity autocomplete form elements.
*/
class AjaxRegisterForm extends ControllerBase {
/**
* The form builder.
*
* @var \Drupal\Core\Form\FormBuilder
*/
protected $formBuilder;
/**
* Construct.
*/
public function __construct(FormBuilder $formBuilder) {
$this->formBuilder = $formBuilder;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('form_builder')
);
}
private function getFormDefinition(){
// $language = \Drupal::languageManager()->getCurrentLanguage()->getId();
// \Drupal::logger('materio_user')->notice($language);
// $this->form_builded = $this->formBuilder->getForm('Drupal\user\Form\UserLoginForm');
$entity = \Drupal::entityTypeManager()->getStorage('user')->create(array());
$formObject = \Drupal::entityTypeManager()
->getFormObject('user', 'register')
->setEntity($entity);
$this->form_builded = $this->formBuilder()->getForm($formObject);
}
/**
* Handler for getform request.
*/
public function getForm(Request $request) {
$this->getFormDefinition();
$rendered = render($this->form_builded);
// $form_builded = $this->form_builded;
// $rendered = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($form_builded) {
// return render($form_builded);
// });
$data = [
'rendered' => $rendered,
// '#cache' => [
// 'max-age' => \Drupal\Core\Cache\Cache::PERMANENT,
// 'tags' => [
// 'materio_sapi-search_form-cache',
// ]
// ]
];
$response = new JsonResponse();
$response->setData($data);
// $response = new CacheableJsonResponse($data);
// $response->addCacheableDependency(CacheableMetadata::createFromRenderArray($data));
return $response;
}
}

View File

@ -23,7 +23,25 @@
box-shadow: 2px 2px;
}
fieldset[data-v-2952b9b1] {
.form-item[data-v-7bb795f8],
.form-actions[data-v-7bb795f8] {
display: inline-block;
max-width: 32%;
margin: 0;
}
input[data-v-7bb795f8] {
box-sizing: border-box;
max-width: 100%;
}
div.description[data-v-7bb795f8] {
display: none;
}
.form-item-persistent-login[data-v-7bb795f8] {
display: none;
}
fieldset[data-v-340aa566] {
padding: 0;
margin: 0;
border: none;

View File

@ -453,7 +453,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _Modal = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/Modal */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue\"));\n\nvar _LoginRegisterForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/LoginRegisterForm */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;\nvar _default = {\n name: \"Product\",\n router: _route.default,\n props: ['product'],\n data: function data() {\n return {\n quantity: 1,\n showLoginModal: false\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n },\n isAdherent: function isAdherent(state) {\n return state.User.isAdherent;\n }\n })),\n methods: {\n // ...mapActions({\n // userLogin: 'User/userLogin'\n // }),\n closeModal: function closeModal() {\n this.showLoginModal = false;\n },\n checkaddtocart: function checkaddtocart() {\n console.log('checkaddtocart');\n\n if (!this.isloggedin) {\n // TODO: show popup login or register\n this.showLoginModal = true; // TODO: rest login or register\n // TODO: rest login\n // TODO: this.addtocart()\n } else {\n this.addtocart();\n }\n },\n logedIn: function logedIn() {\n console.log('Product: logedIn');\n this.closeModal();\n },\n addtocart: function addtocart() {\n console.log(\"addtocart\");\n\n _restAxios.REST.post(\"/cart/add?_format=json\", [{\n \"purchased_entity_type\": \"commerce_product_variation\",\n \"purchased_entity_id\": this.product.variation_id,\n \"quantity\": this.quantity\n }]).then(function (_ref) {\n var data = _ref.data;\n console.log('product add to cart REST: data', data);\n }).catch(function (error) {\n console.warn('Issue with pricing', error);\n Promise.reject(error);\n });\n }\n },\n components: {\n Modal: _Modal.default,\n LoginRegisterForm: _LoginRegisterForm.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _Modal = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/Modal */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue\"));\n\nvar _LoginRegister = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/LoginRegister */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;\nvar _default = {\n name: \"Product\",\n router: _route.default,\n props: ['product'],\n data: function data() {\n return {\n quantity: 1,\n showLoginModal: false\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n },\n isAdherent: function isAdherent(state) {\n return state.User.isAdherent;\n }\n })),\n methods: {\n // ...mapActions({\n // userLogin: 'User/userLogin'\n // }),\n closeModal: function closeModal() {\n this.showLoginModal = false;\n },\n checkaddtocart: function checkaddtocart() {\n console.log('checkaddtocart');\n\n if (!this.isloggedin) {\n // TODO: show popup login or register\n this.showLoginModal = true; // TODO: rest login or register\n // TODO: rest login\n // TODO: this.addtocart()\n } else {\n this.addtocart();\n }\n },\n logedIn: function logedIn() {\n console.log('Product: logedIn');\n this.closeModal();\n },\n addtocart: function addtocart() {\n console.log(\"addtocart\");\n\n _restAxios.REST.post(\"/cart/add?_format=json\", [{\n \"purchased_entity_type\": \"commerce_product_variation\",\n \"purchased_entity_id\": this.product.variation_id,\n \"quantity\": this.quantity\n }]).then(function (_ref) {\n var data = _ref.data;\n console.log('product add to cart REST: data', data);\n }).catch(function (error) {\n console.warn('Issue with pricing', error);\n Promise.reject(error);\n });\n }\n },\n components: {\n Modal: _Modal.default,\n LoginRegister: _LoginRegister.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -469,6 +469,30 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=script&lang=js&":
/*!***************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=script&lang=js& ***!
\***************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"LoginForm\",\n data: function data() {\n return {\n form: null,\n mail: null,\n password: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin'\n }), {\n getLoginForm: function getLoginForm() {\n var _this = this;\n\n // Form through ajax is provided by materio_user custom module\n // vuejs attributes a inserted by template in theme level\n _maAxios.MA.get(\"/materio_user/login_form\").then(function (_ref) {\n var data = _ref.data;\n console.log(\"getLoginForm data\");\n _this.form = _vue.default.compile(data.rendered);\n _this.$options.staticRenderFns = [];\n _this._staticTrees = [];\n\n _this.form.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }).catch(function (error) {\n console.warn('Issue with getLoginForm', error);\n });\n },\n login: function login() {\n var _this2 = this;\n\n this.userLogin({\n mail: this.mail,\n pass: this.password\n }).then(function () {\n console.log('logedin from login component');\n\n _this2.$emit('onLogedIn');\n }).catch(function (error) {\n console.warn('Issue with login from login component', error);\n Promise.reject(error);\n });\n }\n }),\n beforeMount: function beforeMount() {\n if (!this.form) {\n this.getLoginForm();\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.form) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.form.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=script&lang=js&":
/*!******************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=script&lang=js& ***!
\******************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"RegisterForm\",\n data: function data() {\n return {\n form: null,\n mail: null,\n password: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userRegister: 'User/userRegister'\n }), {\n getRegisterForm: function getRegisterForm() {\n var _this = this;\n\n // Form through ajax is provided by materio_user custom module\n // vuejs attributes a inserted by template in theme level\n _maAxios.MA.get(\"/materio_user/register_form\").then(function (_ref) {\n var data = _ref.data;\n console.log(\"getRegisterForm data\");\n _this.form = _vue.default.compile(data.rendered);\n _this.$options.staticRenderFns = [];\n _this._staticTrees = [];\n\n _this.form.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }).catch(function (error) {\n console.warn('Issue with getRegisterForm', error);\n });\n }\n }),\n beforeMount: function beforeMount() {\n if (!this.form) {\n this.getRegisterForm();\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.form) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.form.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue?vue&type=script&lang=js&":
/*!****************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue?vue&type=script&lang=js& ***!
@ -481,15 +505,15 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=script&lang=js&":
/*!*************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=script&lang=js& ***!
\*************************************************************************************************************************************************************************************************/
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=script&lang=js&":
/*!*********************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=script&lang=js& ***!
\*********************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"LoginForm\",\n data: function data() {\n return {\n loginEmail: null,\n password: null,\n registerEmail: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin',\n userRegister: 'User/userRegister'\n }), {\n onLogin: function onLogin() {\n var _this = this;\n\n this.userLogin({\n mail: this.loginEmail,\n pass: this.password\n }).then(function () {\n console.log('logedin from login component');\n\n _this.$emit('onLogedIn');\n }).catch(function (error) {\n console.warn('Issue with login from login component', error);\n Promise.reject(error);\n });\n },\n onRegister: function onRegister() {\n console.log('on register');\n this.userRegister({\n mail: this.registerEmail\n }).then(function () {\n console.log('user registered');\n }).catch(function (error) {\n console.warn('Issue with register from login component', error);\n Promise.reject(error);\n });\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _LoginForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/LoginForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue\"));\n\nvar _RegisterForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/RegisterForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"LoginRegister\",\n data: function data() {\n return {\n loginEmail: null,\n password: null,\n registerEmail: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin',\n userRegister: 'User/userRegister'\n }), {\n onLogedIn: function onLogedIn() {\n this.$emit('onLogedIn');\n },\n onRegistered: function onRegistered() {\n this.$emit('onRegistered');\n }\n }),\n components: {\n LoginForm: _LoginForm.default,\n RegisterForm: _RegisterForm.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -623,14 +647,36 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true&":
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true& ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true&":
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true& ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options");
eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true&":
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true& ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true&":
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true& ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -804,7 +850,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"article\",\n { staticClass: \"product\" },\n [\n _c(\"header\", [\n _c(\"h1\", { domProps: { innerHTML: _vm._s(_vm.product.title) } })\n ]),\n _vm._v(\" \"),\n _c(\"section\", { staticClass: \"content\" }, [\n _c(\"div\", {\n staticClass: \"description\",\n domProps: { innerHTML: _vm._s(_vm.product.field_description) }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"price\" }, [\n _vm._v(_vm._s(_vm.product.price__number))\n ])\n ]),\n _vm._v(\" \"),\n !_vm.isAdherent\n ? _c(\"aside\", [\n _vm.product.field_multiple\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.quantity,\n expression: \"quantity\"\n }\n ],\n attrs: {\n placeholder: \"quantity\",\n type: \"text\",\n name: \"quantity\",\n value: \"1\"\n },\n domProps: { value: _vm.quantity },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.quantity = $event.target.value\n }\n }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n attrs: { type: \"button\", name: \"addtocart\" },\n on: {\n click: function($event) {\n $event.stopPropagation()\n return _vm.checkaddtocart($event)\n }\n }\n },\n [_vm._v(\"\\n Commander\\n \")]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showLoginModal\n ? _c(\n \"Modal\",\n { on: { close: _vm.closeModal } },\n [\n _c(\"div\", [\n _vm._v(\n \"\\n Please login or register before continue.\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"LoginRegisterForm\", { on: { onLogedIn: _vm.logedIn } })\n ],\n 1\n )\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"article\",\n { staticClass: \"product\" },\n [\n _c(\"header\", [\n _c(\"h1\", { domProps: { innerHTML: _vm._s(_vm.product.title) } })\n ]),\n _vm._v(\" \"),\n _c(\"section\", { staticClass: \"content\" }, [\n _c(\"div\", {\n staticClass: \"description\",\n domProps: { innerHTML: _vm._s(_vm.product.field_description) }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"price\" }, [\n _vm._v(_vm._s(_vm.product.price__number))\n ])\n ]),\n _vm._v(\" \"),\n !_vm.isAdherent\n ? _c(\"aside\", [\n _vm.product.field_multiple\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.quantity,\n expression: \"quantity\"\n }\n ],\n attrs: {\n placeholder: \"quantity\",\n type: \"text\",\n name: \"quantity\",\n value: \"1\"\n },\n domProps: { value: _vm.quantity },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.quantity = $event.target.value\n }\n }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n attrs: { type: \"button\", name: \"addtocart\" },\n on: {\n click: function($event) {\n $event.stopPropagation()\n return _vm.checkaddtocart($event)\n }\n }\n },\n [_vm._v(\"\\n Commander\\n \")]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showLoginModal\n ? _c(\n \"Modal\",\n {\n attrs: { styles: { width: \"500px\", height: \"100%\" } },\n on: { close: _vm.closeModal }\n },\n [\n _c(\"h2\", [_vm._v(\"Please login or register before continue.\")]),\n _vm._v(\" \"),\n _c(\"LoginRegister\", { on: { onLogedIn: _vm.logedIn } })\n ],\n 1\n )\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -820,15 +866,15 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true&":
/*!***************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true& ***!
\***************************************************************************************************************************************************************************************************************************************************************/
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=template&id=340aa566&scoped=true&":
/*!***********************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=template&id=340aa566&scoped=true& ***!
\***********************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { attrs: { id: \"login-form\" } }, [\n _c(\"fieldset\", { staticClass: \"login\" }, [\n _c(\"h2\", [_vm._v(\"Login\")]),\n _vm._v(\" \"),\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.loginEmail,\n expression: \"loginEmail\"\n }\n ],\n attrs: { type: \"email\", name: \"email\", placeholder: \"Email\" },\n domProps: { value: _vm.loginEmail },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.loginEmail = $event.target.value\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.password,\n expression: \"password\"\n }\n ],\n attrs: { type: \"password\", name: \"password\", placeholder: \"Password\" },\n domProps: { value: _vm.password },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.password = $event.target.value\n }\n }\n }),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n attrs: { type: \"button\", name: \"login\" },\n on: {\n click: function($event) {\n $event.stopPropagation()\n return _vm.onLogin($event)\n }\n }\n },\n [_vm._v(\"\\n login\\n \")]\n )\n ]),\n _vm._v(\" \"),\n _c(\"fieldset\", { staticClass: \"register\" }, [\n _c(\"h2\", [_vm._v(\"Or register\")]),\n _vm._v(\" \"),\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.registerEmail,\n expression: \"registerEmail\"\n }\n ],\n attrs: { type: \"email\", name: \"email\", placeholder: \"Email\" },\n domProps: { value: _vm.registerEmail },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.registerEmail = $event.target.value\n }\n }\n }),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n attrs: { type: \"button\", name: \"register\" },\n on: {\n click: function($event) {\n $event.stopPropagation()\n return _vm.onRegister($event)\n }\n }\n },\n [_vm._v(\"\\n register\\n \")]\n )\n ])\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"login-register\" } },\n [\n _c(\"h3\", [_vm._v(\"Login\")]),\n _vm._v(\" \"),\n _c(\"LoginForm\", { on: { onLogedIn: _vm.onLogedIn } }),\n _vm._v(\" \"),\n _c(\"h3\", [_vm._v(\"Register\")]),\n _vm._v(\" \"),\n _c(\"RegisterForm\", { on: { onRegistered: _vm.onRegistered } })\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -1333,6 +1379,78 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue":
/*!****************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LoginForm.vue?vue&type=script&lang=js& */ \"./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=script&lang=js&\");\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n/* harmony import */ var _LoginForm_vue_vue_type_style_index_0_id_7bb795f8_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true& */ \"./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\nvar render, staticRenderFns\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n render,\n staticRenderFns,\n false,\n null,\n \"7bb795f8\",\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=script&lang=js&":
/*!*****************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=script&lang=js& ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginForm.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true&":
/*!**************************************************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true& ***!
\**************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_style_index_0_id_7bb795f8_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true& */ \"./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_style_index_0_id_7bb795f8_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_style_index_0_id_7bb795f8_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_style_index_0_id_7bb795f8_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_style_index_0_id_7bb795f8_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginForm_vue_vue_type_style_index_0_id_7bb795f8_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue":
/*!*******************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RegisterForm.vue?vue&type=script&lang=js& */ \"./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=script&lang=js&\");\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n/* harmony import */ var _RegisterForm_vue_vue_type_style_index_0_id_2acc57a0_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true& */ \"./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\nvar render, staticRenderFns\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n render,\n staticRenderFns,\n false,\n null,\n \"2acc57a0\",\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=script&lang=js&":
/*!********************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=script&lang=js& ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./RegisterForm.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true&":
/*!*****************************************************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true& ***!
\*****************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_style_index_0_id_2acc57a0_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true& */ \"./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_style_index_0_id_2acc57a0_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_style_index_0_id_2acc57a0_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_style_index_0_id_2acc57a0_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_style_index_0_id_2acc57a0_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_RegisterForm_vue_vue_type_style_index_0_id_2acc57a0_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue":
/*!*****************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue ***!
@ -1357,51 +1475,51 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue":
/*!**************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue ***!
\**************************************************************************************/
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue":
/*!**********************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _LoginRegisterForm_vue_vue_type_template_id_2952b9b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true& */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true&\");\n/* harmony import */ var _LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LoginRegisterForm.vue?vue&type=script&lang=js& */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=script&lang=js&\");\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n/* harmony import */ var _LoginRegisterForm_vue_vue_type_style_index_0_id_2952b9b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true& */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n _LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _LoginRegisterForm_vue_vue_type_template_id_2952b9b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _LoginRegisterForm_vue_vue_type_template_id_2952b9b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n \"2952b9b1\",\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _LoginRegister_vue_vue_type_template_id_340aa566_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LoginRegister.vue?vue&type=template&id=340aa566&scoped=true& */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=template&id=340aa566&scoped=true&\");\n/* harmony import */ var _LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LoginRegister.vue?vue&type=script&lang=js& */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=script&lang=js&\");\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n/* harmony import */ var _LoginRegister_vue_vue_type_style_index_0_id_340aa566_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true& */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n _LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _LoginRegister_vue_vue_type_template_id_340aa566_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _LoginRegister_vue_vue_type_template_id_340aa566_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n \"340aa566\",\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=script&lang=js&":
/*!***************************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=script&lang=js& ***!
\***************************************************************************************************************/
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=script&lang=js&":
/*!***********************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=script&lang=js& ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginRegisterForm.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginRegister.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true&":
/*!************************************************************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true& ***!
\************************************************************************************************************************************************/
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true&":
/*!********************************************************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true& ***!
\********************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_style_index_0_id_2952b9b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true& */ \"./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=style&index=0&id=2952b9b1&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_style_index_0_id_2952b9b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_style_index_0_id_2952b9b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_style_index_0_id_2952b9b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_style_index_0_id_2952b9b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_style_index_0_id_2952b9b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_style_index_0_id_340aa566_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true& */ \"./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true&\");\n/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_style_index_0_id_340aa566_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_style_index_0_id_340aa566_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_style_index_0_id_340aa566_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_style_index_0_id_340aa566_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_style_index_0_id_340aa566_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?");
/***/ }),
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true&":
/*!*********************************************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true& ***!
\*********************************************************************************************************************************/
/***/ "./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=template&id=340aa566&scoped=true&":
/*!*****************************************************************************************************************************!*\
!*** ./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=template&id=340aa566&scoped=true& ***!
\*****************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_template_id_2952b9b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?vue&type=template&id=2952b9b1&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_template_id_2952b9b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegisterForm_vue_vue_type_template_id_2952b9b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegisterForm.vue?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_template_id_340aa566_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./LoginRegister.vue?vue&type=template&id=340aa566&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=template&id=340aa566&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_template_id_340aa566_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_LoginRegister_vue_vue_type_template_id_340aa566_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?");
/***/ }),

View File

@ -28,11 +28,10 @@
<Modal
v-if="showLoginModal"
@close="closeModal"
:styles="{width:'500px', height:'100%'}"
>
<div>
Please login or register before continue.
</div>
<LoginRegisterForm @onLogedIn="logedIn"/>
<h2>Please login or register before continue.</h2>
<LoginRegister @onLogedIn="logedIn" />
</Modal>
</article>
@ -44,7 +43,7 @@ import { REST } from 'vuejs/api/rest-axios'
import router from 'vuejs/route'
import { mapState, mapActions } from 'vuex'
import Modal from 'vuejs/components/Helper/Modal'
import LoginRegisterForm from 'vuejs/components/Helper/LoginRegisterForm'
import LoginRegister from 'vuejs/components/Helper/LoginRegister'
let basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;
@ -108,7 +107,7 @@ export default {
},
components: {
Modal,
LoginRegisterForm
LoginRegister
}
}
</script>

View File

@ -1,94 +0,0 @@
<template lang="html">
<div id="block-userlogin" class="">
<h2>{{ title }}</h2>
<section>
<input
id="edit-name"
class="form-email"
type="text"
v-bind:placeholder="form.ph_email" name="name"
v-model="mail"
@keyup.enter="login"
/>
<input
id="edit-pass"
class="form-text"
type="password"
v-bind:placeholder="form.ph_pass" name="pass"
v-model="password"
@keyup.enter="login"
/>
<button
id="edit-submit"
class="button"
@click.stop="login"
>
{{ form.btn_value }}
</button>
<ul>
<li><a
v-bind:href="form.register.href"
>
{{ form.register.title }}
</a></li>
<li><a
v-bind:href="form.reset.href"
>
{{ form.reset.title }}
</a></li>
</ul>
</section>
</div>
</template>
<script>
// https://github.com/alvar0hurtad0/drupal-vuejs-todo
import { mapState, mapActions } from 'vuex'
export default {
data () {
return {
mail: '',
password: ''
}
},
props: ['title', 'form'],
computed: {
...mapState(['User'])
},
methods: {
...mapActions({
userLogin: 'User/userLogin'
}),
login () {
this.userLogin({
mail: this.mail,
pass: this.password
})
}
}
}
</script>
<style lang="scss" scoped>
section{
max-width:300px;
}
input{
display:block;
max-width:100%;
margin:0.5em 0 0 0;
}
button{
margin:0.5em 0 0 0;
}
ul{
margin:0; padding:0.5em 0 0 0;
}
li{
list-style:none;
margin:0.5em 0 0 0; padding:0;
font-size:0.882em;
}
a{
}
</style>

View File

@ -0,0 +1,86 @@
<script>
import Vue from 'vue'
import { mapState, mapActions } from 'vuex'
import { MA } from 'vuejs/api/ma-axios'
export default {
name: "LoginForm",
data: () => ({
form:null,
mail:null,
password:null
}),
methods: {
...mapActions({
userLogin: 'User/userLogin'
}),
getLoginForm(){
// Form through ajax is provided by materio_user custom module
// vuejs attributes a inserted by template in theme level
MA.get(`/materio_user/login_form`)
.then(({data}) => {
console.log("getLoginForm data");
this.form = Vue.compile(data.rendered)
this.$options.staticRenderFns = [];
this._staticTrees = [];
this.form.staticRenderFns.map(fn => (this.$options.staticRenderFns.push(fn)));
})
.catch(( error ) => {
console.warn('Issue with getLoginForm', error)
})
},
login () {
this.userLogin({
mail: this.mail,
pass: this.password
}).then( () => {
console.log('logedin from login component');
this.$emit('onLogedIn')
}
).catch(( error ) => {
console.warn('Issue with login from login component', error)
Promise.reject(error)
})
}
},
beforeMount () {
if(!this.form){
this.getLoginForm()
}
},
mounted(){
// console.log('LoginBlock mounted');
Drupal.attachBehaviors(this.$el);
},
render(h) {
// console.log('LoginBlock render');
if(!this.form){
// console.log('LoginBlock render NAN');
return h('span', 'Loading ...')
}else{
// console.log('LoginBlock render template');
return this.form.render.call(this)
}
}
}
</script>
<style lang="scss" scoped>
.form-item,
.form-actions{
display:inline-block;
max-width:32%;
margin:0;
}
input{
box-sizing:border-box;
max-width:100%;
}
div.description{
display:none;
}
.form-item-persistent-login{
display:none;
}
</style>

View File

@ -0,0 +1,86 @@
<script>
import Vue from 'vue'
import { mapState, mapActions } from 'vuex'
import { MA } from 'vuejs/api/ma-axios'
export default {
name: "RegisterForm",
data: () => ({
form:null,
mail:null,
password:null
}),
methods: {
...mapActions({
userRegister: 'User/userRegister'
}),
getRegisterForm(){
// Form through ajax is provided by materio_user custom module
// vuejs attributes a inserted by template in theme level
MA.get(`/materio_user/register_form`)
.then(({data}) => {
console.log("getRegisterForm data");
this.form = Vue.compile(data.rendered)
this.$options.staticRenderFns = [];
this._staticTrees = [];
this.form.staticRenderFns.map(fn => (this.$options.staticRenderFns.push(fn)));
})
.catch(( error ) => {
console.warn('Issue with getRegisterForm', error)
})
},
// login () {
// this.userLogin({
// mail: this.mail,
// pass: this.password
// }).then( () => {
// console.log('logedin from login component');
// this.$emit('onLogedIn')
// }
// ).catch(( error ) => {
// console.warn('Issue with login from login component', error)
// Promise.reject(error)
// })
// }
},
beforeMount () {
if(!this.form){
this.getRegisterForm()
}
},
mounted(){
// console.log('LoginBlock mounted');
Drupal.attachBehaviors(this.$el);
},
render(h) {
// console.log('LoginBlock render');
if(!this.form){
// console.log('LoginBlock render NAN');
return h('span', 'Loading ...')
}else{
// console.log('LoginBlock render template');
return this.form.render.call(this)
}
}
}
</script>
<style lang="scss" scoped>
// .form-item,
// .form-actions{
// display:inline-block;
// max-width:30%;
// margin:0;
// }
// input{
// box-sizing:content-box;
// max-width:100%;
// }
// div.description{
// display:none;
// }
// .form-item-persistent-login{
// display:none;
// }
</style>

View File

@ -1,58 +0,0 @@
<template>
<div id="login-form">
<h2>Login</h2>
<input
type="email"
name="email"
v-model="email"
placeholder="Email"
>
<input
type="password"
name="password"
v-model="password"
placeholder="Password"
>
<button
type="button"
name="login"
@click.stop="onLogin"
>
login
</button>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
name: "LoginForm",
data: () => ({
email:null,
password:null
}),
methods: {
...mapActions({
userLogin: 'User/userLogin'
}),
onLogin () {
this.userLogin({
mail: this.email,
pass: this.password
}).then( () => {
console.log('logedin from login component');
this.$emit('onLogedIn')
}
).catch(( error ) => {
console.warn('Issue with login from login component', error)
Promise.reject(error)
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,50 @@
<template>
<div id="login-register">
<h3>Login</h3>
<LoginForm @onLogedIn="onLogedIn" />
<h3>Register</h3>
<RegisterForm @onRegistered="onRegistered" />
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
import LoginForm from 'vuejs/components/Form/LoginForm'
import RegisterForm from 'vuejs/components/Form/RegisterForm'
export default {
name: "LoginRegister",
data: () => ({
loginEmail:null,
password:null,
registerEmail:null
}),
methods: {
...mapActions({
userLogin: 'User/userLogin',
userRegister: 'User/userRegister'
}),
onLogedIn () {
this.$emit('onLogedIn')
},
onRegistered () {
this.$emit('onRegistered')
}
},
components: {
LoginForm,
RegisterForm
}
}
</script>
<style lang="scss" scoped>
fieldset{
padding:0;
margin:0;
border:none;
}
</style>

View File

@ -1,97 +0,0 @@
<template>
<div id="login-form">
<fieldset class="login">
<h2>Login</h2>
<input
type="email"
name="email"
v-model="loginEmail"
placeholder="Email"
>
<input
type="password"
name="password"
v-model="password"
placeholder="Password"
>
<button
type="button"
name="login"
@click.stop="onLogin"
>
login
</button>
</fieldset>
<fieldset class="register">
<h2>Or register</h2>
<input
type="email"
name="email"
v-model="registerEmail"
placeholder="Email"
>
<button
type="button"
name="register"
@click.stop="onRegister"
>
register
</button>
</fieldset>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
name: "LoginForm",
data: () => ({
loginEmail:null,
password:null,
registerEmail:null
}),
methods: {
...mapActions({
userLogin: 'User/userLogin',
userRegister: 'User/userRegister'
}),
onLogin () {
this.userLogin({
mail: this.loginEmail,
pass: this.password
}).then( () => {
console.log('logedin from login component');
this.$emit('onLogedIn')
}
).catch(( error ) => {
console.warn('Issue with login from login component', error)
Promise.reject(error)
})
},
onRegister () {
console.log('on register');
this.userRegister({
mail: this.registerEmail
}).then( () => {
console.log('user registered');
}
).catch(( error ) => {
console.warn('Issue with register from login component', error)
Promise.reject(error)
})
}
}
}
</script>
<style lang="scss" scoped>
fieldset{
padding:0;
margin:0;
border:none;
}
</style>