@@ -67,6 +67,7 @@ class encryptContentPlugin(BasePlugin):
6767 ('encryption_info_message' , config_options .Type (string_types , default = str (SETTINGS ['encryption_info_message' ]))),
6868 ('password_button_text' , config_options .Type (string_types , default = str (SETTINGS ['password_button_text' ]))),
6969 ('password_button' , config_options .Type (bool , default = False )),
70+ ('form_class' , config_options .Type (string_types , default = None )),
7071 ('input_class' , config_options .Type (string_types , default = None )),
7172 ('button_class' , config_options .Type (string_types , default = None )),
7273 # password feature
@@ -271,6 +272,7 @@ def __encrypt_content__(self, content, base_path, encryptcontent_path, encryptco
271272 'password_button_text' : encryptcontent ['password_button_text' ],
272273 'encryption_info_message' : encryptcontent ['encryption_info_message' ],
273274 'decryption_failure_message' : json .dumps (encryptcontent ['decryption_failure_message' ]),
275+ 'form_class' : self .config ['form_class' ],
274276 'input_class' : self .config ['input_class' ],
275277 'button_class' : self .config ['button_class' ],
276278 'uname' : uname ,
@@ -436,7 +438,16 @@ def on_config(self, config, **kwargs):
436438 # Enable experimental code .. :popcorn:
437439 if self .config ['search_index' ] == 'dynamically' :
438440 logger .info ("EXPERIMENTAL search index encryption enabled." )
439-
441+
442+ # set default classes in html template
443+ if config ['theme' ].name == 'material' :
444+ if not self .config ['form_class' ]:
445+ self .config ['form_class' ] = 'md-content__inner md-typeset'
446+ if not self .config ['input_class' ]:
447+ self .config ['input_class' ] = 'md-input'
448+ if not self .config ['button_class' ]:
449+ self .config ['button_class' ] = 'md-button md-button--primary'
450+
440451 # Get path to site in case of subdir in site_url
441452 self .setup ['site_path' ] = urlsplit (config .data ["site_url" ] or '/' ).path [1 ::]
442453
0 commit comments