Skip to content

Commit 7cebd39

Browse files
Merge branch 'development' of github.com:fossasia/open-event-frontend into import_event
2 parents 929271f + dfff264 commit 7cebd39

File tree

46 files changed

+1449
-676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1449
-676
lines changed

app/components/forms/admin/settings/system-form.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -162,26 +162,6 @@ export default Component.extend(FormMixin, {
162162
]
163163
},
164164

165-
smtpUsername: {
166-
identifier : 'smtp_username',
167-
rules : [
168-
{
169-
type : 'empty',
170-
prompt : this.get('l10n').t('Please enter the username for SMTP')
171-
}
172-
]
173-
},
174-
175-
smtpPassword: {
176-
identifier : 'smtp_password',
177-
rules : [
178-
{
179-
type : 'empty',
180-
prompt : this.get('l10n').t('Please enter the password for SMTP')
181-
}
182-
]
183-
},
184-
185165
sendgridToken: {
186166
identifier : 'sendgrid_token',
187167
rules : [
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import Component from '@ember/component';
2+
import FormMixin from 'open-event-frontend/mixins/form';
3+
4+
export default Component.extend(FormMixin, {
5+
getValidationRules() {
6+
return {
7+
inline : true,
8+
delay : false,
9+
on : 'blur',
10+
fields : {
11+
identification: {
12+
identifier : 'email',
13+
rules : [
14+
{
15+
type : 'empty',
16+
prompt : this.get('l10n').t('Please enter your email ID')
17+
},
18+
{
19+
type : 'email',
20+
prompt : this.get('l10n').t('Please enter a valid email ID')
21+
}
22+
]
23+
},
24+
password: {
25+
identifier : 'password',
26+
rules : [
27+
{
28+
type : 'empty',
29+
prompt : this.get('l10n').t('Please enter your password')
30+
}
31+
]
32+
}
33+
}
34+
};
35+
},
36+
actions: {
37+
submit() {
38+
this.onValid(() => {
39+
if (this.get('userExists')) {
40+
this.loginExistingUser(this.email, this.password);
41+
} else {
42+
this.createNewUserViaEmail(this.email);
43+
}
44+
});
45+
}
46+
}
47+
});

app/components/forms/register-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default Component.extend(FormMixin, {
3030
prompt : this.get('l10n').t('Please enter a password')
3131
},
3232
{
33-
type : 'minLength[6]',
33+
type : 'minLength[8]',
3434
prompt : this.get('l10n').t('Your password must have at least {ruleValue} characters')
3535
}
3636
]

app/components/forms/wizard/basic-details-step.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ export default Component.extend(FormMixin, EventWizardMixin, {
254254
{
255255
type : 'number',
256256
prompt : this.get('l10n').t('Invalid number')
257+
},
258+
{
259+
type : 'integer[1..]',
260+
prompt : this.get('l10n').t('Maximum tickets per order should be greater than 0')
257261
}
258262
]
259263
},

app/components/forms/wizard/sponsors-step.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ export default Component.extend(FormMixin, {
1717
prompt : this.get('l10n').t('Please give your sponsor a name')
1818
}
1919
]
20+
},
21+
image_upload: {
22+
rules: [
23+
{
24+
type : 'empty',
25+
prompt : this.get('l10n').t('Please upload sponsor\'s logo.')
26+
}
27+
]
2028
}
2129
}
2230
};

app/components/modals/login-signup-modal.js

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,6 @@
11
import ModalBase from 'open-event-frontend/components/modals/modal-base';
2-
import FormMixin from 'open-event-frontend/mixins/form';
3-
4-
export default ModalBase.extend(FormMixin, {
5-
getValidationRules() {
6-
return {
7-
inline : true,
8-
delay : false,
9-
on : 'blur',
10-
fields : {
11-
identification: {
12-
identifier : 'email',
13-
rules : [
14-
{
15-
type : 'empty',
16-
prompt : this.get('l10n').t('Please enter your email ID')
17-
},
18-
{
19-
type : 'email',
20-
prompt : this.get('l10n').t('Please enter a valid email ID')
21-
}
22-
]
23-
},
24-
password: {
25-
identifier : 'password',
26-
rules : [
27-
{
28-
type : 'empty',
29-
prompt : this.get('l10n').t('Please enter your password')
30-
}
31-
]
32-
}
33-
}
34-
};
35-
},
362

3+
export default ModalBase.extend({
374
actions: {
385
toggleView() {
396
this.set('isOpen', false);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Component from '@ember/component';
22

33
export default Component.extend({
4+
showBanner: true
45
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
4+
export default Component.extend({
5+
buyer: computed('data.user', function() {
6+
return this.get('data.user');
7+
})
8+
});

app/controllers/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default Controller.extend({
1919
}
2020
const startDateTime = callForPapers.get('startsAt');
2121
const endDateTime = callForPapers.get('endsAt');
22-
return (moment().isBetween(startDateTime, endDateTime) && (sessionEnabled));
22+
const privacyState = callForPapers.get('privacy');
23+
return (moment().isBetween(startDateTime, endDateTime) && (sessionEnabled) && (privacyState === 'public'));
2324
});
2425
}),
2526

app/models/admin-sales-by-organizer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import ModelBase from 'open-event-frontend/models/base';
33

44
export default ModelBase.extend({
55
firstName : attr('string'),
6-
lastName : attr('moment'),
6+
lastName : attr('string'),
7+
email : attr('string'),
78
sales : attr()
89
});

0 commit comments

Comments
 (0)