To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 6b56e70e authored by Hermann's avatar Hermann
Browse files

use loading screen when waiting for schema

parent b6781a07
......@@ -5,6 +5,7 @@ import { TabsCSS, ButtonCSS } from 'polythene-css';
// eslint-disable-next-line import/extensions
import { apiUrl, ownUrl } from 'networkConfig';
import { colors } from '../style';
import { loadingScreen } from '../layout';
import { icons } from '../views/elements';
import EditView from '../views/editView';
......@@ -160,7 +161,7 @@ export default class newEvent extends EditView {
}
view() {
if (!this.form.schema) return '';
if (!this.form.schema) return m(loadingScreen);
const titles = ['Event Description', 'When and Where?', 'Signups', 'Advertisement'];
if (this.rightSubmit) titles.push('Images');
......@@ -308,10 +309,11 @@ export default class newEvent extends EditView {
}
},
}),
...this.hasregistration && this.form.renderSchema(['spots', 'time_register_start', 'time_register_end']),
...this.hasregistration && this.form.renderSchema([
'spots', 'time_register_start', 'time_register_end']),
this.hasregistration && this.form._renderField('add_fields_food', {
type: 'boolean',
label: 'Food Limitations'
label: 'Food Limitations',
}),
this.hasregistration && this.form._renderField('add_fields_sbb', {
type: 'boolean',
......
......@@ -4,6 +4,7 @@ import { ListSelect, DatalistController, Select } from 'amiv-web-ui-components';
// eslint-disable-next-line import/extensions
import { apiUrl } from 'networkConfig';
import { ResourceHandler } from '../auth';
import { loadingScreen } from '../layout';
import EditView from '../views/editView';
......@@ -83,7 +84,7 @@ export default class NewGroup extends EditView {
}
view() {
if (!this.form.schema) return '';
if (!this.form.schema) return m(loadingScreen);
return this.layout([
...this.form.renderSchema(['name', 'allow_self_enrollment', 'requires_storage']),
m('div', { style: { display: 'flex' } }, [
......
import m from 'mithril';
import { RadioGroup, TextInput } from 'amiv-web-ui-components';
import { TextInput } from 'amiv-web-ui-components';
import { loadingScreen } from '../layout';
import EditView from '../views/editView';
export default class UserEdit extends EditView {
......@@ -9,7 +10,7 @@ export default class UserEdit extends EditView {
}
view() {
if (!this.form.schema) return '';
if (!this.form.schema) return m(loadingScreen);
return this.layout([
...this.form.renderSchema(['lastname', 'firstname', 'email', 'nethz']),
m(TextInput, this.form.bind({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment