Fixed profile edit page issue

This commit is contained in:
2017-10-28 11:11:07 +07:00
parent ffaec84ba9
commit 77358a9dac
5 changed files with 73 additions and 76 deletions

View File

@@ -57,28 +57,24 @@ var userProfile = {
user.current.new_password = value
})
}),
m('input.third#oPwd', {
type: 'password',
required: 'required',
style: userProfile.changePassword ?
'display: inline-block;'
: 'display: none;',
placeholder: 'Password Lama',
oninput: m.withAttr('value', function(value) {
user.current.old_password = value
userProfile.changePassword ? [
m('input.third#oPwd', {
type: 'password',
required: 'required',
placeholder: 'Password Lama',
oninput: m.withAttr('value', function(value) {
user.current.old_password = value
})
}),
m('input.third#rNPwd', {
type: 'password',
required: 'required',
placeholder: 'Ulang Password Baru',
oninput: m.withAttr('value', function(value) {
user.current.re_new_password = value
})
})
}),
m('input.third#rNPwd', {
type: 'password',
required: 'required',
style: userProfile.changePassword ?
'display: inline-block;'
: 'display: none;',
placeholder: 'Ulang Password Baru',
oninput: m.withAttr('value', function(value) {
user.current.re_new_password = value
})
})
] : null
])
]),
m('tr', [