Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.79 KB | None | 0 0
  1. {**
  2. * templates/common/userDetails.tpl
  3. *
  4. * Copyright (c) 2014-2017 Simon Fraser University
  5. * Copyright (c) 2003-2017 John Willinsky
  6. * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
  7. *
  8. * Common user details form.
  9. *
  10. * Parameters:
  11. * $disableUserNameSection: Disable UserName section
  12. * $disableEmailSection: Disable Email section
  13. * $disableAuthSourceSection: Disable Auth section
  14. * $disablePasswordSection: Disable Password section
  15. * $disableSendNotifySection: Disable SendNotify section
  16. * $disableGenderSection: Disable Gender section
  17. * $disableSalutationSection: Disable Salutation section
  18. * $disableInitialsSection: Disable Initials section
  19. * $disablePhoneSection: Disable Phone section
  20. * $disableLocaleSection: Disable Locale section
  21. * $disableInterestsSection: Disable Interests section
  22. * $disableMailingSection: Disable Mailing section
  23. * $disableSignatureSection: Disable Signature section
  24. *
  25. * $countryRequired: Whether or not the country select is a required field
  26. * $extraContentSectionUnfolded: Whether or not the extra content section is unfolded by default
  27. *}
  28.  
  29. {fbvFormArea id="userDetails"}
  30. {fbvFormSection title="user.name"}
  31. {fbvElement type="text" label="user.firstName" required="true" id="firstName" value=$firstName maxlength="40" inline=true size=$fbvStyles.size.SMALL}
  32. {fbvElement type="text" label="user.middleName" id="middleName" value=$middleName maxlength="40" inline=true size=$fbvStyles.size.SMALL}
  33. {fbvElement type="text" label="user.lastName" required="true" id="lastName" value=$lastName maxlength="40" inline=true size=$fbvStyles.size.SMALL}
  34. {/fbvFormSection}
  35.  
  36. {if !$disableUserNameSection}
  37. {if !$userId}{capture assign="usernameInstruction"}{translate key="user.register.usernameRestriction"}{/capture}{/if}
  38. {fbvFormSection for="username" description=$usernameInstruction translate=false}
  39. {if !$userId}
  40. {fbvElement type="text" label="user.username" id="username" required="true" value=$username maxlength="32" inline=true size=$fbvStyles.size.MEDIUM}
  41. {fbvElement type="button" label="common.suggest" id="suggestUsernameButton" inline=true class="default"}
  42. {else}
  43. {fbvFormSection title="user.username" suppressId="true"}
  44. {$username|escape}
  45. {/fbvFormSection}
  46. {/if}
  47. {/fbvFormSection}
  48. {/if}
  49.  
  50. {if !$disableEmailSection}
  51. {fbvFormSection title="about.contact"}
  52. {fbvElement type="text" label="user.email" id="email" required="true" value=$email maxlength="90" size=$fbvStyles.size.MEDIUM}
  53. {/fbvFormSection}
  54. {/if}
  55.  
  56. {if !$disableAuthSourceSection}
  57. {fbvFormSection title="grid.user.authSource" for="authId"}
  58. {fbvElement type="select" name="authId" id="authId" defaultLabel="" defaultValue="" from=$authSourceOptions translate="true" selected=$authId}
  59. {/fbvFormSection}
  60. {/if}
  61.  
  62. {if !$disablePasswordSection}
  63. {if $userId}{capture assign="passwordInstruction"}{translate key="user.profile.leavePasswordBlank"} {translate key="user.register.form.passwordLengthRestriction" length=$minPasswordLength}{/capture}{/if}
  64. {fbvFormArea id="passwordSection" title="user.password"}
  65. {fbvFormSection for="password" description=$passwordInstruction translate=false}
  66. {fbvElement type="text" label="user.password" required=$passwordRequired name="password" id="password" password="true" value=$password maxlength="32" inline=true size=$fbvStyles.size.MEDIUM}
  67. {fbvElement type="text" label="user.repeatPassword" required=$passwordRequired name="password2" id="password2" password="true" value=$password2 maxlength="32" inline=true size=$fbvStyles.size.MEDIUM}
  68. {/fbvFormSection}
  69.  
  70. {if !$userId}
  71. {fbvFormSection title="grid.user.generatePassword" for="generatePassword" list=true}
  72. {if $generatePassword}
  73. {assign var="checked" value=true}
  74. {else}
  75. {assign var="checked" value=false}
  76. {/if}
  77. {fbvElement type="checkbox" name="generatePassword" id="generatePassword" checked=$checked label="grid.user.generatePasswordDescription" translate="true"}
  78. {/fbvFormSection}
  79. {/if}
  80. {fbvFormSection title="grid.user.mustChangePassword" for="mustChangePassword" list=true}
  81. {if $mustChangePassword}
  82. {assign var="checked" value=true}
  83. {else}
  84. {assign var="checked" value=false}
  85. {/if}
  86. {fbvElement type="checkbox" name="mustChangePassword" id="mustChangePassword" checked=$checked label="grid.user.mustChangePasswordDescription" translate="true"}
  87. {/fbvFormSection}
  88. {/fbvFormArea}
  89. {/if}
  90.  
  91. {if $countryRequired}
  92. {assign var="countryRequired" value=true}
  93. {else}
  94. {assign var="countryRequired" value=false}
  95. {/if}
  96. {fbvFormSection for="country" title="common.country"}
  97. {fbvElement type="select" label="common.country" name="country" id="country" required=$countryRequired defaultLabel="" defaultValue="" from=$countries selected=$country translate="0" size=$fbvStyles.size.MEDIUM}
  98. {/fbvFormSection}
  99.  
  100. {if !$disableSendNotifySection}
  101. {fbvFormSection title="grid.user.notifyUser" for="sendNotify" list=true}
  102. {if $sendNotify}
  103. {assign var="checked" value=true}
  104. {else}
  105. {assign var="checked" value=false}
  106. {/if}
  107. {fbvElement type="checkbox" name="sendNotify" id="sendNotify" checked=$checked label="grid.user.notifyUserDescription" translate="true"}
  108. {/fbvFormSection}
  109. {/if}
  110. {/fbvFormArea}
  111. {call_hook name="Common::UserDetails::AdditionalItems"}
  112. {capture assign="extraContent"}
  113. {fbvFormArea id="userFormExtendedLeft"}
  114. {fbvFormSection}
  115. {if !$disableGenderSection}
  116. {fbvElement type="select" label="user.gender" name="gender" id="gender" defaultLabel="" defaultValue="" from=$genderOptions translate="true" selected=$gender inline=true size=$fbvStyles.size.SMALL}
  117. {/if}
  118. {if !$disableSalutationSection}
  119. {fbvElement type="text" label="user.salutation" name="salutation" id="salutation" value=$salutation maxlength="40" inline=true size=$fbvStyles.size.SMALL}
  120. {/if}
  121. {fbvElement type="text" label="user.suffix" id="suffix" value=$suffix size=$fbvStyles.size.SMALL inline=true}
  122. {if !$disableInitialsSection}
  123. {fbvElement type="text" label="user.initials" name="initials" id="initials" value=$initials maxlength="5" inline=true size=$fbvStyles.size.SMALL}
  124. {/if}
  125. {/fbvFormSection}
  126.  
  127. {fbvFormSection}
  128. {fbvElement type="text" label="user.url" name="userUrl" id="userUrl" value=$userUrl maxlength="255" inline=true size=$fbvStyles.size.SMALL}
  129. {if !$disablePhoneSection}
  130. {fbvElement type="text" label="user.phone" name="phone" id="phone" value=$phone maxlength="24" inline=true size=$fbvStyles.size.SMALL}
  131. {/if}
  132. {fbvElement type="text" label="user.orcid" name="orcid" id="orcid" value=$orcid maxlength="36" inline=true size=$fbvStyles.size.SMALL}
  133. {/fbvFormSection}
  134.  
  135. {if !$disableLocaleSection && count($availableLocales) > 1}
  136. {fbvFormSection title="user.workingLanguages" list=true}
  137. {foreach from=$availableLocales key=localeKey item=localeName}
  138. {if $userLocales && in_array($localeKey, $userLocales)}
  139. {assign var="checked" value=true}
  140. {else}
  141. {assign var="checked" value=false}
  142. {/if}
  143. {fbvElement type="checkbox" name="userLocales[]" id="userLocales-$localeKey" value=$localeKey checked=$checked label=$localeName translate=false}
  144. {/foreach}
  145. {/fbvFormSection}
  146. {/if}
  147.  
  148. {if !$disableInterestsSection}
  149. {fbvFormSection for="interests"}
  150. {fbvElement type="interests" id="interests" interests=$interests label="user.interests"}
  151. {/fbvFormSection}
  152. {/if}
  153.  
  154. {fbvFormSection for="affiliation"}
  155. {fbvElement type="text" label="user.affiliation" multilingual="true" name="affiliation" required=$affiliationRequired maxlength="255" id="affiliation" value=$affiliation inline=true size=$fbvStyles.size.LARGE}
  156. {/fbvFormSection}
  157.  
  158. {fbvFormSection}
  159. {fbvElement type="textarea" label="user.biography" multilingual="true" name="biography" id="biography" rich=true value=$biography}
  160. {/fbvFormSection}
  161.  
  162. {if !$disableMailingSection}
  163. {fbvFormSection}
  164. {fbvElement type="textarea" label="common.mailingAddress" name="mailingAddress" id="mailingAddress" rich=true value=$mailingAddress}
  165. {/fbvFormSection}
  166. {/if}
  167.  
  168. {if !$disableSignatureSection}
  169. {fbvFormSection}
  170. {fbvElement type="textarea" label="user.signature" multilingual="true" name="signature" id="signature" value=$signature rich=true}
  171. {/fbvFormSection}
  172. {/if}
  173. {/fbvFormArea}
  174. {/capture}
  175.  
  176. {if $extraContentSectionUnfolded}
  177. {fbvFormSection title="grid.user.userDetails"}
  178. {$extraContent}
  179. {/fbvFormSection}
  180. {else}
  181. <div id="userExtraFormFields" class="left full">
  182. {include file="controllers/extrasOnDemand.tpl"
  183. id="userExtras"
  184. widgetWrapper="#userExtraFormFields"
  185. moreDetailsText="grid.user.moreDetails"
  186. lessDetailsText="grid.user.lessDetails"
  187. extraContent=$extraContent
  188. }
  189. </div>
  190. {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement