Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[139394.1.114481841]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    
    //to check for duplication during copy, oldshiftpattern needs to be null
    oldshiftpattern := null(  ShiftPattern );
    if( not DataHolderIsCopy.Data() )
    {
      oldshiftpattern := guard( DataHolderDialogData.Data().WrappedInstance(), null( ShiftPattern ) )
    }
    return ShiftPattern::ValidateInput( feedback,
                                        sanitycheckfeedback,
                                        MacroPlan,
                                        EditFieldName.Text(),
                                        guard ( DataHolderDialogData.Data().NumberOfDays(), Number::MinNumber() ),
                                        oldshiftpattern,
                                        true /*checkunique*/ );
  *]
  QuillAction
  {
    Body:
    [*
      // On ok
      Form.OnOK();
    *]
    GroupServerCalls: false
  }
}
