<commit_before>import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-input/paper-input';
import '@polymer/paper-checkbox/paper-checkbox';
import '@polymer/iron-icons/communication-icons';
import '@unicef-polymer/etools-dialog/etools-dialog';

import '../../../../../layout/etools-form-element-wrapper';
import {gridLayoutStyles} from '../../../../../styles/grid-layout-styles';
import {SharedStyles} from '../../../../../styles/shared-styles';
import {requiredFieldStarredStyles} from '../../../../../styles/required-field-styles';
import {fireEvent} from '../../../../../utils/fire-custom-event';
import {property} from '@polymer/decorators';
import {StaffMember} from '../../../../../../models/partners.models';
import EtoolsDialog from '@unicef-polymer/etools-dialog/etools-dialog';
import EndpointsMixin from '../../../../../endpoints/endpoints-mixin';
import {parseRequestErrorsAndShowAsToastMsgs} from '../../../../../utils/ajax-errors-parser';
import {ValidatableField} from '../../../../../../typings/globals.types';

/**
 * @polymer
 * @customElement
 * @appliesMixin EndpointsMixin
 */
class AddEditStaffMembers extends (EndpointsMixin(PolymerElement)) {

  static get template() {
    // language=HTML
    return html`
      ${gridLayoutStyles} ${SharedStyles} ${requiredFieldStarredStyles}
      <style>
        paper-input {
          width: 100%;
        }

        .col:first-of-type {
          padding-right: 12px;
        }

        .col:not(:first-of-type) {
          padding-left: 12px;
        }
      </style>
      <etools-dialog id="staffMemberDialog" dialog-title="Partner Contact" size="md"
                     ok-btn-text="Save" keep-dialog-open spinner-Text="Saving..."
                     on-confirm-btn-clicked="_savePartnerContact">
        <div class="layout-horizontal row-padding-v flex-c">
          <div class="col col-6">
            <paper-input id="title" label="Position"
                         value="{{item.title}}"
                         placeholder="&#8212;"
                         maxlength="30"
                         required auto-validate
                         error-message="Position is required"></paper-input>
          </div>
          <div class="col col-6">
            <etools-form-element-wrapper no-placeholder>
              <paper-checkbox checked="{{item.active}}">
                Active Staff
              </paper-checkbox>
            </etools-form-element-wrapper>
          </div>
        </div><commit_msg>increased partner contact possition char limit to 100<commit_after>import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-input/paper-input';
import '@polymer/paper-checkbox/paper-checkbox';
import '@polymer/iron-icons/communication-icons';
import '@unicef-polymer/etools-dialog/etools-dialog';

import '../../../../../layout/etools-form-element-wrapper';
import {gridLayoutStyles} from '../../../../../styles/grid-layout-styles';
import {SharedStyles} from '../../../../../styles/shared-styles';
import {requiredFieldStarredStyles} from '../../../../../styles/required-field-styles';
import {fireEvent} from '../../../../../utils/fire-custom-event';
import {property} from '@polymer/decorators';
import {StaffMember} from '../../../../../../models/partners.models';
import EtoolsDialog from '@unicef-polymer/etools-dialog/etools-dialog';
import EndpointsMixin from '../../../../../endpoints/endpoints-mixin';
import {parseRequestErrorsAndShowAsToastMsgs} from '../../../../../utils/ajax-errors-parser';
import {ValidatableField} from '../../../../../../typings/globals.types';

/**
 * @polymer
 * @customElement
 * @appliesMixin EndpointsMixin
 */
class AddEditStaffMembers extends (EndpointsMixin(PolymerElement)) {

  static get template() {
    // language=HTML
    return html`
      ${gridLayoutStyles} ${SharedStyles} ${requiredFieldStarredStyles}
      <style>
        paper-input {
          width: 100%;
        }

        .col:first-of-type {
          padding-right: 12px;
        }

        .col:not(:first-of-type) {
          padding-left: 12px;
        }
      </style>
      <etools-dialog id="staffMemberDialog" dialog-title="Partner Contact" size="md"
                     ok-btn-text="Save" keep-dialog-open spinner-Text="Saving..."
                     on-confirm-btn-clicked="_savePartnerContact">
        <div class="layout-horizontal row-padding-v flex-c">
          <div class="col col-10">
            <paper-input id="title" label="Position"
                         value="{{item.title}}"
                         placeholder="&#8212;"
                         maxlength="100"
                         required auto-validate
                         error-message="Position is required"></paper-input>
          </div>
          <div class="col col-2">
            <etools-form-element-wrapper no-placeholder>
              <paper-checkbox checked="{{item.active}}">
                Active Staff
              </paper-checkbox>
            </etools-form-element-wrapper>
          </div>
        </div>
{'fraction_non_alphanumeric': 0.1796998420221169, 'fraction_numerical': 0.006911532385466035, 'mean_word_length': 2.1342821782178216, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '7325450', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1374, 'n_words': 254}