diff --git a/src/public/modules/forms/base/components/field-date.client.component.js b/src/public/modules/forms/base/components/field-date.client.component.js
index 2143a1919b..17649f6008 100644
--- a/src/public/modules/forms/base/components/field-date.client.component.js
+++ b/src/public/modules/forms/base/components/field-date.client.component.js
@@ -24,6 +24,7 @@ function dateFieldComponentController() {
yearColumns: 3,
minDate: null,
maxDate: null,
+ initDate: null,
}
vm.$onChanges = (changesObj) => {
@@ -55,6 +56,11 @@ function dateFieldComponentController() {
if (get(vm.field, 'dateValidation.customMaxDate')) {
vm.dateOptions.maxDate = new Date(vm.field.dateValidation.customMaxDate)
}
+
+ // If minDate is set, default view upon opening datepicker to be month of minDate
+ if (vm.dateOptions.minDate) {
+ vm.dateOptions.initDate = vm.dateOptions.minDate
+ }
}
}
diff --git a/src/public/modules/forms/base/components/start-page.client.component.js b/src/public/modules/forms/base/components/start-page.client.component.js
index df8213b3c4..e34893a636 100644
--- a/src/public/modules/forms/base/components/start-page.client.component.js
+++ b/src/public/modules/forms/base/components/start-page.client.component.js
@@ -12,6 +12,7 @@ angular.module('forms').component('startPageComponent', {
logoState: '@',
formTitle: '@',
authType: '<',
+ myInfoError: '<',
isAdminPreview: '<',
hasMyinfoFields: '<',
isTemplate: '<',
diff --git a/src/public/modules/forms/base/css/form.css b/src/public/modules/forms/base/css/form.css
index f740a766b8..b4059c1c80 100644
--- a/src/public/modules/forms/base/css/form.css
+++ b/src/public/modules/forms/base/css/form.css
@@ -87,15 +87,21 @@
.public-form .form-locked-msg {
text-align: center;
- color: #484848;
+ color: white;
font-size: 18px;
- margin-bottom: 70px;
- margin-left: 15px;
- margin-right: 15px;
+ margin-bottom: 0;
+ margin-top: 40px;
+
+ /* Offset container padding */
+ margin-left: -35px;
+ margin-right: -35px;
}
.public-form.submit-form .form-locked-msg.myinfo-error {
color: #a94442;
+ margin-left: 0;
+ margin-right: 0;
+ margin-bottom: 40px;
}
.public-form.submit-form .form-locked-msg.myinfo-error i {
diff --git a/src/public/modules/forms/base/directiveViews/submit-form.directive.view.html b/src/public/modules/forms/base/directiveViews/submit-form.directive.view.html
index d51fe881d1..8e908b3e4c 100644
--- a/src/public/modules/forms/base/directiveViews/submit-form.directive.view.html
+++ b/src/public/modules/forms/base/directiveViews/submit-form.directive.view.html
@@ -7,6 +7,7 @@
paragraph="{{ form.startPage.paragraph }}"
logo-state="{{ form.startPage.logo.state }}"
form-title="{{ form.title }}"
+ my-info-error="myInfoError"
auth-type="form.authType"
is-admin-preview="false"
has-myinfo-fields="hasMyInfoFields"
@@ -63,29 +64,6 @@
-
-
- Login with SingPass to access this form. Your SingPass ID will be included
- with your form submission.
-
-
- Login with CorpPass to access this form. Your Entity ID and CorpPass ID
- will be included with your form submission.
-
-
- An error occurred while retrieving your MyInfo details. Kindly refresh
- your browser, or try again later.
-
-
@@ -134,6 +112,7 @@
size="invisible"
on-create="captchaService.setWidget(widgetId)"
on-success="captchaService.onSuccess(response, submitForm)"
+ on-error="captchaService.onError()"
on-expire="captchaService.expire()"
data-badge="inline"
>
diff --git a/src/public/modules/forms/services/captcha.client.service.js b/src/public/modules/forms/services/captcha.client.service.js
index e7e50e2ea2..a6f29df6c6 100644
--- a/src/public/modules/forms/services/captcha.client.service.js
+++ b/src/public/modules/forms/services/captcha.client.service.js
@@ -64,6 +64,12 @@ function captchaService($window, vcRecaptchaService, Toastr) {
cb()
}
+ this.onError = function () {
+ Toastr.error(
+ 'Error: Cannot connect to reCAPTCHA. Please check your internet connectivity or try submitting on another device.',
+ )
+ }
+
/**
* Expire captcha if captcha enabled
*/
diff --git a/src/public/translations/en-SG/landing.json b/src/public/translations/en-SG/landing.json
index e2b5d81207..81131389e0 100644
--- a/src/public/translations/en-SG/landing.json
+++ b/src/public/translations/en-SG/landing.json
@@ -110,7 +110,7 @@
}
},
"FOOTER": {
- "APP_NAME": "FormSG",
+ "APP_NAME": "Form",
"APP_TEXT": "Build government forms in minutes",
"USER_GUIDE": {
"TEXT": "@:USER_GUIDE.TEXT",
@@ -127,8 +127,16 @@
"HREF": "https://go.gov.sg/report-vulnerability"
},
"COPYRIGHT": {
- "TEXT": "© {{year}} Open Government Products, GovTech",
+ "TEXT": {
+ "LINE_1": "©{{year}} Open Government Products, ",
+ "LINE_2": "Government Technology Agency of Singapore"
+ },
"HREF": "https://open.gov.sg"
+ },
+ "SOCIALS": {
+ "LINKEDIN": "https://linkedin.com/company/open-government-products",
+ "FACEBOOK": "https://www.facebook.com/opengovsg/",
+ "OGP": "https://open.gov.sg"
}
}
}
diff --git a/src/types/form.ts b/src/types/form.ts
index f69e09b2b8..dd10ec360d 100644
--- a/src/types/form.ts
+++ b/src/types/form.ts
@@ -1,4 +1,4 @@
-import { Document } from 'mongoose'
+import { Document, Model } from 'mongoose'
import { IFieldSchema, MyInfoAttribute } from './field'
import { ILogicSchema } from './form_logic'
@@ -126,3 +126,24 @@ export interface IEmailForm extends IForm {
}
export type IEmailFormSchema = IEmailForm & IFormSchema
+
+export interface IFormModel extends Model