gEditWidth = max_char_width() * 22;

fLHSTextWidth = max(
	zstring_width( zstring: '$$$/Dialogs/EDCAuthenticate/Username' ),
	zstring_width( zstring: '$$$/Dialogs/EDCAuthenticate/Password' ) );

dialog(name: '$$$/Dialogs/EDCAuthenticate', target_id: 'name')
{
	view(align_children: align_left, alignment: align_fill)
	{
		view (align_children: align_row, alignment: align_fill) 
		{
			picture(item_id: 'lclg', width: 48, height: 48);
			view(align_children: align_left, alignment: align_fill)
			{
				static_text(item_id: 'trs1', alignment: align_fill, width: 310);
				view (align_children: align_row, alignment: align_fill) 
				{
					picture(item_id: 'lock', width: 16, height: 16);
					static_text(item_id: 'host', font_id: 5, alignment: align_fill);
				}
			}
			
		}
		
		static_text(item_id: 'trs2', alignment: align_fill);		
		
		static_text(item_id: 'Note', alignment: align_fill);
        view(align_children: align_left, alignment: align_left)
		{
			view(align_children: align_row, alignment: align_fill)
			{		
	            gap( width: 10);
				static_text(item_id: 'utxt', name: '$$$/Dialogs/EDCAuthenticate/Username', width: fLHSTextWidth);
			    edit_text(item_id: 'user', alignment: align_fill, width: gEditWidth  );	
			}
			view(align_children: align_row, alignment: align_fill)
			{
				gap( width: 10);
                static_text(item_id: 'ptxt', name: '$$$/Dialogs/EDCAuthenticate/Password', width: fLHSTextWidth);
                edit_text(item_id: 'pswd', password: true, alignment: align_fill, width: gEditWidth  );
			}
		}
        check_box(item_id: 'trck', name: '$$$/Dialogs/EDCPrivacyNotification/TrackingText' );
	    view (align_children: align_row, alignment: align_fill) 
	    {
             check_box(item_id: 'cbcn', name: '$$$/Dialogs/EDCAuthenticate/CachingConfirmed' );												
        }        
		gap(height: 4);
		view( align_children: align_row, alignment: align_fill)
		{
			button( item_id: 'Web ', name: '$$$/Dialogs/EDCAuthenticate/WebButton'); 
			gap( width:10 );       
			ok_cancel();
		}
	}
}
