accountant-ui/src/accounts/account.form.tmpl.html

51 lines
2.3 KiB
HTML
Raw Normal View History

2016-10-15 13:03:28 +02:00
<!-- vim: set tw=80 ts=2 sw=2 sts=2: -->
2016-05-24 08:56:32 +02:00
<!--
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Accountant is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
-->
2017-06-10 18:04:46 +02:00
<form class="form-horizontal" ng-submit="submitForm()" name="form" novalidate>
2016-07-15 16:40:39 +02:00
<div class="form-group" ng-class="{ 'has-error' : form.name.$invalid && !form.name.$pristine }">
2016-05-22 21:47:33 +02:00
<label class="col-sm-4 control-label" for="name">Account name</label>
<div class="col-sm-8">
2016-07-15 16:40:39 +02:00
<input class="form-control" id="name" name="name"
ng-model="data.name"
type="text" placeholder="Account name"
2017-06-10 18:04:46 +02:00
required />
2016-07-15 16:40:39 +02:00
<div class="help-block" ng-messages="form.name.$error" ng-if="form.name.$invalid">
<p ng-message="required">The account name is required.</p>
</div>
2016-05-22 21:47:33 +02:00
</div>
</div>
2016-07-15 16:40:39 +02:00
<div class="form-group" ng-class="{ 'has-error' : form.authorized_overdraft.$invalid && !form.authorized_overdraft.$pristine }">
2016-05-22 21:47:33 +02:00
<label class="col-sm-4 control-label" for="authorized-overdraft">Authorized overdraft</label>
<div class="col-sm-8">
2016-07-15 16:40:39 +02:00
<div class="input-group">
<div class="input-group-addon">-</div>
<input class="form-control" id="authorized-overdraft"
name="authorized_overdraft"
ng-model="data.authorized_overdraft"
2016-07-15 16:50:05 +02:00
type="number" placeholder="Authorized overdraft"
2017-06-10 18:04:46 +02:00
required min="0"/>
2016-07-15 16:40:39 +02:00
<div class="input-group-addon">.00€</div>
</div>
<div class="help-block" ng-messages="form.authorized_overdraft.$error" ng-if="form.authorized_overdraft.$invalid">
<p ng-message="required">The authorized overdraft is required.</p>
<p ng-message="min">The authorized overdraft must be equal or greater than 0.</p>
</div>
2016-05-22 21:47:33 +02:00
</div>
</div>
</form>