|
@@ -60,30 +60,21 @@ class NCCreateFormUploadRichdocuments: XLFormViewController, NCSelectDelegate, U
|
|
|
}
|
|
|
|
|
|
self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
|
|
|
- self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
|
|
|
-
|
|
|
- self.view.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
|
|
|
- self.collectionView.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
|
|
|
-
|
|
|
+
|
|
|
let cancelButton : UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(cancel))
|
|
|
let saveButton : UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(save))
|
|
|
|
|
|
self.navigationItem.leftBarButtonItem = cancelButton
|
|
|
self.navigationItem.rightBarButtonItem = saveButton
|
|
|
-
|
|
|
self.navigationItem.rightBarButtonItem?.isEnabled = false
|
|
|
|
|
|
- self.navigationController?.navigationBar.isTranslucent = false
|
|
|
- self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
|
|
|
- self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
|
|
|
- self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.sharedInstance.brandText]
|
|
|
-
|
|
|
// title
|
|
|
self.title = titleForm
|
|
|
-
|
|
|
- // form
|
|
|
- initializeForm()
|
|
|
-
|
|
|
+
|
|
|
+ // Theming view
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(self.changeTheming), name: NSNotification.Name(rawValue: "changeTheming"), object: nil)
|
|
|
+ changeTheming()
|
|
|
+
|
|
|
// load the templates available
|
|
|
getTemplate()
|
|
|
}
|
|
@@ -138,6 +129,11 @@ class NCCreateFormUploadRichdocuments: XLFormViewController, NCSelectDelegate, U
|
|
|
self.form = form
|
|
|
}
|
|
|
|
|
|
+ @objc func changeTheming() {
|
|
|
+ appDelegate.changeTheming(self, tableView: tableView, collectionView: collectionView)
|
|
|
+ initializeForm()
|
|
|
+ }
|
|
|
+
|
|
|
override func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
|
|
|
let header: UITableViewHeaderFooterView = view as! UITableViewHeaderFooterView
|
|
|
header.textLabel?.font = UIFont.systemFont(ofSize: 13.0)
|
|
@@ -184,13 +180,11 @@ class NCCreateFormUploadRichdocuments: XLFormViewController, NCSelectDelegate, U
|
|
|
// name
|
|
|
let name = cell.viewWithTag(200) as! UILabel
|
|
|
name.text = template.name
|
|
|
- name.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
|
|
|
name.textColor = NCBrandColor.sharedInstance.textView
|
|
|
|
|
|
// select
|
|
|
let imageSelect = cell.viewWithTag(300) as! UIImageView
|
|
|
if selectTemplate != nil && selectTemplate?.name == template.name {
|
|
|
- cell.backgroundColor = NCBrandColor.sharedInstance.brand
|
|
|
imageSelect.image = UIImage(named: "plus100")
|
|
|
imageSelect.isHidden = false
|
|
|
} else {
|