original_string: protected function submitEditCountryState()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCountryState();
          } else if ($this->isPosted('save') && $this->validateEditCountryState()) {
              if (isset($this->data_state['state_id'])) {
                  $this->updateCountryState();
              } else {
                  $this->addCountryState();
              }
          }
      }
code: protected function submitEditCountryState()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCountryState();
          } else if ($this->isPosted('save') && $this->validateEditCountryState()) {
              if (isset($this->data_state['state_id'])) {
                  $this->updateCountryState();
              } else {
                  $this->addCountryState();
              }
          }
      }
code_tokens: protected function submitEditCountryState ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deleteCountryState ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditCountryState ( ) ) { if ( isset ( $ this -> data_state [ 'state_id' ] ) ) { $ this -> updateCountryState ( ) ; } else { $ this -> addCountryState ( ) ; } } }
docstring: Handles a submitted country state data
docstring_tokens: Handles a submitted country state data