Class: ContactModel

ContactModel

ContactModel

new ContactModel()

modules/tools/contact/model.js, line 97
Properties:
Name Type Argument Default Description
maxLines String "5" Number of lines for the textarea of the form
from Array.<Object> <optional>
[{"email":"lgvgeoportal-hilfe@gv.hamburg.de","name":"LGVGeoportalHilfe"}] Default sender of email. Email object existst of:
Properties
Name Type Description
email String Email address
name String Email name to be shown
to Array.<Object> <optional>
[{"email":"lgvgeoportal-hilfe@gv.hamburg.de","name":"LGVGeoportalHilfe"}] Default receiver of email. Email object existst of:
Properties
Name Type Description
email String Email address
name String Email name to be shown
cc Array.<Object> <optional>
[] CC emails. Email object existst of:
Properties
Name Type Description
email String Email address
name String Email name to be shown
ccToUser Boolean false Flag if user should get an email.
bcc Array.<Object> <optional>
[] BCC emails. Email object existst of:
Properties
Name Type Description
email String Email address
name String Email name to be shown
text String "" Users text
url String "" Url of email service
ticketId String "" Generated Id of user ticket. Format "mm.dd.-[Id]"
systemInfo String "" System info
subject String "" Subject of email
userName String "" name of user
userEmail String "" email of user
userTel String "" telephone number of user
includeSystemInfo Boolean false Flag if sytsem info should be included in email
contactInfo String "" Additional text that can be shown above the contact form
glyphicon String "glyphicon-envelope" Glyhphicon that is shown before the tool name
serviceID String Id of service in rest-services.json thats contains the service url
lngSwitchDetected String "" contains the current language, view is listening to it
textPlaceholder String "Bitte formulieren Sie hier Ihre Frage und drücken Sie auf "Abschicken""] Placeholder for user input textarea
userNamePlaceholder String "", filled with "Ihr Name"- translated
emailAddressPlaceholder String "", filled with "Ihre Emailadresse"- translated
telephonePlaceholder String "", filled with "Ihre Telefonnummer"- translated
errorName String "", filled with "Bitte nennen Sie uns Ihren Namen."- translated
errorEmail String "", filled with "Bitte geben Sie eine gültige Emailadresse ein."- translated
errorNumber String "", filled with "Unter welcher Telefonnummer können wir Sie erreichen?"- translated
textSendButton String "", filled with "Abschicken"- translated
errorMessage String "", filled with "Emailversand fehlgeschlagen!"- translated
successMessage String "", filled with "Ihre Anfrage wurde erfolgreich versendet"- translated
successTicket String "", filled with "Ihre Ticketnummer lautet:"- translated
Fires:

Extends

Methods

changeLang(lng){Void}

modules/tools/contact/model.js, line 113
change language - sets default values for the language
Name Type Description
lng String the language changed to

cleanFields(){void}

modules/tools/contact/model.js, line 301
Resets the form after successfull sending

generateTicketId(){String}

modules/tools/contact/model.js, line 168
Generates the ticketId using date. Format is "mm.dd-[uniqueId]"
Returns:
generated id

send(){void}

modules/tools/contact/model.js, line 239
Sends the email via ajax request
Fires:
  • Util#event:RadioTriggerUtilShowLoader
  • Util#event:RadioTriggerUtilHideLoader
  • AlertingModel#event:RadioTriggerAlertAlert

setAttributes(configJson){void}

modules/tools/contact/model.js, line 136
Creates and sets the initially needed attributes
Name Type Description
configJson JSON configJson
Fires:

setBcc(value){void}

modules/tools/contact/model.js, line 430
Setter for bcc
Name Type Description
value Array.<Object> bcc

setCc(value){void}

modules/tools/contact/model.js, line 394
Setter for cc
Name Type Description
value Array.<Object> cc

setCcToUser(value){void}

modules/tools/contact/model.js, line 403
Setter for ccToUser
Name Type Description
value Boolean ccToUser

setCloseAndDelete(value){void}

