From bc972e54700d552f0582f17064d8bd24ab52c32c Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 13 Jul 2023 14:52:26 -0700 Subject: [PATCH] refactor: feedback script dev maintainability --- emhttp/plugins/dynamix/scripts/feedback | 323 ++++++++++++------------ 1 file changed, 165 insertions(+), 158 deletions(-) diff --git a/emhttp/plugins/dynamix/scripts/feedback b/emhttp/plugins/dynamix/scripts/feedback index 6952d8064..e1593d233 100755 --- a/emhttp/plugins/dynamix/scripts/feedback +++ b/emhttp/plugins/dynamix/scripts/feedback @@ -10,170 +10,177 @@ * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. */ -?> -"]; -$style[] = "div.spinner.fixed{z-index:100000}"; -$style[] = "div#control_panel{position:absolute;left:0;right:0;top:0;padding-top:8px;line-height:24px;white-space:nowrap}"; -$style[] = "div.divide{text-align:center;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}"; -$style[] = "div.divide label:first-child{margin-left:0}"; -$style[] = "div.divide label{margin-left:2%;cursor:pointer}"; -$style[] = "div.allpanels{display:none;position:absolute;left:0;right:0;top:40px;bottom:0;overflow:auto}"; -$style[] = "div#footer_panel{position:absolute;left:0;right:0;bottom:0;height:30px;line-height:30px;text-align:center}"; -$style[] = "textarea.feedback{width:$width;height:530px;margin:0;resize:none}"; -$style[] = "@media (max-width:960px){textarea.feedback{height:330px}}"; -$style[] = "@media (max-height:768px){textarea.feedback{height:330px}}"; -$style[] = "input.submit[type=button]{margin-right:0;float:right}"; -$style[] = "input.submit[type=email]{margin-top:10px;float:left}"; -$style[] = "p.note,label.note{font-size:1.1rem!important;display:block}"; -$style[] = "p.success{text-align:center!important;margin-top:20px}"; -$style[] = "span.spacer{margin:0 4px}"; -$style[] = ""; - -$html = ["
"]; -$html[] = "
"; -$html[] = ""; -$html[] = ""; -$html[] = ""; -$html[] = "
"; -$html[] = "
"; -$html[] = "
"; -$html[] = "
"; -$html[] = ""; -$html[] = "
"; -$html[] = ""; -$html[] = "
"; -$html[] = "
"; -$html[] = ""; -$html[] = ""; -$html[] = ""; -$html[] = "

"._('NOTE').": "._('Submission of this bug report will automatically send your system diagnostics to Lime Technology').".

"; -$html[] = "
"; -$html[] = "
"; -$html[] = ""; -$html[] = "
"; -$html[] = ""; -$html[] = "
"; -$html[] = ""; -$html[] = "
"; - -$script = [""; - -echo implode($style),implode($html),implode($script); +$var = parse_ini_file('state/var.ini'); +$unraid = parse_ini_file('/etc/unraid-version'); +$keyfile = !empty(_var($var, 'regFILE')) ? trim(base64_encode(@file_get_contents($var['regFILE']))) : ''; +$width = in_array($display['theme'], ['azure', 'gray']) ? '98.4%' : '100%'; ?> + + + + + Feedback Form + + + +
+
+ + + +
+
+
+
+ +
+ +
+
+ + + +

: .

+
+
+ +
+ +
+ +
+ + + \ No newline at end of file