Roxen.git / server / config_interface / dbs / new_group.pike

version» Context lines:

Roxen.git/server/config_interface/dbs/new_group.pike:27:   mapping|string parse( RequestID id )   {    int find_dbs;    RXML.user_set_var( "var.go-on", "<cf-ok/>" );       if( !id->variables->name )    id->variables->name = _(449,"automatic");       string error="",form =   #" - <h3>"+_(450,"Create a new database group")+#"</h3> + <cf-title>"+_(450,"Create a new database group")+#"</cf-title>   "+_(451,#"<p>The groups are used mainly to group the databases in the   Administration interface, but also to indicate the default MySQL   server external databases will be created in.</p>      <p>If a group has a URL set, it will be used to select the database   server in which the database will be created. Please note that it - must be a MySQL server.</p>")+#"<p> - <font size=+1><b>ERROR</b></font> - <table> -  <tr> -  <td><b>"+_(452,"ID")+#":</b></td> <td><input name='name' value='&form.name;' size=20/></td> -  <td><b>"+_(376,"Name")+#":</b></td> <td><input name='lname' value='&form.lname;' size=30/></td> -  </tr> -  <tr> -  <td valign=top colspan='2'> -  "+_(453,"The identifier of the group. This is used internally in Roxen," + must be a MySQL server.</p>")+#" + [ERROR] + <p> + <dl class='config-var no-border narrow'> +  <dt class='name'>" + _(452,"ID") + #":</dt> +  <dd class='value'> +  <input name='name' value='&form.name;' required=''/> +  </dd> +  <dd class='doc'>" + +  _(453,"The identifier of the group. This is used internally in Roxen,"    " and must be unique. "    "If you leave it as automatic, an identifier is selected "    "automatically.")+#" -  </td> -  <td valign=top colspan='2' width='100%'> -  "+_(454,"The name of the database group. This is what is" +  </dd> + </dl> +  + <dl class='config-var no-border narrow'> +  <dt class='name'>" + _(376,"Name") + #":</dt> +  <dd class='value'> +  <input name='lname' value='&form.lname;' required='' size='60' /> +  </dd> +  <dd class='doc'>" + +  _(454,"The name of the database group. This is what is"    " shown in the configuration interface.")+#" -  </td> -  </tr> -  <tr> -  <td><nbsp><b>"+_(444,"URL")+#":</b></nbsp></td> -  <td colspan=3>mysql://<input name='url' size=30 value='&form.url;'/></td> -  </tr> -  <tr><td valign=top colspan='4'> -  "+_(455, #"\ +  </dd> + </dl> +  + <dl class='config-var no-border narrow'> +  <dt class='name'>" + _(444,"URL") + #":</dt> +  <dd class='value'> +  <input name='url' size=30 value='&form.url;' placeholder='mysql:// is added...'/> +  </dd> +  <dd class='doc'>" + +  _(455, #"\   This URL is used for <i>internal</i> databases created in this group,   and it specifies which MySQL server they should be created in. As an   example, if you want all databases created in the group to end up in   the MySQL running on the host <i>wyrm</i>, using the account with   the username <i>foo</i> and password <i>bar</i>, set this URL to - <i>foo:bar@wyrm</i>.")+ -  "</td></tr>" - #"<tr><td valign=top><nbsp><b>"+_(448,"Comment")+#":</b></nbsp></td> -  <td colspan=3><textarea name='comment' cols=50 rows=10>&form.comment;</textarea></td></tr>" + <i>foo:bar@wyrm</i>.")+#" +  </dd> + </dl>    -  "</table>"; + <dl class='config-var no-border narrow'> +  <dt class='name'>" + _(448,"Comment") + #":</dt> +  <dd class='value'> +  <textarea name='comment' rows='10'>&form.comment;</textarea> +  </dd> + </dl>";       if( id->variables["ok.x"] )    {    if( strlen(id->variables->url) )    {    id->variables->url = Stdio.append_path(id->variables->url, "/");    if(catch(Sql.Sql( "mysql://"+id->variables->url ) ))    error = sprintf( "<font color='&usr.warncolor;'>"+    _(456,"Cannot connect to %s")+    "</font>", "mysql://"+id->variables->url );
Roxen.git/server/config_interface/dbs/new_group.pike:111:    really_do_create( id );    if( find_dbs )    RXML.user_set_var( "var.go-on",    sprintf("<redirect to='import_dbs.pike?group=%s&amp;&usr.set-wiz-id;'/>",    Roxen.http_encode_url(c_name(id->variables->name,id))));    else    RXML.user_set_var( "var.go-on", "<redirect to='/dbs/'/>" );    return "";    }    } -  return replace( form, "ERROR", error ); +  return replace( form, "[ERROR]", error );   }