gPwdEditWidth = max_char_width() * 12;

fLHSTextWidth = max(
	zstring_width( zstring: '$$$/Dialogs/Authenticate/Name' ),
	zstring_width( zstring: '$$$/Dialogs/Authenticate/Password' ) );


dialog(name: '$$$/Dialogs/Authenticate', target_id: 'cpwd', first_tab:'cpwd')
{
	view(align_children: align_left, alignment: align_fill)
	{
		static_text( item_id: 'Note', alignment: align_fill, name: '$$$/Dialogs/Authenticate/Note');

		gap( height: 8 );

        view(alignment: align_fill, align_children: align_row)
        {		
			static_text( name: '$$$/Dialogs/Authenticate/Name', alignment: align_right, width: fLHSTextWidth );
			edit_text( item_id: 'Name', readonly: true, width: max_char_width() * 20, multiline: false );
			button( item_id: 'Show', name: '$$$/Dialogs/Authenticate/Details' );
		}
		
		gap( height: 8 );
		
		view(alignment: align_fill, align_children: align_row)
		{
		    static_text( name: '$$$/Dialogs/Authenticate/Password', alignment: align_right, width: fLHSTextWidth );
		    edit_text(item_id: 'cpwd', password: true, width: gPwdEditWidth );
		}
		gap( height: 8 );
		
        ok_cancel();
	}
}
