window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	'Password Setup'
		leftKanjiFont	$(kanjiFont)
		leftFont	$(kanaFont)
		switch $(COLOR)
			case MONO:
				bitmapPath	$(bitmaps)
				backgroundFile	GRAY3
				transparent	false
				break
		endswitch
	endres:
endtitle:
dialog: dialogs
	res:
		defaultDistance		#(fWidth)
		dialogType		modeless
		defaultButton		select
	endres:
	ditem: msg
		res:
			itemType	bitmap
			label		'This host is NIS slave server.'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			autoAdjust	true
		endres:
	endditem:
	ditem: yp-00
		res:
			itemType	radio
			fromVert	msg
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		'Set NIS password.'
			shadowWidth	0
			switch $(COLOR)
				case MONO:
					background	white
					foreground	black
					highlightBack	white
					highlightFore	black
					selectedBack	white
					selectedFore	black
					break
				default:
					background	#c5c5c5
					highlightBack	#c5c5c5
					selectedBack	#c5c5c5
					break
			endswitch
		endres:
		act:
			put $(value)
			switch #(value)
				case 1:
					put 1 $(PASSWD_TYPE)
			endswitch
		endact:
	endditem:
	ditem: local-00
		res:
			itemType	radio
			fromVert	yp-00
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		'Set local password.'
			shadowWidth	0
			switch $(COLOR)
				case MONO:
					background	white
					foreground	black
					highlightBack	white
					highlightFore	black
					selectedBack	white
					selectedFore	black
					break
				default:
					background	#c5c5c5
					highlightBack	#c5c5c5
					selectedBack	#c5c5c5
					break
			endswitch
		endres:
		act:
			put $(value)
			switch #(value)
				case 1:
					put 2 $(PASSWD_TYPE)
			endswitch
		endact:
	endditem:
	ditem: set
		res:
			itemType	button
			fromVert	msg
			fromHoriz	local-00
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)*2
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		' Set '
		endres:
		act:
			$(passwd) = next $(menu)/passwd ++48++48
			quit
		endact:
	endditem:
	ditem: cancel
		res:
			itemType	button
			fromVert	set
			fromHoriz	local-00
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			label		Cancel
		endres:
		act:
			close
		endact:
	endditem:
enddialog:
proc: pre
	put $(menuPath)/Passwd $(menu)
	put $(icons) $(okPath)
	put Passwd $(okFile)
	put 'Password Setup' $(cmdName)
	global $(PASSWD_TYPE)
	put 0 $(PASSWD_TYPE)
endproc:
proc: open
	switch $(YP)
		case server:
			setval msg label 'This host is NIS slave server.'
			break
		case client:
			setval msg label 'This host is NIS client.'
			break
	endswitch
endproc:
proc: close
	local $(PASSWD_TYPE)
	close
endproc:
proc: open
	setval yp-00 selected true
	setval local-00 selected false
endproc:
