views/users/edit.pug (65 lines of code) (raw):

//- Copyright (c) 2017 Chandan B N. All rights reserved. extends ../layout block content div - var action = '/users/profile/'; if profile.username - action = action + profile.username; form.pad2.bor.shd.rnd(method='POST', action=action) input(type='hidden', name='_csrf', value=csrfToken) .row .cardtitle=title .row label.lbl.icn.owner Name: input.txt(name='name', type='text', value=profile.name) .row label.lbl.icn.Email Email: input.txt(name='email', type='text', value=profile.email) .row label.lbl.icn.owner Username: if admin input.txt(name='username', type='text',value=profile.username) else tt=profile.username .row label.lbl.icn Favorite Emoji: input.txt(name='emoji', type='text', value=profile.emoji) .row label.lbl.icn Password: input.txt(name='password', type='password', autocomplete="new-password") .row label.lbl.icn Confirm Password: input.txt(name='password2', type='password', autocomplete="new-password") .row label.lbl.icn.CNA CNA or group email: if admin input.txt(name='group', type='text',value=profile.group) else tt=profile.group .row label.lbl.icn Privilege: if admin select.form-control(name='priv') //option(value=2,selected=profile.priv==2) Read only option(value=1,selected=profile.priv==1) Read/Write option(value=0,selected=profile.priv==0) Admin else tt if profile.priv == 0 | Admin else if profile.priv == 1 | Read/Write else if profile.priv == 2 | Read only .row button.btn.sfe(type='submit', value='Save') Save .row div.center a.btn.icn.owner(href="/users/list") User list if admin | · a.btn.icn.add(href="/users/profile") Add user div.center if admin && profile.username a.sml.icn.rejected.tred(href="/users/delete/"+profile.username,onclick="return confirm('Delete this user?')") Delete = profile.username