|
@@ -43,7 +43,15 @@ class KMSecurityContentView: BaseXibView {
|
|
|
|
|
|
override func setup() {
|
|
|
updateLanguage()
|
|
|
+
|
|
|
self.updateOwnerButtonState()
|
|
|
+
|
|
|
+ openPwdCheckBox.setTarget(self, action: #selector(openPasswordButtonAction(_:)))
|
|
|
+
|
|
|
+ openPasswordView.delegate = self
|
|
|
+
|
|
|
+ ownerPasswordView.delegate = self
|
|
|
+
|
|
|
}
|
|
|
|
|
|
func updateLanguage() {
|
|
@@ -51,11 +59,10 @@ class KMSecurityContentView: BaseXibView {
|
|
|
titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
|
|
|
titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-medium")
|
|
|
|
|
|
- openPwdCheckBox.properties = ComponentCheckBoxProperty(size: .s, state: .normal, showhelp: true, text: KMLocalizedString("Require a password to open the document", comment: ""), checkboxType: .normal)
|
|
|
+ openPwdCheckBox.properties = ComponentCheckBoxProperty(size: .s, state: .normal, showhelp: true, text: KMLocalizedString("Open Password", comment: ""), checkboxType: .normal)
|
|
|
openPwdCheckBox.properties.propertyInfo.maxWidth = CGRectGetWidth(self.frame) - 48
|
|
|
openPwdCheckBox.properties = openPwdCheckBox.properties
|
|
|
- openPwdCheckBox.setTarget(self, action: #selector(openPasswordButtonAction(_:)))
|
|
|
- openPwdCheckBox.toolTip = KMLocalizedString("Here is the error message description.")
|
|
|
+ openPwdCheckBox.toolTip = KMLocalizedString("Require a password to open the document")
|
|
|
openPwdCheckBox.reloadData()
|
|
|
|
|
|
openPwdCheckBoxWidthConstraint.constant = openPwdCheckBox.properties.propertyInfo.viewWidth
|
|
@@ -64,27 +71,25 @@ class KMSecurityContentView: BaseXibView {
|
|
|
openPasswordView.properties = ComponentPasswordProperty(size: .m,
|
|
|
state: .normal,
|
|
|
isError: false,
|
|
|
- placeholderString: "Please enter password",
|
|
|
+ placeholderString: KMLocalizedString("Please enter password"),
|
|
|
text: "",
|
|
|
isDisabled: false,
|
|
|
- errorText: "Here is the error message description.")
|
|
|
- openPasswordView.delegate = self
|
|
|
+ errorText: "")
|
|
|
openPasswordView.reloadData()
|
|
|
|
|
|
- ownerPwdCheckBox.properties = ComponentCheckBoxProperty(size: .s, state: .normal, showhelp: true, text: KMLocalizedString("Restrict printing and copying of the document", comment: ""), checkboxType: .normal)
|
|
|
+ ownerPwdCheckBox.properties = ComponentCheckBoxProperty(size: .s, state: .normal, showhelp: true, text: KMLocalizedString("Permission Password", comment: ""), checkboxType: .normal)
|
|
|
ownerPwdCheckBox.properties.propertyInfo.maxWidth = CGRectGetWidth(self.frame) - 48
|
|
|
ownerPwdCheckBox.properties = ownerPwdCheckBox.properties
|
|
|
- ownerPwdCheckBox.toolTip = KMLocalizedString("Here is the error message description.")
|
|
|
+ ownerPwdCheckBox.toolTip = KMLocalizedString("Restrict printing and copying of the document")
|
|
|
ownerPwdCheckBox.setTarget(self, action: #selector(ownerPaasswordButtonAction(_:)))
|
|
|
|
|
|
ownerPasswordView.properties = ComponentPasswordProperty(size: .m,
|
|
|
state: .normal,
|
|
|
isError: false,
|
|
|
- placeholderString: "Please enter password",
|
|
|
+ placeholderString: KMLocalizedString("Please enter password"),
|
|
|
text: "",
|
|
|
isDisabled: false,
|
|
|
- errorText: "Here is the error message description.")
|
|
|
- ownerPasswordView.delegate = self
|
|
|
+ errorText: KMLocalizedString(""))
|
|
|
ownerPwdCheckBoxWidthConstraint.constant = ownerPwdCheckBox.properties.propertyInfo.viewWidth
|
|
|
ownerPwdCheckBoxHeightConstraint.constant = ownerPwdCheckBox.properties.propertyInfo.viewHeight
|
|
|
|