mirror of https://github.com/nextcloud/contacts
Regex pattern with notification
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
1b744656d5
commit
4729f93701
|
@ -7,11 +7,8 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
ul.addressBookList > li {
|
||||
padding: 6px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
.addressBookList form input.ng-invalid-pattern {
|
||||
border-color: $color-error !important;
|
||||
}
|
||||
|
||||
ul.addressBookList > li {
|
||||
|
|
|
@ -4,6 +4,7 @@ angular.module('contactsApp')
|
|||
|
||||
ctrl.loading = true;
|
||||
ctrl.openedMenu = false;
|
||||
ctrl.addressBookRegex = /^[a-zA-Z0-9À-ÿ\s-_.!?#|()]+$/i;
|
||||
|
||||
AddressBookService.getAll().then(function(addressBooks) {
|
||||
ctrl.addressBooks = addressBooks;
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
<ul class="addressBookList">
|
||||
<li ng-repeat="addressBook in ctrl.addressBooks" addressbook data="addressBook" list="ctrl.addressBooks"></li>
|
||||
<li>
|
||||
<form ng-submit="ctrl.createAddressBook()">
|
||||
<form ng-submit="ctrl.createAddressBook()" name="newAddressBookForm">
|
||||
<input id="newList" placeholder="{{ctrl.t.addressBookName}}" class="newAddressBookInput"
|
||||
ng-model="ctrl.newAddressBookName" type="text"
|
||||
autocomplete="off" autocorrect="off" spellcheck="false" />
|
||||
<input type="submit" value="" class="newAddressBookSubmit inline-button icon-confirm action pull-right" />
|
||||
autocomplete="off" autocorrect="off" spellcheck="false"
|
||||
required ng-pattern="ctrl.addressBookRegex" />
|
||||
<input type="submit" value="" class="newAddressBookSubmit inline-button icon-confirm action pull-right"
|
||||
ng-disabled="newAddressBookForm.$invalid || newAddressBookForm.$pristine" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue