diff options
author | nacho <nacho@ownyourbits.com> | 2018-12-31 03:10:28 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-01-05 04:14:53 +0300 |
commit | 80cd216eac90642e54f6980eae30ff6dd5005001 (patch) | |
tree | 68cb4f3ad02eb6ed996326bf48b2ef235f0b81c8 /ncp-web | |
parent | 497edb8d9471c05ace0868e2d6c2f092dca7c030 (diff) |
add directory type
Diffstat (limited to 'ncp-web')
-rw-r--r-- | ncp-web/elements.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ncp-web/elements.php b/ncp-web/elements.php index 2a6c5734..ea2b4b65 100644 --- a/ncp-web/elements.php +++ b/ncp-web/elements.php @@ -23,7 +23,7 @@ HTML; $ret .= "<td><label for=\"$ncp_app-$param[id]\">$param[name]</label></td>"; // default to text input - if (!array_key_exists('type', $param)) + if (!array_key_exists('type', $param) || $param['type'] == 'directory' || $param['type'] == 'file') { $suggest = ''; if (array_key_exists('suggest', $param)) @@ -43,8 +43,14 @@ HTML; size=\"40\">"; if (array_key_exists('default', $param)) - { $ret .= "<img class=\"default-btn\" title=\"restore defaults\" src=\"../img/info.svg\">"; + + if ($param['type'] == 'directory') + { + if (file_exists($param['value'])) + $ret .= " <span class=\"ok-field\">directory exists</span>"; + else + $ret .= " <span class=\"error-field\">directory doesn't exist</span>"; } $ret .= "</td>"; @@ -84,7 +90,7 @@ HTML; </table> </div> <div class="config-button-wrapper"> - <button id="$ncp_app-config-button" class="config-button">Run</button> + <button id="$ncp_app-config-button" class="config-button">Apply</button> <img class="loading-gif" src="img/loading-small.gif"> <div class="circle-retstatus" class="icon-red-circle"></div> </div> |