changepasswordform.xsl 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. _ _ ____ _
  4. _| || |_/ ___| ___ _ __ _ __ ___ | |
  5. |_ .. _\___ \ / _ \ '_ \| '_ \ / _ \| |
  6. |_ _|___) | __/ |_) | |_) | (_) |_|
  7. |_||_| |____/ \___| .__/| .__/ \___/(_)
  8. |_| |_|
  9. Personal Social Web.
  10. Copyright (C) The #Seppo contributors. All rights reserved.
  11. This program is free software: you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation, either version 3 of the License, or
  14. (at your option) any later version.
  15. This program is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. GNU General Public License for more details.
  19. You should have received a copy of the GNU General Public License
  20. along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. http://www.w3.org/TR/xslt/
  22. -->
  23. <xsl:stylesheet
  24. xmlns="http://www.w3.org/1999/xhtml"
  25. xmlns:h="http://www.w3.org/1999/xhtml"
  26. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  27. version="1.0">
  28. <!-- replace linefeeds with <br> tags -->
  29. <xsl:template name="linefeed2br">
  30. <xsl:param name="string" select="''"/>
  31. <xsl:param name="pattern" select="'&#10;'"/>
  32. <xsl:choose>
  33. <xsl:when test="contains($string, $pattern)">
  34. <xsl:value-of select="substring-before($string, $pattern)"/><br class="br"/><xsl:comment>Why do we see 2 br on Safari and output/@method=html here? http://purl.mro.name/safari-xslt-br-bug</xsl:comment>
  35. <xsl:call-template name="linefeed2br">
  36. <xsl:with-param name="string" select="substring-after($string, $pattern)"/>
  37. <xsl:with-param name="pattern" select="$pattern"/>
  38. </xsl:call-template>
  39. </xsl:when>
  40. <xsl:otherwise>
  41. <xsl:value-of select="$string"/>
  42. </xsl:otherwise>
  43. </xsl:choose>
  44. </xsl:template>
  45. <xsl:output
  46. method="html"
  47. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  48. doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
  49. <xsl:variable name="xml_base">../</xsl:variable>
  50. <xsl:variable name="xml_base_pub" select="concat($xml_base,'o')"/>
  51. <xsl:variable name="skin_base" select="concat($xml_base,'themes/current')"/>
  52. <xsl:variable name="cgi_base" select="concat($xml_base,'seppo.cgi')"/>
  53. <xsl:template match="/h:html">
  54. <html xmlns="http://www.w3.org/1999/xhtml">
  55. <head>
  56. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  57. <!-- https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW26 -->
  58. <!-- http://maddesigns.de/meta-viewport-1817.html -->
  59. <!-- meta name="viewport" content="width=device-width"/ -->
  60. <!-- http://www.quirksmode.org/blog/archives/2013/10/initialscale1_m.html -->
  61. <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
  62. <!-- meta name="viewport" content="width=400"/ -->
  63. <link href="{$skin_base}/style.css" rel="stylesheet" type="text/css"/>
  64. <link rel="icon" type="image/png" data-emoji="|S"/>
  65. <link rel="icon" type="image/jpg" href="../me-avatar.jpg"/>
  66. <title><xsl:value-of select="h:head/h:title"/></title>
  67. </head>
  68. <xsl:for-each select="h:body/h:form">
  69. <body onload="document.{@name}.title.focus();">
  70. <label form="{@name}" class="h1"><xsl:value-of select="../../h:head/h:title"/></label>
  71. <p><img
  72. width="600px" height="100px"
  73. alt="Well done, ./app/ is protected from public access, the web server is configured correctly."
  74. title="If a movie quote is visible here, ./app/ lies unprotected on the net."
  75. src="../app/i-must-be-403.svg"/></p>
  76. <xsl:copy>
  77. <xsl:apply-templates select="@*|node()"/>
  78. </xsl:copy>
  79. </body>
  80. </xsl:for-each>
  81. </html>
  82. </xsl:template>
  83. <xsl:template match="h:input">
  84. <xsl:if test="@type != 'hidden'">
  85. <label for="{@name}" class="h3"><xsl:value-of select="@name"/></label>
  86. </xsl:if>
  87. <xsl:copy>
  88. <xsl:apply-templates select="@*|node()"/>
  89. </xsl:copy>
  90. </xsl:template>
  91. <xsl:template match="h:textarea">
  92. <label for="{@name}" class="h3"><xsl:value-of select="@name"/></label>
  93. <xsl:copy>
  94. <xsl:apply-templates select="@*|node()"/>
  95. </xsl:copy>
  96. </xsl:template>
  97. <xsl:template match="@*|node()">
  98. <xsl:copy>
  99. <xsl:apply-templates select="@*|node()"/>
  100. </xsl:copy>
  101. </xsl:template>
  102. </xsl:stylesheet>