<form name="form" novalidate ng-submit="form.$valid && ctrl.submit()">
  <!-- TODO properly style the error message here-->
  <div class="message" ng-show="!!ctrl.error">
	<span class="icon icon-20">
	  Vabandame, postituse teksti laadimine ebaõnnestus.
	</span>
  </div>
  <p>
  <textarea name="message" required
    ng-model="ctrl.post.message_template"
    ng-disabled="ctrl.error || ctrl.submitPending">
  <!-- TODO style the textarea when disabled -->
  </textarea>
  </p>
  <p class="buttons">
    <a class="btn btn-secondary" href="javascript:undefined" ng-click="ctrl.cancelFunction()">
      Loobu
    </a>
    <input class="btn" type="submit" value="Salvesta">
  </p>
</form>

<form name="form" novalidate ng-submit="form.$valid && ctrl.submit()">
  <!-- TODO properly style the error message here-->
  <div class="message" ng-show="!!ctrl.error">
	<span class="icon icon-20">
	  Vabandame, postituse teksti laadimine ebaõnnestus.
	</span>
  </div>
  <p>
  <textarea name="message" required
    ng-model="ctrl.post.message_template"
    ng-disabled="ctrl.error || ctrl.submitPending">
  <!-- TODO style the textarea when disabled -->
  </textarea>
  </p>
  <p class="buttons">
    <a class="btn btn-secondary" href="javascript:undefined" ng-click="ctrl.cancelFunction()">
      Loobu
    </a>
    <input class="btn" type="submit" ng-disabled="ctrl.submitPending" value="Salvesta">
  </p>
</form>

Disable submit button while request pending
Disable submit button while request pending

I though of disabling it in case of errors as well, but this could
cause problems later on, when there are errors that depend on the user
input and can be therefore fixed by the user and need the submit button
to be enabled.
