<commit_before>JView           = require './../../core/jview'
CustomLinkView  = require './../../core/customlinkview'
MainHeaderView  = require './../../core/mainheaderview'
LoginInlineForm = require './../../login/loginform'
geoPattern      = require 'geopattern'

module.exports = class TeamLoginTab extends KDTabPaneView

  JView.mixin @prototype

  constructor:(options = {}, data)->

    options.name = 'login'

    super options, data

    { mainController } = KD.singletons

    @header = new MainHeaderView
      cssClass : 'team'
      navItems : [
        { title : 'Blog',        href : 'http://blog.koding.com',   name : 'blog' }
        { title : 'Features',    href : '/Features',                name : 'features' }
      ]

    @logo = new KDCustomHTMLView tagName : 'figure'

    { group } = KD.config
    if group.customize.logo
      @logo.setCss 'background-image', "url(#{group.customize.logo})"
      @logo.setCss 'background-size', 'cover'
    else
      pattern = geoPattern.generate(group.slug, generator: 'plusSigns').toDataUrl()
      @logo.setCss 'background-image', pattern
      @logo.setCss 'background-size', 'inherit'


    # keep the prop name @form it is used in AppView to focus to the form if there is any - SY
    @form = new LoginInlineForm
      cssClass : 'login-form clearfix'<commit_msg>teams: login: protective check for gorup.customize prop<commit_after>JView           = require './../../core/jview'
CustomLinkView  = require './../../core/customlinkview'
MainHeaderView  = require './../../core/mainheaderview'
LoginInlineForm = require './../../login/loginform'
geoPattern      = require 'geopattern'

module.exports = class TeamLoginTab extends KDTabPaneView

  JView.mixin @prototype

  constructor:(options = {}, data)->

    options.name = 'login'

    super options, data

    { mainController } = KD.singletons

    @header = new MainHeaderView
      cssClass : 'team'
      navItems : [
        { title : 'Blog',        href : 'http://blog.koding.com',   name : 'blog' }
        { title : 'Features',    href : '/Features',                name : 'features' }
      ]

    @logo = new KDCustomHTMLView tagName : 'figure'

    { group } = KD.config
    if group.customize?.logo
      @logo.setCss 'background-image', "url(#{group.customize.logo})"
      @logo.setCss 'background-size', 'cover'
    else
      pattern = geoPattern.generate(group.slug, generator: 'plusSigns').toDataUrl()
      @logo.setCss 'background-image', pattern
      @logo.setCss 'background-size', 'inherit'


    # keep the prop name @form it is used in AppView to focus to the form if there is any - SY
    @form = new LoginInlineForm
      cssClass : 'login-form clearfix'
{'fraction_non_alphanumeric': 0.13846723435764532, 'fraction_numerical': 0.0, 'mean_word_length': 2.6122994652406417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3834377', 'n_tokens_mistral': 831, 'n_tokens_neox': 799, 'n_words': 207}