diff options
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> |