Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bring Your Own Resources #205

Merged
merged 23 commits into from Jun 30, 2017
Jump to file or symbol
Failed to load files and symbols.
+23 −4
Split
Viewing a subset of changes. View all

fix loading byor options form, return the old one

commit 1b2c9d5bf0e54c922b9c46f64460e19797dac953 @StrausMG StrausMG committed Jun 24, 2017
View
@@ -30,7 +30,6 @@
from .email_notificator import EmailNotificator
from .container_handler import ContainerHandler
from . import __version__
-from ._spawner_options_form import SPAWNER_OPTIONS_FORM
ssl._create_default_https_context = ssl._create_unverified_context
@@ -146,7 +145,29 @@ def load_state(self, state):
self.user.spawn_pending = False
def _options_form_default(self):
- return SPAWNER_OPTIONS_FORM
+ return """
+ <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label" style="width: 50%">
+ <input
+ id="repository_input"
+ type="text"
+ autocapitalize="off"
+ autocorrect="off"
+ name="repository_url"
+ tabindex="1"
+ autofocus="autofocus"
+ class="mdl-textfield__input"
+ style="margin-bottom: 3px;" />
+ <label class="mdl-textfield__label" for="repository_input">Git repository</label>
+ </div>
+ <label for="need_remove" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" >
+ <input type="checkbox"
+ name="need_remove"
+ class="mdl-checkbox__input"
+ id="need_remove"
+ checked />
+ <span class="mdl-checkbox__label">Remove previous container if it exists</span>
+ </label>
+ """
def options_from_form(self, formdata):
options = {}
@@ -1,4 +1,3 @@
-SPAWNER_OPTIONS_FORM = """
<div style="margin-bottom: 0px;">
@anaderi

anaderi Jun 21, 2017

Owner

make separate html file in share/static/html and read it instead.

<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label" style="width: 50%;">
<input
@@ -84,4 +83,3 @@
</div>
</div>
</div>
-"""