##
## @package TYPO3
## @subpackage sr_feuser_register
## @version $Id: setup.txt 9353 2008-06-19 17:24:39Z franzholz $
##

plugin.tx_srfeuserregister_pi1 {

	table.name = {$plugin.tx_srfeuserregister_pi1.tableName}

	templateStyle = css-styled
	templateFile = {$plugin.tx_srfeuserregister_pi1.file.templateFile}
// Remember that the icon is in a fixed dimension and will not grow if the text is getting
// larger.
	icon_delete = {$plugin.tx_srfeuserregister_pi1.file.icon_delete}

	fe_userOwnSelf = 1
	fe_userEditSelf = 1
	delete = 1

	pid = {$plugin.tx_srfeuserregister_pi1.pid}
	pidTitleOverride = {$plugin.tx_srfeuserregister_pi1.pidTitleOverride}
	registerPID = {$plugin.tx_srfeuserregister_pi1.registerPID}
	editPID = {$plugin.tx_srfeuserregister_pi1.editPID}
	confirmPID = {$plugin.tx_srfeuserregister_pi1.confirmPID}
	confirmInvitationPID = {$plugin.tx_srfeuserregister_pi1.confirmInvitationPID}
	confirmType = {$plugin.tx_srfeuserregister_pi1.confirmType}
	loginPID = {$plugin.tx_srfeuserregister_pi1.loginPID}
	linkToPID = {$plugin.tx_srfeuserregister_pi1.linkToPID}
	linkToPIDAddButton = {$plugin.tx_srfeuserregister_pi1.linkToPIDAddButton}
	module_sys_dmail_category_PIDLIST = {$plugin.tx_srfeuserregister_pi1.module_sys_dmail_category_PIDLIST}
	defaultCODE = {$plugin.tx_srfeuserregister_pi1.defaultCODE}

	useShortUrls = {$plugin.tx_srfeuserregister_pi1.useShortUrls}
	shortUrlLife = {$plugin.tx_srfeuserregister_pi1.shortUrlLife}
	dateFormat = {$plugin.tx_srfeuserregister_pi1.dateFormat}
	dateSplit = {$plugin.tx_srfeuserregister_pi1.dateSplit}

	onChangeCountryAttribute = {$plugin.tx_srfeuserregister_pi1.onChangeCountryAttribute}

	allowMultipleUserGroupSelection = {$plugin.tx_srfeuserregister_pi1.allowMultipleUserGroupSelection}
	useMd5Password = {$plugin.tx_srfeuserregister_pi1.useMd5Password}
	salutation = {$plugin.tx_srfeuserregister_pi1.salutation}

	# you may modify here the conditions under which an attachment file will be added to the email
	addAttachment =  {$plugin.tx_srfeuserregister_pi1.enableEmailAttachment}
	addAttachment.cmd = setfixed
	addAttachment.sFK = APPROVE
	addAttachment.file = {$plugin.tx_srfeuserregister_pi1.file.attachmentFile}

	create = 1
	create {
		preview = {$plugin.tx_srfeuserregister_pi1.enablePreviewRegister}
		fields = {$plugin.tx_srfeuserregister_pi1.formFields}
		required = {$plugin.tx_srfeuserregister_pi1.requiredFields}
		useEmailAsUsername = {$plugin.tx_srfeuserregister_pi1.useEmailAsUsername}
		generateUsername = {$plugin.tx_srfeuserregister_pi1.generateUsername}
		generatePassword = {$plugin.tx_srfeuserregister_pi1.generatePassword}
		allowUserGroupSelection = {$plugin.tx_srfeuserregister_pi1.allowUserGroupSelection}
		
		defaultValues {
			module_sys_dmail_html = {$plugin.tx_srfeuserregister_pi1.dmailCheckedUponRegistration}
			usergroup = {$plugin.tx_srfeuserregister_pi1.userGroupUponRegistration}
			disable = {$plugin.tx_srfeuserregister_pi1.enableEmailConfirmation}
			by_invitation =
		}

		overrideValues {
			usergroup = {$plugin.tx_srfeuserregister_pi1.userGroupUponRegistration}
			disable = {$plugin.tx_srfeuserregister_pi1.enableEmailConfirmation}
			by_invitation =
		}

		evalValues {
			password = twice, atLeast[{$plugin.tx_srfeuserregister_pi1.passwordAtLeast}], atMost[{$plugin.tx_srfeuserregister_pi1.passwordAtMost}]
			username = uniqueLocal, atLeast[{$plugin.tx_srfeuserregister_pi1.usernameAtLeast}], atMost[{$plugin.tx_srfeuserregister_pi1.usernameAtMost}]
			email = email,atMost[255],uniqueLocal
			##email = email,atMost[255]
			gender = 
			name = atMost[{$plugin.tx_srfeuserregister_pi1.nameAtMost}]
			first_name = atMost[50]
			last_name = atMost[50]
			date_of_birth = date
			company = atMost[50]
			city = atMost[40]
			zip = atMost[20]
			telephone = atMost[25]
			fax = atMost[25]
			image = upload[{$plugin.tx_srfeuserregister_pi1.maxImages}]
			title =
			address =
			www = wwwURL
			comments =
			status =
			module_sys_dmail_category =
			module_sys_dmail_html =
			usergroup =
			by_invitation =
			captcha_response =
		}
	}

	select {
		email {
			module_sys_dmail_category.wrap = | <br/>
		}
	}

	setfixed = 0
	setfixed.APPROVE {
		_FIELDLIST = uid,pid,usergroup
		usergroup = {$plugin.tx_srfeuserregister_pi1.userGroupAfterConfirmation}
		disable = {$plugin.tx_srfeuserregister_pi1.enableAdminReview}
	}
	setfixed.DELETE {
		_FIELDLIST = uid,pid
	}
	setfixed.ACCEPT {
		_FIELDLIST = uid,pid,usergroup
		usergroup = {$plugin.tx_srfeuserregister_pi1.userGroupAfterAcceptation}
		disable = 0
	}
	setfixed.REFUSE < .setfixed.DELETE
	setfixed.ENTER < .setfixed.ACCEPT

	enableEmailConfirmation = {$plugin.tx_srfeuserregister_pi1.enableEmailConfirmation}
	enableAutoLoginOnConfirmation = {$plugin.tx_srfeuserregister_pi1.enableAutoLoginOnConfirmation}
	enableAutoLoginOnCreate = {$plugin.tx_srfeuserregister_pi1.enableAutoLoginOnCreate}
	enableAdminReview = {$plugin.tx_srfeuserregister_pi1.enableAdminReview}
	autoLoginRedirect_url = {$plugin.tx_srfeuserregister_pi1.autoLoginRedirect_url}

	authcodeFields = {$plugin.tx_srfeuserregister_pi1.authcodeFields}
	authcodeFields.codeLength = {$plugin.tx_srfeuserregister_pi1.codeLength}

	invite < .create
	invite {
		defaultValues {
			by_invitation = 1
		}
		overrideValues {
			by_invitation = 1
		}
	}

	edit < .create
	edit {
		preview = {$plugin.tx_srfeuserregister_pi1.enablePreviewEdit}
		allowUserGroupSelection = {$plugin.tx_srfeuserregister_pi1.allowUserGroupUpdate}

		defaultValues {
			disable = 0
			usergroup >
			module_sys_dmail_html >
			module_sys_dmail_category >
			by_invitation >
		}

		overrideValues {
			username = 
			usergroup >
			disable = 0
			by_invitation >
		}

		evalValues {
			username = unsetEmpty
			usergroup = unsetEmpty
		}
	}

	infomail = 0

	forceFileDelete = {$plugin.tx_srfeuserregister_pi1.forceFileDelete}

	parseValues {
		username = nospace,trim
		email = lower,nospace,trim
		password = trim,nospace
		name = trim
		first_name = trim
		last_name = trim
		date_of_birth = date
		title = trim
		company = trim
		city = trim
		zip = trim
		image = files
		module_sys_dmail_html = setEmptyIfAbsent
		module_sys_dmail_category = multiple
		www = wwwURL
		usergroup = multiple
	}

	parseFromDBValues {
		date_of_birth = adodb_date
	}
	parseToDBValues {
		date_of_birth = adodb_date
	}

	email.from = {$plugin.tx_srfeuserregister_pi1.email}
	email.fromName = {$plugin.tx_srfeuserregister_pi1.siteName}
	email.admin = {$plugin.tx_srfeuserregister_pi1.email}
	email.field = email
	email.HTMLMail = {$plugin.tx_srfeuserregister_pi1.enableHTMLMail}
	email.HTMLMailCSS = {$plugin.tx_srfeuserregister_pi1.HTMLMailCSS}
	email.CREATE_SAVED = {$plugin.tx_srfeuserregister_pi1.enableEmailOnRegister}
	email.EDIT_SAVED = {$plugin.tx_srfeuserregister_pi1.enableEmailOnUpdate}
	email.DELETE_SAVED = {$plugin.tx_srfeuserregister_pi1.enableEmailOnDelete}
	email.SETFIXED_APPROVE = {$plugin.tx_srfeuserregister_pi1.enableEmailOnApprove}
	email.SETFIXED_APPROVE_REVIEW = {$plugin.tx_srfeuserregister_pi1.enableEmailOnApprove}
	email.SETFIXED_DELETE = {$plugin.tx_srfeuserregister_pi1.enableEmailOnRefuse}
	email.SETFIXED_ACCEPT = 1
	email.SETFIXED_REFUSE = 1

	notify.CREATE_SAVED = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnRegister}
	notify.EDIT_SAVED = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnUpdate}
	notify.DELETE_SAVED = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnDelete}
	notify.SETFIXED_CREATE = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyConfirmation}
	notify.SETFIXED_CREATE_REVIEW = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyConfirmation}
	notify.SETFIXED_INVITE = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyConfirmation}
	notify.SETFIXED_APPROVE = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnApprove}
	notify.SETFIXED_APPROVE_REVIEW = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnApprove}
	notify.SETFIXED_DELETE = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnRefuse}
	notify.SETFIXED_ACCEPT = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnAdminAccept}
	notify.SETFIXED_REFUSE = {$plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnAdminRefuse}

	_CSS_DEFAULT_STYLE (
		.tx-srfeuserregister-pi1 p { margin-top: .5em; margin-bottom: 0; padding: 0 .3em; text-indent: 0; }
		.tx-srfeuserregister-pi1 h4 { margin-top: 0; padding-left: .3em; }
		.tx-srfeuserregister-pi1 legend { padding: 0 .5em; font-weight: bold; }
		.tx-srfeuserregister-pi1 .tx-srfeuserregister-pi1-notice { font-style: italic; margin-bottom: 1em; }
		.tx-srfeuserregister-pi1 .tx-srfeuserregister-pi1-trash { margin-bottom: 2em; }
		.tx-srfeuserregister-pi1 a { padding-left: 14px; background-image: url("../typo3conf/ext/sr_feuser_register/pi1/internal_link.gif"); background-repeat: no-repeat; background-position: 0% 60%; text-decoration:none; }
		.tx-srfeuserregister-pi1 label { margin: 0; padding: 0; }
		.tx-srfeuserregister-pi1 label span { color: #ff0000; }
		.tx-srfeuserregister-pi1 .tx-srfeuserregister-pi1-error { color: #ff0000; }
		.tx-srfeuserregister-pi1 input { margin: 0; padding: 0 .5em 0 0; }
		.tx-srfeuserregister-pi1 input[type=password] { margin-right: 1em; }
		* html .tx-srfeuserregister-pi1 input.tx-srfeuserregister-pi1-password { margin-right: 1em; }
		.tx-srfeuserregister-pi1 input[type=radio], .tx-srfeuserregister-pi1 input[type=checkbox] { background-color: transparent; }
		* html .tx-srfeuserregister-pi1 input.tx-srfeuserregister-pi1-radio, * html .tx-srfeuserregister-pi1 input.tx-srfeuserregister-pi1-checkbox { background-color: transparent; }		
		.tx-srfeuserregister-pi1 .tx-srfeuserregister-pi1-delete-icon { margin-left: 1em; background-color: transparent; }
		.tx-srfeuserregister-pi1 .tx-srfeuserregister-pi1-delete-icon:hover { cursor: pointer; }
		.tx-srfeuserregister-pi1 a.tx-srfeuserregister-pi1-file-view { padding-left: 15px; background-image: url("../typo3conf/ext/sr_feuser_register/pi1/internal_link_new_window.gif"); background-color: transparent; background-repeat: no-repeat; font-size: .8em; margin-left: 1em; }
		.tx-srfeuserregister-pi1 ul { margin: 0; padding: 0; list-style-position: inside; }
		.tx-srfeuserregister-pi1 ul.tx-srfeuserregister-multiple-checkboxes { list-style-type: none; }
		.tx-srfeuserregister-pi1 ul.tx-srfeuserregister-multiple-checkboxes li { margin: 0 0 .3em 0; padding: 0; }
		.tx-srfeuserregister-pi1 ul.tx-srfeuserregister-multiple-checkboxes li label { margin: 0; padding: 0 0 0 .5em; }
		.tx-srfeuserregister-pi1 ul.tx-srfeuserregister-multiple-checked-values li { float: left; padding: 0 2em 0 0; margin: 0; }
		.tx-srfeuserregister-pi1 dl { margin: 0; padding: 1em 0 0 0; }
		.tx-srfeuserregister-pi1 dt, .tx-srfeuserregister-pi1 dd { margin: 0; padding: 0 0 .5em 0; float: left; }
		.tx-srfeuserregister-pi1 dt { clear: both; width: 25%; text-align: right; padding-right: 1em; }
		.tx-srfeuserregister-pi1 dd { text-align: left; width: 50%; }
		.tx-srfeuserregister-pi1 .tx-srfeuserregister-pi1-multiple-checkboxes dt { width: auto; padding-right: 0; }
		.tx-srfeuserregister-pi1 .tx-srfeuserregister-pi1-multiple-checkboxes dd { width: auto; }
		* html .tx-srfeuserregister-pi1 dd { float: none; }
		.tx-srfeuserregister-pi1 dd p { margin-top: 0; margin-bottom: .5em; padding: 0; }
		.tx-srfeuserregister-pi1 dd label { padding: 0 1em 0 .5em; }
	)

	_DEFAULT_PI_VARS {
	}
}
