<che-popup title="{{editRegistryController.originRegistryUrl ? 'Edit' : 'Add'}} registry" on-close="editRegistryController.hide()">
  <ng-form name="editRegistryForm" class="edit-registry-form">
    <div class="form-input-fields">
      <che-input type="text"
                 che-form="editRegistryForm"
                 che-name="address"
                 che-label-name="Address"
                 che-place-holder="registry"
                 ng-model="editRegistryController.registry.url"
                 required
                 ng-maxlength="128">
        <div ng-message="required">Registry is required.</div>
        <div ng-message="maxlength">Registry should be less than 128 characters long.</div>
      </che-input>
      <che-input che-form="editRegistryForm"
                 che-name="username"
                 che-label-name="Username"
                 che-place-holder="username"
                 ng-model="editRegistryController.registry.username"
                 ng-maxlength="128">
        <div ng-message="maxlength">Username should be less than 128 characters long.</div>
      </che-input>
      <che-input che-form="editRegistryForm"
                 che-name="password"
                 che-label-name="Password"
                 che-place-holder="password"
                 ng-maxlength="128"
                 type="password"
                 required
                 ng-model="editRegistryController.registry.password">
        <div ng-message="required">User Password is required.</div>
        <div ng-message="maxlength">User Password should be less than 128 characters long.</div>
      </che-input>
    </div>
    <che-button-notice che-button-title="Close"
                       ng-click="editRegistryController.hide()">
    </che-button-notice>
    <che-button-primary che-button-title="{{editRegistryController.originRegistryUrl ? 'Edit' : 'Add'}}"
                        ng-click="editRegistryController.update()"
                        ng-disabled="editRegistryForm.$invalid">
    </che-button-primary>
  </ng-form>
</che-popup>
