1 31 32 package org.opencms.widgets; 33 34 import org.opencms.file.CmsObject; 35 import org.opencms.i18n.CmsEncoder; 36 37 46 public class CmsPasswordWidget extends A_CmsWidget { 47 48 51 public CmsPasswordWidget() { 52 53 this(""); 55 } 56 57 62 public CmsPasswordWidget(String configuration) { 63 64 super(configuration); 65 } 66 67 70 public String getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { 71 72 String id = param.getId(); 73 74 StringBuffer result = new StringBuffer (16); 75 76 result.append("<td class=\"xmlTd\"><input type=\"password\" class=\"xmlInput textInput"); 77 if (param.hasError()) { 78 result.append(" xmlInputError"); 79 } 80 result.append("\" name=\""); 81 result.append(id); 82 result.append("\" id=\""); 83 result.append(id); 84 result.append("\" value=\""); 85 result.append(CmsEncoder.escapeXml(param.getStringValue(cms))); 86 result.append("\">"); 87 result.append("</td>"); 88 89 return result.toString(); 90 } 91 92 95 public I_CmsWidget newInstance() { 96 97 return new CmsPasswordWidget(getConfiguration()); 98 } 99 } | Popular Tags |