formSchema() {
    let fullSchema = formSchema();
    // Set the password to optional and update the label to "New Password"
    let modifiedSchema = new SimpleSchema([fullSchema.pick(["email", "name"]), {
      current_password: {
        label: "Current Password",
        type: String,
        autoform: {
          type: "password"
        }
      },
      password: {
        label: "New Password",
        type: String,
        optional: true,
        min: 8,
        autoform: {
          type: "password"
        }
      },
      password_confirm: {
        label: "New Password Confirm",
        type: String,
        optional: true,
        custom: function() {
          if(this.value !== this.field('password').value) {
            return 'passwordMismatch';
          }
        },
        autoform: {
          type: "password"
        }
      },
      poc_name: {
        label: "IOOS Point of Contact Name",
        type: String,
      },
      poc_email: {
        label: "IOOS Point of Contact Email",
        type: String,
        regEx: SimpleSchema.RegEx.Email
      }
    }]);
    return modifiedSchema;
  }
/**
   * Returns a modified schema of the new user form. In this modified version,
   * passwords are optional and the labels are modified.
   */
Returns a modified schema of the new user form. In this modified version,
passwords are optional and the labels are modified.
Returns a modified schema of the new user form . In this modified version passwords are optional and the labels are modified .
formSchema() {
    let fullSchema = formSchema();
    let modifiedSchema = new SimpleSchema([fullSchema.pick(["email", "name"]), {
      current_password: {
        label: "Current Password",
        type: String,
        autoform: {
          type: "password"
        }
      },
      password: {
        label: "New Password",
        type: String,
        optional: true,
        min: 8,
        autoform: {
          type: "password"
        }
      },
      password_confirm: {
        label: "New Password Confirm",
        type: String,
        optional: true,
        custom: function() {
          if(this.value !== this.field('password').value) {
            return 'passwordMismatch';
          }
        },
        autoform: {
          type: "password"
        }
      },
      poc_name: {
        label: "IOOS Point of Contact Name",
        type: String,
      },
      poc_email: {
        label: "IOOS Point of Contact Email",
        type: String,
        regEx: SimpleSchema.RegEx.Email
      }
    }]);
    return modifiedSchema;
  }
formSchema ( ) { let fullSchema = formSchema ( ) ; let modifiedSchema = new SimpleSchema ( [ fullSchema . pick ( [ "email" , "name" ] ) , { current_password : { label : "Current Password" , type : String , autoform : { type : "password" } } , password : { label : "New Password" , type : String , optional : true , min : 8 , autoform : { type : "password" } } , password_confirm : { label : "New Password Confirm" , type : String , optional : true , custom : function ( ) { if ( this . value !== this . field ( 'password' ) . value ) { return 'passwordMismatch' ; } } , autoform : { type : "password" } } , poc_name : { label : "IOOS Point of Contact Name" , type : String , } , poc_email : { label : "IOOS Point of Contact Email" , type : String , regEx : SimpleSchema . RegEx . Email } } ] ) ; return modifiedSchema ; }
Returns a modified schema of the new user form.
Returns a modified schema of the new user form .
// Set the password to optional and update the label to "New Password"