modules/tools/contact/model.js, line 438
Setter for closeAndDelte
Name Type Description
value Boolean true: close and delete contact after send, false: do not close after send

setFrom(value){void}

modules/tools/contact/model.js, line 412
Setter for from
Name Type Description
value Array.<Object> from

inherited setGlyphicon(value){void}

modules/core/modelList/item.js, line 69
Setter for glyphicon
Name Type Description
value String Glyphicon

inherited setId(value){void}

modules/core/modelList/item.js, line 34
Setter for id
Name Type Description
value String Id

setIncludeSystemInfo(value){void}

modules/tools/contact/model.js, line 340
Setter for includeSystemInfo
Name Type Description
value Boolean includeSystemInfo

inherited setIsActive(value){void}

modules/core/modelList/tool/model.js, line 129
Activates or deactivates tool
Name Type Description
value Boolean Flag if tool is active

inherited setIsInThemen(value){void}

modules/core/modelList/item.js, line 78
Setter for isInThemen
Name Type Description
value Boolean Flag if item is in themen

inherited setIsVisibleInMenu(value){void}

modules/core/modelList/item.js, line 105
Setter for setIsVisibleInMenu
Name Type Description
value Boolean Flag if item is visible in menu

inherited setIsVisibleInTree(value){void}

modules/core/modelList/item.js, line 96
Setter for isVisibleInTree
Name Type Description
value Boolean Flag if item is visible in layertree

inherited setLevel(value){void}

modules/core/modelList/item.js, line 87
Setter for level
Name Type Description
value String Level

inherited setName(value){void}

modules/core/modelList/item.js, line 52
Setter for name
Name Type Description
value String Name

inherited setParentId(value){void}

modules/core/modelList/item.js, line 43
Setter for parentId
Name Type Description
value String ParentId

setSubject(value){void}

modules/tools/contact/model.js, line 349
Setter for subject
Name Type Description
value String subject

setSystemInfo(value){void}

modules/tools/contact/model.js, line 331
Setter for systemInfo
Name Type Description
value String systemInfo

setText(value){void}

modules/tools/contact/model.js, line 385
Setter for text
Name Type Description
value String text

setTicketId(value){void}

modules/tools/contact/model.js, line 322
Setter for ticketId
Name Type Description
value String ticketId

setTo(value){void}

modules/tools/contact/model.js, line 421
Setter for to
Name Type Description
value Array.<Object> to

inherited setType(value){void}

modules/core/modelList/item.js, line 60
Setter for type
Name Type Description
value String Type

setUrl(value){void}

modules/tools/contact/model.js, line 313
Setter for url
Name Type Description
value String url

setUserAttributes(evt){void}

modules/tools/contact/model.js, line 182
Sets the user attributes on user input
Name Type Description
evt KeyboardEvent Event fired if user makes input in form

setUserEmail(value){void}

modules/tools/contact/model.js, line 367
Setter for userEmail
Name Type Description
value String userEmail

setUserName(value){void}

modules/tools/contact/model.js, line 358
Setter for userName
Name Type Description
value String userName

setUserTel(value){void}

modules/tools/contact/model.js, line 376
Setter for userTel
Name Type Description
value String userTel

setWithTicketNo(value){void}

modules/tools/contact/model.js, line 446
Setter for withTicketNo
Name Type Description
value Boolean true: use Ticket Number, false: do not use Ticket Number

inherited superChangeLang(){Void}

modules/core/modelList/tool/model.js, line 113
change language - sets or translates the name of this tool, if property i18nextTranslate is no function. If name is defined in config.json, the name is not translated else property nameTranslationKey is used.

validate(attributes){Boolean}

modules/tools/contact/model.js, line 212
validates the user inputs. Backbone function that is called on this.isValid()
Name Type Description
attributes Object User inputs
Returns:
if validation failed or not

Events

changeInvalid

devtools/jsdoc/events.js, line 346
Is fired when attribute isActive changes
Listeners of This Event:

changeIsActive

devtools/jsdoc/events.js, line 341
Is fired when attribute isActive changes
Listeners of This Event: